Michael Stenta
1a7582b8ab
Only perform UniqueBirthLogContraint validation on birth logs.
2021-10-14 09:53:22 -04:00
Michael Stenta
44eb865048
Stub crop family reference terms.
...
If the crop family migration happens after plant type migration
then these references would not be populated. This shouldn't
happen, because plant type depends on crop family, but it may
be possible. Better to know that something happened than to
silently end up with empty references.
2021-10-14 09:42:13 -04:00
Michael Stenta
c7d2fce98e
Remove forum_container field processing from taxonomy term migration group.
...
We don't need this for anything.
2021-10-11 15:46:08 -04:00
Michael Stenta
7f2e56bd61
Issue #3242468 : Validation error migrating taxonomy terms that are parents of other terms
2021-10-11 15:45:56 -04:00
Michael Stenta
ccbb206d56
Remove request_time migrate process plugin - no longer used.
2021-10-11 14:44:54 -04:00
Michael Stenta
70e391c864
Do not archive areas without an area type during migration.
...
This was supposed to be included with the previous commit:
4d59cd69c7
2021-10-11 14:42:43 -04:00
paul121
d86c21cff2
Issue #3241690 by paul121: User 1 cannot use the refresh_token grant type
...
Load all roles for user 1 so they can be granted all possible scopes.
2021-10-08 19:29:03 -04:00
paul121
703f31d0e1
Issue #3241652 by paul121: Depend on drupal/subrequests
2021-10-08 17:46:51 -04:00
Michael Stenta
840307e36d
Remove unnecessary remember_roles from Views config.
2021-10-04 19:21:00 -04:00
paul121
e6b76a7446
Issue #3240330 by paul121: Computed bundle fields break page_type views
...
Default to the entity type's base table if the table mapping does not find a table for the bundle field.
2021-10-04 16:28:29 -04:00
Michael Stenta
6207d09d9d
Style the reports toolbar icon with a Gin SVG.
2021-10-04 12:24:08 -04:00
Michael Stenta
0defc4d966
Move the farm.report menu link to the farm.base parent via farm_ui_menu.
2021-10-04 12:24:08 -04:00
Michael Stenta
f2da5c96c8
Grant report index access to managed roles with config-level access.
2021-10-04 12:24:08 -04:00
Michael Stenta
b5360d91be
Add an index of reports at /report.
2021-10-04 12:24:08 -04:00
Michael Stenta
dccaa1f43a
Initial farm_report module.
2021-10-04 12:24:08 -04:00
Michael Stenta
cafd8bd760
Limit Views Entity Reference exposed filters by View or target_bundles.
2021-10-04 12:02:37 -04:00
paul121
254c303e33
Remove log.asset and log.location filters from the page_asset display.
2021-10-04 10:30:41 -04:00
paul121
99b1ca5637
Add default exposed filters for log.asset and log.location.
2021-10-04 10:30:41 -04:00
paul121
7ef59222e5
Allow birth logs to be modified after being created.
2021-10-01 13:19:38 -04:00
paul121
02fa75c4ee
Use an aggregate query to count birth logs.
2021-10-01 13:14:00 -04:00
paul121
3604cf9483
Use EntityReferenceFieldItemList to iterate over entities.
2021-10-01 13:14:00 -04:00
paul121
10fec240cc
Include the delta in the violation path.
2021-10-01 13:14:00 -04:00
paul121
a328446b72
Fail validation if more than 0 birth logs reference the asset.
2021-10-01 13:14:00 -04:00
paul121
8127e751a8
Specify accessCheck(FALSE) in LoqQueryTest.
2021-10-01 10:01:35 -07:00
Michael Stenta
2ebeef595e
Require explicit use of accessCheck() on the result of farm.log_query service.
2021-10-01 12:44:07 -04:00
Michael Stenta
f462573b4e
Do not check access in log entity queries in asset.location and group.membership services.
2021-10-01 10:46:16 -04:00
Michael Stenta
5d0dc727f2
Do not check log access when searching for birth logs in UniqueBirthLogConstraintValidator.
2021-10-01 10:46:16 -04:00
paul121
b9f41d7d69
Explicitly enable access checking on content entity queries.
...
Not calling ::accessCheck() is deprecated in Drupal 9.2. See
https://www.drupal.org/node/3201242
2021-10-01 10:46:16 -04:00
Michael Stenta
e6f183512c
Do not allow ID Tag field to be created through the UI. #451
2021-10-01 07:07:57 -04:00
Michael Stenta
32f6457a06
Fix ID Tag type textfield fallback.
2021-10-01 06:20:32 -04:00
Michael Stenta
092b6936d4
Clarify that farm_update only reverts configuration entities - not simple config.
2021-09-27 09:50:22 -04:00
paul121
3a46ccb60b
Issue #3239191 by paul121: Change farm_update to ignore simple config
2021-09-27 09:50:10 -04:00
Symbioquine
efb8535150
Improve plan archive timestamp behavior #446
...
**Why?** Fix some weird behavior and make sure
inconsistent states cannot occur;
* Allow setting the archived timestamp at the same
time as moving a plan to the archived state.
* Ensure that the archived timestamp cannot be set
without also transitioning into the archived state.
* Ensure that the arhived timestamp cannot be set to
NULL without transitioning back to the active state.
2021-09-24 12:36:14 -04:00
Symbioquine
27142866d3
Improve asset archive timestamp behavior #446
...
**Why?** Fix some weird behavior and make sure
inconsistent states cannot occur;
* Allow setting the archived timestamp at the same
time as moving an asset to the archived state.
* Ensure that the archived timestamp cannot be set
without also transitioning into the archived state.
* Ensure that the arhived timestamp cannot be set to
NULL without transitioning back to the active state.
2021-09-24 12:36:14 -04:00
Michael Stenta
20ceb84193
Move ID Tag base field to farm_id_tag.
2021-09-24 12:23:01 -04:00
Michael Stenta
e9e523c095
Move flag base field, action, config, and logic to farm_flag.
2021-09-24 12:22:25 -04:00
Michael Stenta
0029cfbf01
Move Views stuff from farm_entity to new farm_entity_views sub-module.
2021-09-24 12:21:15 -04:00
Michael Stenta
9e26868112
Move base field definitions from farm_entity to new farm_entity_fields sub-module.
2021-09-24 12:21:15 -04:00
Michael Stenta
792c24edce
When a log is saved without owner(s), set the current user as the owner.
2021-09-24 11:50:32 -04:00
Michael Stenta
1502115bc7
Move log assignment action to farm_owner module.
2021-09-24 11:50:32 -04:00
Michael Stenta
0f84ff1575
Move Log Owner base field to dedicated farm_owner module.
2021-09-24 11:50:32 -04:00
Michael Stenta
1f0c254e79
Remove explicit dependency on farm_flag from farm_maintenance.
2021-09-24 11:50:02 -04:00
paul121
6646a31d37
Log the result after reverting config. #447
2021-09-24 10:03:19 -04:00
paul121
585f3eaecb
Add missing default_measure key for material quantity. #448
2021-09-24 07:30:32 -04:00
Michael Stenta
e0e34d6e01
The farm_geo module depends on geofield for the geofield.geophp service.
2021-09-23 16:54:55 -04:00
Michael Stenta
db40dc13a6
Exclude system.performance config from automatic updates.
2021-09-23 09:55:41 -04:00
Michael Stenta
b08c9ab1b5
Exclude user.role.anonymous and user.role.authenticated config from automatic updates.
2021-09-23 09:55:41 -04:00
Michael Stenta
d51176aef1
Automated tests of farmOS Update module.
2021-09-23 09:55:41 -04:00
Michael Stenta
f575b0039f
Exclude farm_update.settings config from automatic updates, just to be safe.
2021-09-23 09:55:41 -04:00
Michael Stenta
f881bea2e3
Allow additional config exclusions to be defined in farm_update.settings.
2021-09-23 09:55:41 -04:00
Michael Stenta
e36ac7a33f
Exclude quantity.settings config from automatic updates.
2021-09-23 09:55:41 -04:00
Michael Stenta
938fb5926c
Exclude config that we override in hook_install().
2021-09-23 09:55:41 -04:00
Michael Stenta
a46c0923a0
Exclude core configuration items from automatic updates.
2021-09-23 09:55:41 -04:00
Michael Stenta
24d158341f
Add a hook_farm_update_exclude_config() to allow modules to exclude config from automatic updates.
2021-09-23 09:55:41 -04:00
Michael Stenta
95702e5be4
Log when reverting config fails.
2021-09-23 09:55:41 -04:00
Michael Stenta
8d034c5186
Revert overridden configuration on rebuild().
...
Inspired by ConfigUpdateUiCliService.
2021-09-23 09:55:41 -04:00
Michael Stenta
59dd58a962
Provide a farm_update:rebuild Drush command.
2021-09-23 09:55:41 -04:00
Michael Stenta
039eb0fbf5
Run FarmUpdate::rebuild() via hook_rebuild().
2021-09-23 09:55:41 -04:00
Michael Stenta
2dd6a268f8
Initial farm.update service with rebuild() method.
2021-09-23 09:55:41 -04:00
Michael Stenta
fbb589655d
Initial farm_update module.
...
Installed with base modules.
2021-09-23 09:55:41 -04:00
Michael Stenta
7092a0830f
Refactor dashboard block handling to always expect block plugin ID.
2021-09-22 15:17:17 -04:00
Eva Martinez
3ea20c1d63
#3236712 : Renamed block plugin variable and use the renamed dashboard pane key and simplify block access check.
2021-09-22 15:10:31 -04:00
Eva Martinez
ddefa1e2c9
#3236712 : Rename new dashboard pane key.
2021-09-22 15:10:31 -04:00
Eva Martinez
af786a9abc
#3236712 : Added functionality to render custom blocks in dashboard.
2021-09-22 15:10:31 -04:00
Eva Martinez
62562def8f
#3236712 : Added new plugin block key to dashboard pane.
2021-09-22 15:10:31 -04:00
paul121
95c916b8e9
Add functional test of quantity type views filter.
2021-09-22 14:45:20 -04:00
Michael Stenta
51d3a40123
Move QuantityEventSubscriber to farm_material module.
2021-09-22 14:45:20 -04:00
Michael Stenta
219311568c
Create material quantities after general log quantities.
...
The thought here is that the "important" quantities should be
"first" on the log.
2021-09-22 14:45:20 -04:00
paul121
c1c89c7ddc
Add the log quantity material type filter to page_type and page_asset displays.
2021-09-22 14:45:20 -04:00
paul121
1170e81242
Add LogQuantitymaterialType views filter.
2021-09-22 14:45:20 -04:00
paul121
d4b24222ea
Auto-populate material type term reference from a material inventory asset.
2021-09-22 14:45:20 -04:00
paul121
ae08790b56
Input logs default to the material quantity type.
2021-09-22 14:45:20 -04:00
Michael Stenta
c4bd241ed3
Remove material term reference field from Input logs.
2021-09-22 14:45:20 -04:00
paul121
5fd89cf2f8
Migrate input log material term reference field to Material Quantities.
2021-09-22 14:45:20 -04:00
paul121
a847724a46
Save quantities as a pseudo field in the farm_migrate_log migration group.
...
This is necessary so that individual log types can use pseudo fields in
the "quantity" process if they override it themselves.
When a migration group defines shared_configuration processes that are
overwritten by a migration, the processes are still executed in the
order defined by the migration group. This prevents an individual
migration from using its own pseudo fields for a process that it
overrides.
2021-09-22 14:45:20 -04:00
Michael Stenta
a95c487b9d
Add a Material Quantity type with a Material type term reference field.
2021-09-22 14:45:20 -04:00
s33a
4b1b93efda
Add a "Material type" reference field to Material assets.
2021-09-22 14:45:20 -04:00
s33a
13492129e6
Add a Material asset type.
2021-09-22 14:45:20 -04:00
s33a
b88877b617
Rename "Material" taxonomy to "Material types".
...
This also changes the `material` term reference field on
Input logs to `material_type`, and updates all migrations
accordingly.
2021-09-22 14:45:20 -04:00
Michael Stenta
ede1ed7605
Fix "entity.plan.collection does not exist" when plans module is not enabled.
2021-09-22 14:43:45 -04:00
Michael Stenta
d81c417ff5
Link animal birthdate field to birth log, if available.
2021-09-21 17:34:54 -04:00
Michael Stenta
92cef7f8f8
Validate that only one birth log can reference an asset.
2021-09-21 17:34:54 -04:00
Michael Stenta
3a649a8b42
When a birth log is saved, copy mother and date to children assets.
2021-09-21 17:34:54 -04:00
Michael Stenta
f97029b010
Rename the Asset field to Children in Birth logs.
2021-09-21 17:34:54 -04:00
Michael Stenta
1c5f3e3539
Move Mother field above Assets (Children) field in Birth logs.
2021-09-21 17:34:54 -04:00
Michael Stenta
320ec3d331
Add INSERT and UPDATE log events.
2021-09-21 17:34:54 -04:00
Michael Stenta
a54e1c0a62
Add help text to /assets, /logs, /quantities, and /plans.
2021-09-20 16:42:36 -04:00
Michael Stenta
b966281d77
Put farm_map_mapbox into "farmOS Maps" group.
2021-09-20 16:10:52 -04:00
Michael Stenta
293717e95b
Put modules into "farmOS (Defaults)" group: farm_land_types, farm_structure_types, farm_role_roles.
2021-09-20 16:10:19 -04:00
Michael Stenta
31ae3b0246
Do not show full data_stream entity summaries on sensor pages.
2021-09-20 15:10:37 -04:00
Michael Stenta
c9f316adbb
Display all data in CSV export.
2021-09-20 15:07:26 -04:00
Michael Stenta
bfb1e3cfbf
Add row summary count to data stream basic View footer.
2021-09-20 15:07:26 -04:00
Michael Stenta
78bc327fa7
Require cookie authentication for CSV display.
2021-09-20 15:07:26 -04:00
Michael Stenta
1e714a2453
Rename View display from rest_export to csv, and override footer for all displays, for consistency.
2021-09-20 15:07:26 -04:00
Michael Stenta
4570ccd975
Use full pager for data stream basic View and limit to 100 records per page.
2021-09-20 15:07:25 -04:00
Michael Stenta
7933934261
Improve "public" field description.
2021-09-20 15:07:25 -04:00
Michael Stenta
55a7cf3571
Remove @todo Include link to updated user guide.
2021-09-20 15:07:25 -04:00
Michael Stenta
5478293d2b
Translate labels in developer information.
2021-09-20 15:07:25 -04:00
Michael Stenta
9947062f0c
Add a link to the legacy API endpoint in developer information fieldset.
2021-09-20 15:07:25 -04:00
Michael Stenta
4a236b1a86
Delete data_stream references from sensor assets during migration rollback.
2021-09-20 15:07:25 -04:00
Michael Stenta
4d1c14b14b
Render the data stream entity references and developer information in the bottom region of asset pages.
2021-09-20 15:07:24 -04:00
Michael Stenta
a85f95d6ab
Display data stream entity reference label above View.
2021-09-20 15:07:24 -04:00
Michael Stenta
933761b392
Rename LegacyListener to SensorListener (only use "legacy" in description).
2021-09-20 15:07:24 -04:00
Michael Stenta
5d29318e67
Move SensorListenerDataNames migrate d7 source plugin to farm_migrate module.
2021-09-20 15:07:24 -04:00
paul121
7802896254
Update data_stream_basic_data view to use the data_stream_basic base table.
2021-09-20 15:07:24 -04:00
paul121
fba766935d
Standardize naming of data stream views fields.
2021-09-20 15:07:24 -04:00
paul121
236c8bbd92
Allow data_stream_basic to be used as a views base table.
2021-09-20 15:07:24 -04:00
paul121
3f02970c28
Display developer info for sensor assets with basic data streams.
2021-09-20 15:07:24 -04:00
paul121
1428ef1db3
Render the data stream name as a link in the summary display.
2021-09-20 15:07:24 -04:00
paul121
670b47b95e
Allow data stream fields to be configured via field_ui.
2021-09-20 15:07:24 -04:00
paul121
33473fb8f8
Only render developer information in the full view mode.
2021-09-20 15:07:24 -04:00
paul121
71e27b6635
Add a summary view mode for data streams.
2021-09-20 15:07:24 -04:00
paul121
92c2f49231
Migrate listener sensor data in a post row save event.
2021-09-20 15:07:24 -04:00
Paul Weidner
0f1ddb5dbe
Migrate listener sensor data into data_stream_basic.
2021-09-20 15:07:24 -04:00
Paul Weidner
a4f28a950d
Migrate each listener sensor named value into a new data stream.
2021-09-20 15:07:24 -04:00
Paul Weidner
97bf5139c9
Move listener sensor asset to dedicated migration.
2021-09-20 15:07:24 -04:00
paul121
5ed294b630
Allow the sensor type to be specified in the d7_sensor_asset source plugin.
2021-09-20 15:07:24 -04:00
paul121
671e5145db
Adjust sensor asset bundle field weights.
2021-09-20 15:07:24 -04:00
paul121
e528813330
Refactor listener data streams to be basic data streams with a separate API endpoint.
2021-09-20 15:07:24 -04:00
paul121
fd74fa2ff5
Add API endpoint for all basic data streams associated with a sensor.
2021-09-20 15:07:24 -04:00
paul121
71c831223d
Bail if no data streams are specified.
2021-09-20 15:07:24 -04:00
paul121
b0f4855441
Allow filtering by multiple named values.
2021-09-20 15:07:24 -04:00
paul121
6a5abea6f8
Add storageGetMultiple method to support querying multiple basic data streams.
2021-09-20 15:07:24 -04:00
paul121
618a7961d6
Add return type to storageGet annotation.
2021-09-20 15:07:24 -04:00
paul121
74fc3933db
Fix storageGet args parameter.
2021-09-20 15:07:24 -04:00
paul121
219d11ccdb
Remove DataStreamSqlStorage trait.
2021-09-20 15:07:24 -04:00
paul121
e742293386
Add private_key and public fields to sensor asset.
2021-09-20 15:07:24 -04:00
paul121
93e8bd79bc
Use the data stream entity name in name/value pairs.
2021-09-20 15:07:24 -04:00
paul121
1a10fbf276
Render data stream entities in the default view mode.
2021-09-20 15:07:24 -04:00
paul121
9fa7c4a9e4
Remove (decimal) from Sensor value (decimal).
2021-09-20 15:07:24 -04:00
paul121
b93d048023
Add test for non-numeric data stream data.
2021-09-20 15:07:24 -04:00
paul121
ded2a3971d
Render developer information details element in basic data stream view.
2021-09-20 15:07:24 -04:00
paul121
33e7ee6903
Render the data stream public field as a yes-no boolean.
2021-09-20 15:07:24 -04:00
paul121
1f386ab989
Hide the data stream private key.
2021-09-20 15:07:24 -04:00
Michael Stenta
f9ecfbbf91
Popup name is required to show popup.
...
This fixes an issue introduced in commit fcf32771bd
which broke cluster popups. This still works to fix the issue
that the previous commit sought to fix (do not show popups
while drawing).
2021-09-20 15:07:24 -04:00
Michael Stenta
f00313db03
Move create_quantity migration plugin to quantity module.
2021-09-20 14:13:18 -04:00
Michael Stenta
312d611b64
Print the name of the migration group being imported/rolled back in farm_migrate Drush commands.
2021-09-20 12:11:07 -04:00
Michael Stenta
5f232b4319
Move all sub-modules into sub-directories called "modules" for consistency.
2021-09-17 16:11:38 -04:00
Michael Stenta
89996482be
Issue #3220623 : Split Sale/Purchase/Price bundles out to contrib
2021-09-17 15:59:27 -04:00
paul121
c48e380295
Allow quantity types to specify a default measure.
2021-09-17 15:59:27 -04:00
paul121
94ef94825c
Increase weight between quantity base fields.
2021-09-17 15:59:27 -04:00
Michael Stenta
3257fc6e7b
Remove config_rewrite module.
2021-09-16 19:08:58 -04:00
Michael Stenta
f73b9115fb
Refactor farm_ui_location config_rewrite settings into hook_install().
2021-09-16 19:08:58 -04:00
Michael Stenta
505dc83130
Refactor farm_entity config_rewrite settings into hook_install().
2021-09-16 19:08:58 -04:00
Michael Stenta
e2d822ac4a
Refactor farm_api config_rewrite settings into hook_install().
2021-09-16 19:08:58 -04:00
Michael Stenta
4e29f299cd
Put "Current inventory" field in right column of asset page.
2021-09-15 15:35:40 -04:00
paul121
ee96a153d9
Render inventory information after the quantity in the format (@adjustment @asset inventory).
2021-09-15 15:35:40 -04:00
paul121
b770db6552
Allow quantity fields to be rendered before and after the standard fields.
2021-09-15 15:35:40 -04:00
paul121
f534299d38
Add view of inventory adjustments in an inventory tab on asset pages.
2021-09-15 15:35:40 -04:00
Michael Stenta
19e2c845c1
Translate inventory adjustment widget validation errors.
2021-09-15 15:35:40 -04:00
paul121
7cb61108b9
Add custom validation for quantity inventory values.
2021-09-15 15:35:40 -04:00
paul121
e9caab4e4a
Hide the inventory asset field until an inventory adjustment is selected.
2021-09-15 15:35:40 -04:00
paul121
b236424bc0
Default the quantity inventory_adjustment to N/A.
2021-09-15 15:35:40 -04:00
Michael Stenta
a30acfb82e
Delete parent references to taxonomy terms during migration rollback.
2021-09-15 15:33:17 -04:00
Michael Stenta
ff547ed8a5
Delete companion references to plant type terms during migration rollback.
2021-09-15 14:59:54 -04:00
Michael Stenta
1652c4746f
Add a farm_migrate:rollback Drush command that rolls back all farmOS migrations.
2021-09-15 14:22:09 -04:00
Michael Stenta
a24c3ff221
Add a farm_migrate:import Drush command that executes all farmOS migrations.
2021-09-15 14:22:03 -04:00
Michael Stenta
c477e05896
Only delete quantity references for quantities that were created by migrations in the farm_migrate_quantity migration group.
...
This ensures that references to quantities created with the
create_quantity process plugin are maintained, so those
quantities can be deleted normally when the log is deleted.
2021-09-15 14:21:54 -04:00
Michael Stenta
f3ec44d43e
Issue #3189740 by m.stenta: Cannot rollback farm_migrate_asset_parent group migrations
2021-09-15 12:03:04 -04:00
Michael Stenta
14bb01e681
Rename farm_migrate_reference group to farm_migrate_asset_parent.
2021-09-15 12:03:04 -04:00
Michael Stenta
44a14b5422
Issue #3229503 : Rolling back log migration deletes quantities
2021-09-15 12:03:04 -04:00
Michael Stenta
53dc64258e
Temporarily allow access to private file referencing during migration.
2021-09-15 09:01:50 -04:00
Michael Stenta
09ed36b10b
Grant/revoke 'use text format default' permission to/from anonymous role during farm_migrate_taxonomy group migrations.
...
This is necessary because Drush runs migrations as anonymous
user, which does not have access to 'use text format default'
permission, so any terms that need that format fail validation.
2021-09-15 09:00:10 -04:00
Michael Stenta
359a1f8aea
Generalize migration event subscriber so that more events can be added.
2021-09-14 20:42:54 -04:00
Michael Stenta
b90f00e5ed
Ensure that no migrate entities end up with a uid of 0. Make user 1 the default.
2021-09-14 19:25:34 -04:00
Michael Stenta
03e6572f6a
Set the user ID of migrated area assets to 1.
2021-09-14 19:25:34 -04:00
Michael Stenta
fc51877a89
Enable entity validation for area, asset, log, plan, and taxonomy term migrations.
2021-09-14 19:25:34 -04:00
Symbioquine
3152895f15
Enable the map side panel with layer switcher by default #442
...
**Why?** Provide a place for more settings and information
to be included on farmOS maps without introducing more and more
border clutter.
2021-09-12 10:23:03 -07:00
paul121
71159d83c3
Issue #3232237 by paul121: Allow the map widget textarea to be hidden
...
Add display_raw_geometry setting to the map widget.
2021-09-10 07:17:47 -04:00
paul121
92f197a3fa
Log errors when creating key files.
2021-09-09 16:30:43 -04:00
paul121
26d717521c
Do not modify key file permissions.
2021-09-09 16:30:43 -04:00
paul121
73a4fdc529
Move farmOS-map composer dependency to composer.libraries.json.
2021-09-09 15:03:27 -04:00
Michael Stenta
6c7c238ab8
Copy localized_options into the dropbutton URL options.
...
This is necessary to maintain any query parameters that
were added to the action links.
2021-09-09 15:02:18 -04:00
Michael Stenta
ee21d1e38d
Override Gin local actions block to render links in a dropbutton.
2021-09-09 15:02:18 -04:00
Michael Stenta
118250db66
Add the entity_bundles cache tag so action links are recreated after new bundles are installed.
2021-09-09 14:27:31 -04:00
Michael Stenta
22ae662113
Merge FarmAssetAddLogAction and FarmAddLogPrepopulate into FarmActions and AddEntity classes in farm_ui_actions module.
2021-09-09 14:27:31 -04:00
Michael Stenta
59e25655ae
Generalize AddEntity LocalAction bundle parameter logic.
...
Derivatives can either define a bundle_parameter to look for
(eg: 'arg_0' in the case of Views), OR explicitly define the
bundle.
This will allow FarmAddLogPrepopulate to be merged into the
Menu/LocalAction/AddEntity class, and FarmAssetAddLogAction
to be merged into the Derivative\FarmActions class.
2021-09-09 14:27:31 -04:00
Michael Stenta
a4aa8a1859
Update FarmAddLogPrepopulate links to use ?asset=X query parameter.
2021-09-09 14:27:31 -04:00
paul121
6fd2a871d8
Add the entity_bundles cache tag so action links are created after new log types are installed.
2021-09-09 14:27:31 -04:00
paul121
7cdc0eb67b
Prepopulate the asset field when creating a log from the asset page.
2021-09-09 14:27:31 -04:00
paul121
85f3f1ad79
Create an action link class to create logs and prepopulate fields.
2021-09-09 14:27:31 -04:00
paul121
b06248623b
Create an action link to add each log type from the asset view.
2021-09-09 14:27:31 -04:00
Michael Stenta
c327472dc4
Move UI modules into core directory.
2021-09-09 14:27:31 -04:00
Michael Stenta
1ea5f0069e
The Seed module depends on farm_plant_type, not farm_plant.
2021-09-09 14:27:31 -04:00
Michael Stenta
6379e8b59f
Split Animal type and Plant type vocabularies out to their own modules.
...
This is mainly for consistency with the other vocabs, in
case there are future modules that want to vocab without
the asset type (like we needed with Material Type). By
putting all vocabs in modules/taxonomy we make it easy to
quickly see all the vocabularies that farmOS provides in
both the file system and module list.
The one remaining exception is Crop Family, which is
included in the farm_plant_type module.
See https://www.drupal.org/project/farm/issues/3191115
2021-09-09 14:27:31 -04:00
Michael Stenta
2a52a82d4f
Fix hook_farm_api_meta_alter() documentation.
2021-09-09 14:27:31 -04:00
Michael Stenta
3d6161453f
Hide geometry field label in asset and log page top region.
2021-09-09 14:26:15 -04:00
Michael Stenta
7e67a71c06
Add some vertical padding to layout regions.
2021-09-09 14:26:15 -04:00
Michael Stenta
abd21f53b5
Put asset "Group membership" field in the second region.
2021-09-09 14:26:15 -04:00
Michael Stenta
c6112ff7f6
Add hook_farm_ui_theme_region_items() for defining asset, log, and plan content region items.
2021-09-09 10:24:44 -04:00
Michael Stenta
98aa8b5ee0
Use a stacked two-column layout for full asset, log, and plan pages.
2021-09-09 10:16:29 -04:00
Michael Stenta
1e3c018fe0
Fix map.js in farm_ui_theme.libraries.yml.
2021-09-06 16:08:36 -04:00
Michael Stenta
08c50d7fde
Fix TypeError: Argument 1 passed to Drupal\Core\Entity\EntityStorageBase::loadMultiple() must be of the type array or null, string given.
...
This error occurs if ?asset=X is used instead of ?asset[]=X.
We can take a more defensive approach by automatically
wrapping the input in an array if it isn't already one.
2021-09-06 11:00:51 -04:00
Michael Stenta
434b473e14
Move toolbar-toggle map resize event listener JS to farm_ui_theme.
2021-09-06 11:00:51 -04:00
Michael Stenta
99eb69434a
Install Gin via farm_ui_theme_install() instead of config/install.
2021-09-06 11:00:51 -04:00
Michael Stenta
453063f64b
Install all blocks to Claro theme by default.
2021-09-06 11:00:51 -04:00
Michael Stenta
e4c35aca19
Set $defaultTheme to stark in all WebDrivcerTestBase tests.
2021-09-06 11:00:51 -04:00
Michael Stenta
b49441efe4
Set $defaultTheme to stark for all descendants of FarmBrowserTestBase.
2021-09-06 10:46:20 -04:00
Symbioquine
c92fe90985
Refactor most of farm_map.js into factory method #436
...
**Why?** Allow JS in contrib modules to take advantage of
now decoupled map instantiation code to create canonically
extensible/styled maps where the life-cycle of those maps
is controlled by the contrib module JS code.
For example, a contrib module's controller can return;
```php
return [
'map-prototype' => [
'#type' => 'farm_map',
'#attributes' => [
'id' => 'example-tool-map-prototype',
'data-map-instantiator' => 'example-tool',
],
],
];
```
Then create map instances from custom JS like this;
```js
const mapPrototypeElement = document.getElementById('example-tool-map-prototype');
const mapElement = mapPrototypeElement.cloneNode();
mapElement.removeAttribute('id');
myParentContainer.appendChild(mapElement);
const mapInstance = Drupal.behaviors.farm_map.createMapInstance(mapElement, mapElement, 'example-tool-map-prototype', {});
```
2021-09-03 15:20:26 -04:00
Symbioquine
6ce9ec2480
Reduce coupling between map element id and other logic #436
...
**Why?** There were a bunch of places where farmOS implicitly depends
on the id of the map element to look up settings and access the map
element after the map is instantiated.
This change makes it so there is only one place in the JS that depends
on the map id to dereference the drupalSettings and assign them under
`instance.farmMapSettings` so behaviors can access them.
2021-09-03 15:20:26 -04:00