paul121
ca548afd05
Provide a GeometryWrapper class.
2021-09-01 11:21:12 -04:00
paul121
376c607be8
Add KML import form.
2021-09-01 11:21:08 -04:00
paul121
dc32805c96
Add WKTGeometryNormalizer.
2021-09-01 11:10:15 -04:00
paul121
4ac98cf3b2
Add KML decoder.
2021-09-01 11:10:15 -04:00
paul121
3250f30da1
Init farm_kml_import module.
2021-09-01 11:10:15 -04:00
paul121
aeaafe06a9
Add KML as known request format.
2021-09-01 11:10:15 -04:00
paul121
d55c84da28
Provide normalizer and encoder to serialize content entities to KML.
2021-09-01 11:10:15 -04:00
paul121
4611c2e43f
Add Export KML action for log and asset entities.
2021-09-01 11:10:15 -04:00
paul121
83312641b5
Provide an EntityKML action.
2021-09-01 11:10:15 -04:00
paul121
7641151afb
Init farm_kml module.
2021-09-01 11:10:15 -04:00
Michael Stenta
48bd4f9f81
Prefix farm_map.settings router item path with a slash for consistency.
2021-09-01 11:10:15 -04:00
Michael Stenta
8f98db20b6
Use asset names helper function to generate log names when using the group/move actions.
2021-08-30 17:55:58 -04:00
Michael Stenta
835209e5a2
Add a helper function for generating truncated lists of asset names.
2021-08-30 17:55:58 -04:00
Michael Stenta
e08cb70650
Revert "Add groupOptions function to the group membership service."
...
This reverts commit 5dc7f53fab
.
2021-08-30 15:34:35 -04:00
Michael Stenta
0b7aa78c77
Use entity autocomplete widget for asset group action form.
2021-08-30 15:34:35 -04:00
Michael Stenta
79200cfc6a
Add a Group entity reference View.
2021-08-30 15:09:44 -04:00
Michael Stenta
c8089ee561
Do not limit log assign action user list to managed roles.
2021-08-30 14:35:00 -04:00
Michael Stenta
7fad319709
Add enforced dependency on farm_entity to asset_flag_action config.
2021-08-30 13:45:32 -04:00
Michael Stenta
d01189a99c
Use #date_part_order of year, month, day.
2021-08-30 13:45:32 -04:00
Michael Stenta
c741692eed
Use a date range of -15:+15 in asset group and move actions to match Log module.
2021-08-30 13:45:32 -04:00
Michael Stenta
4aa8fbdac2
Move logic to prepopulate the log asset field to the farm_log module.
2021-08-30 13:45:32 -04:00
Paul Weidner
c1bbba0f81
Check view and create access instead of update access for the Asset Clone action.
2021-08-30 13:45:32 -04:00
Paul Weidner
72e3397d3d
Use default date_year_range values.
2021-08-30 13:45:32 -04:00
Paul Weidner
142ecb1ed6
Only require view access to assets referenced by logs.
2021-08-30 13:45:32 -04:00
Paul Weidner
30b83735ba
Limit to log types the user has access to create.
2021-08-30 13:45:32 -04:00
Paul Weidner
8420246b0a
Do not require a location asset so the location can be reset.
2021-08-30 13:45:32 -04:00
Michael Stenta
deb768d99f
Check flag field edit access in EntityFlag action.
2021-08-30 13:45:32 -04:00
paul121
e8db19a9d9
Create asset_add_log action.
2021-08-30 13:45:32 -04:00
paul121
545a0b4bbd
Prepopulate the log asset field when creating new logs.
2021-08-30 12:28:51 -04:00
paul121
8dd7ecc88b
Only display active users that have a managed role in log assign form.
2021-08-30 12:28:51 -04:00
paul121
6d69b44df3
Create log_assign_action.
2021-08-30 12:28:51 -04:00
paul121
d01f511850
Create asset_move_action.
2021-08-30 12:28:51 -04:00
paul121
d65d344c66
Create asset_group_action.
2021-08-30 12:28:51 -04:00
paul121
5dc7f53fab
Add groupOptions function to the group membership service.
2021-08-30 12:28:51 -04:00
paul121
f7ce438a40
DeleteMultipleRouteProvider is deprecated.
2021-08-30 12:28:51 -04:00
paul121
5e4f66c896
Enable the flag action for asset log and plan entities.
2021-08-30 12:28:51 -04:00
paul121
b6f288f3cb
Provide an entity flag action.
2021-08-30 12:28:51 -04:00
paul121
cd10d8c00f
Add asset clone action.
2021-08-30 12:28:51 -04:00
Michael Stenta
b2f5349892
Add actions for archiving/activating assets and plans.
2021-08-30 12:28:51 -04:00
Michael Stenta
36fb583416
Do not show modules box if none are present.
2021-08-23 11:02:10 -04:00
Michael Stenta
ff1a2a2b8e
Move modules description text to help text.
2021-08-23 11:02:10 -04:00
Michael Stenta
be546a2fc5
Change "Contrib modules" to "Community modules".
2021-08-23 10:41:50 -04:00
Michael Stenta
1e2995f585
Add docblock for FarmSettingsModulesForm::moduleOptions().
...
This class no longer extends from FarmModulesForm, which
originally provided this documentation.
2021-08-23 10:39:14 -04:00
paul121
c68ae68ae9
Test installing a contrib module with uninstalled core dependency.
2021-08-23 10:05:54 -04:00
paul121
f7f1d07bae
Increase timeout for installing modules.
2021-08-23 10:05:54 -04:00
paul121
ca54455497
Add tests for the farm settings modules form.
2021-08-23 10:05:54 -04:00
paul121
b19f3c6342
Specify the submit button name.
...
This makes it easier to identify in tests.
2021-08-23 10:05:54 -04:00
Paul Weidner
23ebe88395
Add message if there are no contrib modules.
2021-08-23 10:05:54 -04:00
paul121
220c816fb9
Disable the submit button until an uninstalled module is checked.
2021-08-23 10:05:54 -04:00
paul121
d68ab9b61e
Change form title to read "Install modules".
2021-08-23 10:05:54 -04:00
paul121
bacafa9c0c
Allow contrib modules to be installed in the FarmSettingsModulesForm.
2021-08-23 10:05:54 -04:00
paul121
9d986a53ba
Refactor to use ModuleExtensionList instead of ModuleHandler.
2021-08-23 10:05:54 -04:00
paul121
3e37c5ad45
Refactor FarmSettingsModulesForm to not extend FarmModulesForm.
2021-08-23 10:05:54 -04:00
Symbioquine
825d37a729
Add weights to ensure map popup is behavior loaded before use #425
...
**Why?** In 1.x and 2.x prior to this change we were depending on
the insertion order in JS objects to make sure `instance.popup` got
populated before it is used. This change makes the order of the
behavior attachement deterministic - even with farmOS-map 2.x where
the behaviors get attached asynchronously.
2021-08-23 09:59:36 -04:00
Symbioquine
b33feb6293
Upgrade to farmOS-map 2.x #425
...
**Why?** farmOS-map 2.x provides a slightly cleaner
API and more modular/extensible behavior loading.
2021-08-23 09:59:36 -04:00
paul121
05fc28c432
Correct the log variable annotation comment.
2021-08-23 09:18:57 -04:00
paul121
10297d2aaf
Set the global farm_test flag before installing drupal.
2021-08-23 09:18:57 -04:00
paul121
9294c9b1ec
The farm_group_test test module is required.
2021-08-23 09:18:57 -04:00
paul121
a98e24046f
Move location API tests to a separate functional test.
...
The API requests are incompatible with the javascript test driver.
2021-08-23 09:18:57 -04:00
paul121
a592f6d6a5
Create a LocationFunctionalTestTrait that provides test setup logic.
2021-08-23 09:18:57 -04:00
paul121
40656df9b1
Correct namespace.
2021-08-23 09:18:57 -04:00
paul121
3f799c5adb
Fix method for finding fields with variable visibility.
...
Look for the fieldset wrapper instead of the actual field. This is
sufficient for testing visibility.
2021-08-23 09:18:57 -04:00
paul121
039012c124
WebDriver does not return status codes.
2021-08-23 09:18:57 -04:00
Symbioquine
a221c3189b
Add a Seed asset type.
2021-08-23 08:42:37 -04:00
Michael Stenta
9e9734c3f5
Include link to new assets and plans in confirmation message.
2021-08-03 09:11:51 -04:00
paul121
af0b086180
Use the getManagedRoles function to simplify loading of managed roles.
2021-07-30 15:30:40 -04:00
paul121
25d38173f8
Add getManagedRoles function to the managed role permissions manager
...
service.
2021-07-30 15:30:40 -04:00
paul121
b60d85db5e
Invalidate asset cache when movement logs are deleted.
2021-07-30 15:30:40 -04:00
Michael Stenta
313951c798
Move views.view.farm_asset_reference to optional config.
2021-07-30 12:40:41 -04:00
Michael Stenta
b8b3d8c5d0
Add a dependency on drupal:taxonomy to farm_entity module.
2021-07-27 09:34:43 -04:00
Michael Stenta
6c1af891be
Move default_quantity_type third-party setting and logic to farm_log_quantity.
2021-07-22 17:40:16 -04:00
Michael Stenta
f77ba74e2a
Move LogEventSubscriber for cleaning up log quantities to the farm_log_quantity module.
2021-07-22 17:40:16 -04:00
Michael Stenta
3b68509613
The farm_inventory_test module no longer needs to provide bundle plugin classes or a mock quantity field.
2021-07-22 17:40:16 -04:00
Michael Stenta
cdfe4dc5a4
Move log quantity base field definition to farm_log_quantity module.
...
The farm_inventory module had an implicit dependency on this
field, so by moving this out to its own module we can depend
on it explicitly without adding a dependency on farm_entity
as a whole.
2021-07-22 17:40:16 -04:00
Michael Stenta
119c996b0d
The farm_quantity_price module depends on farm_entity.
...
The fields it adds via the bundle class are used in its
template, and will only be available if farm_entity is
installed.
2021-07-22 17:40:16 -04:00
Michael Stenta
2c68f9ca2b
The farm_quantity_standard module depends on quantity, not farm_entity.
...
It does provide a plugin class that will be used in farm_entity
is enabled, but it doesn't have a hard dependency itself.
2021-07-22 17:40:16 -04:00
Michael Stenta
4259890f2c
Use CSS to show managed role permissions.
2021-07-22 17:39:52 -04:00
paul121
a006494486
Set the farm_client redirect to https://farmOS.app .
2021-07-22 17:38:37 -04:00
paul121
60735b1a43
Set a redirect when creating the farm client.
2021-07-22 17:38:37 -04:00
Michael Stenta
9ae8dbed32
Issue #3224684 : Allow managed roles access to entity revisions tab
2021-07-22 10:01:44 -04:00
paul121
2beac45df9
Add the Content-Disposition header to the list of allowed CORS headers.
...
This header is used to specify filenames when uploading files via API.
2021-07-13 16:43:17 -04:00
Michael Stenta
177c1b3f98
Set the default value of boolean Views filters to "All".
2021-06-24 18:22:41 -04:00
Michael Stenta
454e1fe2bf
Only display the first image in asset and group member Views.
2021-06-24 18:09:37 -04:00
Michael Stenta
8d66a98483
Remove @todo regarding plan and data_stream and alphabetize perms.
...
It's OK if managed roles have permissions that are not defined.
There's nothing more "todo" here.
2021-06-24 14:45:15 -04:00
paul121
835c8602c1
Use the contrib entity access and permission_provider handlers for the tag_type config entity.
2021-06-24 12:38:45 -04:00
paul121
95d020ea18
Use the contrib entity access and permission_provider handlers for the flag config entity.
2021-06-24 12:38:45 -04:00
paul121
cbc04d65f5
Use the contrib entity access and permission_provider handlers for the structure_type config entity.
2021-06-24 12:38:45 -04:00
paul121
54f2b4c0cf
Use the contrib entity access and permission_provider handlers for the land_type config entity.
2021-06-24 12:38:45 -04:00
paul121
cab9d25734
Add entity type view permissions for all managed farm roles.
2021-06-24 12:38:45 -04:00
paul121
06e922937a
Use the contrib entity access and permission_provider handlers for farm entity bundle entity types.
2021-06-24 12:38:45 -04:00
Michael Stenta
e8715bc3a2
Move dashboard land/structure type layer logic to farm_land and farm_structure modules in their own onMapRender event subscribers.
2021-06-23 10:37:40 -04:00
Michael Stenta
cbf107e825
Change dashboard map layer group label from "Location assets" to "Locations".
2021-06-23 09:29:05 -04:00
Michael Stenta
651f8a5895
Add land/structure sub-type layers to dashboard map, in their own layer groups.
2021-06-23 09:28:45 -04:00
Michael Stenta
6f5ca98c0a
Add support for pre-defining layer groups in the asset_type_layers behavior.
2021-06-23 09:28:00 -04:00
paul121
808d73b62c
Remove unused asset and plan page include files. #433
2021-06-23 07:47:56 -04:00
paul121
fe3324abee
Render the last_access value with the timestamp_ago formatter.
...
This formatter sets a correct cache max-age so that displayed values
are up to date.
2021-06-22 17:13:48 -04:00
paul121
42bd131784
Disable caching for the farm_people display.
2021-06-22 17:13:48 -04:00
paul121
ed51e6c906
Display "Never" if the user's last_access value is 0.
...
Enabling the "Count the number 0 as empty" option is not sufficient here
because a last_access value of 0 is converted to a timestamp on 1970.
This requires a rewrite to return 0 or the rendered date so that the
configured "No results behavior" are actually triggered.
2021-06-22 17:13:48 -04:00
Michael Stenta
f0bcc36491
Fix parent ID assignment in unit taxonomy term migrations.
...
Terms with parents were being assigned as their own parents (circular).
Updated it to be identical to the logic used in other term migrations.
2021-06-21 19:12:15 -04:00
Michael Stenta
1d2320355b
Issue #3219701 : Log migration of quantity reference Error: Unsupported operand types in SubProcess->transform()
2021-06-19 08:36:20 -04:00
Michael Stenta
dadb77e30f
Restore ID field (but hide it) in "upcoming" and "late tasks" log View displays to fix broken timestamp link.
2021-06-18 09:00:56 -04:00
paul121
b2f8b9a9a5
Add config:entity_type_list cache tag to rebuild metrics when the bundle list changes.
2021-06-17 15:37:06 -04:00
paul121
b2ad523037
Use the count() method to create aggregated entity count queries.
2021-06-17 15:37:06 -04:00
paul121
48e5b86d7d
Add condition to limit count to the bundle.
2021-06-17 15:37:06 -04:00
Michael Stenta
380796b4c8
Move FarmBrowserTestBase to a farm_test module.
2021-06-17 09:42:43 -04:00
Michael Stenta
1e73633e16
Display empty text in metrics block if no asset or log types exist.
2021-06-16 12:44:40 -04:00
paul121
5432134de0
Get entity counts with an entity aggregate query.
2021-06-15 18:11:57 -07:00
paul121
ed1ed131d2
Make class an array of multiple values.
2021-06-15 17:48:43 -07:00
paul121
f9e1140fb8
Build link to correct farm entity type page_type view.
2021-06-15 17:47:45 -07:00
paul121
d0be185d58
Append to the cache tags list.
2021-06-15 10:38:14 -07:00
paul121
23e9884260
Fix comment for stucture type field.
2021-06-14 14:15:25 -04:00
paul121
6be62e0d02
Remove unnecessary StringTranslationTrait import.
2021-06-14 14:15:25 -04:00
Pedro Cambra
26f55878cb
Map popup custom controller
2021-06-09 11:33:35 -04:00
Michael Stenta
1da9527d3d
Add flag CSS to maps so that flags in popups are styled.
2021-06-09 11:33:35 -04:00
Michael Stenta
d4d54927a7
Fix default view mode condition. $display->getMode() never returns "default". Instead load the view mode options by bundle to see if map_popup options are defined.
2021-06-09 11:33:35 -04:00
Michael Stenta
dbc2245d22
Add name and type to allowed default fields.
2021-06-09 11:33:35 -04:00
Michael Stenta
85efcaf324
Add a link to "View assets in this location", if the asset is a location.
2021-06-09 11:33:35 -04:00
Michael Stenta
bfcdcf4bbd
Add "View logs" to an array of links rendered as markup with a pipe separator.
2021-06-09 11:33:35 -04:00
Michael Stenta
a7f2ea885f
Hide more fields in map popups: group, id_tag, parent, season, status.
2021-06-09 11:33:35 -04:00
Michael Stenta
a7c5085876
Remove map_popup view modes for water assets.
2021-06-09 11:33:35 -04:00
paul121
3320662303
Remove the farm_powered block from the map_popup view mode template.
2021-06-09 11:33:35 -04:00
paul121
7894368f20
Add location field to map_popup view modes.
2021-06-09 11:33:35 -04:00
paul121
e7af56fe5f
Only display common fields on asset bundles that don't provide a map_popup view mode.
2021-06-09 11:33:35 -04:00
paul121
8df4b16772
Remove map_popup view modes for compost, group and sensor assets.
2021-06-09 11:33:35 -04:00
paul121
07416c6601
Remove birthdate, is_castrated, nickname and sex fields from animal asset map_popup view mode.
2021-06-09 11:33:35 -04:00
paul121
7ec99e10f2
Add link to view logs from the asset popup.
2021-06-09 11:33:35 -04:00
paul121
027adf68a2
Do not render asset urls as absolute urls.
2021-06-09 11:33:35 -04:00
paul121
fb995a061c
Ensure the popup is displayed inside the map.
2021-06-09 11:33:35 -04:00
paul121
9f7906d2c6
Render the asset map_popup view inside map popups.
2021-06-09 11:33:35 -04:00
paul121
8a1802ffd3
The asset_type_layers behavior depends on the popup behavior.
2021-06-09 11:33:35 -04:00
paul121
77102245f3
Add map_popup entity_view_display config for assets.
2021-06-09 11:33:35 -04:00
paul121
b1b30889cc
Render the asset map_popup view mode at /asset/*/map_popup
2021-06-09 11:33:34 -04:00
paul121
2ccf64541f
Create a map_popup view mode for assets.
2021-06-09 11:33:34 -04:00
paul121
0a94bbb6d9
Render the feature name as a link in popups if a url is provided.
2021-06-09 11:33:34 -04:00
paul121
1cb8e99928
Include a url property to view assets in the geojson export view.
2021-06-09 11:33:34 -04:00
Pedro Cambra
b628547d6e
Remove unnecessary injection from AssetReorderController.php
2021-06-09 11:32:58 -04:00
Michael Stenta
b3be5b0755
If the new revision log message matches the original, then set a blank message.
2021-06-09 11:01:32 -04:00
Michael Stenta
4f31aa9ed1
Always set the revision user ID.
2021-06-09 10:10:12 -04:00
paul121
2772a7bfe6
Fix farm_powered_by_block provider.
2021-06-08 22:38:09 -04:00
paul121
abb2dc72c7
Add schema for hideable_boolean field formatter.
...
Schema was missing which caused config inspector errors when creating
map_popup display config for assets. We didn't catch this before because
our default display mode is not saved in config.
2021-06-08 22:38:09 -04:00
Michael Stenta
1d8a0d1c21
Add some space between help text paragraphs via CSS.
2021-06-08 21:09:08 -04:00
Michael Stenta
05418f804b
Set $this->bundleInfo in FarmMetricsBlock.
2021-06-08 07:35:07 -04:00
paul121
0809f644d4
Add padding between id-tag field items.
2021-06-07 12:27:34 -04:00
paul121
68a06cbf01
Render the tag_type label.
2021-06-07 12:27:34 -04:00
paul121
bda93d4373
Add "id-tag__{property}" class to each div.
2021-06-07 12:27:34 -04:00
paul121
3bc1871e39
Render each ID tag property on a separate line.
2021-06-07 12:27:34 -04:00
Michael Stenta
975370b12c
Add the Metrics block to the dashboard's second region.
2021-06-07 12:17:04 -04:00
Michael Stenta
635e2d0309
Add a FarmMetricsBlock that includes asset and log record counts by type.
2021-06-07 12:17:04 -04:00
Michael Stenta
25b74d23cc
Initial farm_ui_metrics module.
2021-06-07 12:17:04 -04:00
Michael Stenta
0e1fdf3f94
Remove id and type from Upcoming/Late Tasks displays to reduce width of dashboard column.
2021-06-07 12:13:41 -04:00
Michael Stenta
e8299a7df9
Set overflow-x: scroll on dashboard layout regions to prevent bumping second column below first.
2021-06-07 12:13:41 -04:00
Michael Stenta
dff53dba7f
Add the dashboard map to the top region.
2021-06-07 12:13:41 -04:00
paul121
f43f4f1050
Define the plans and logs dashboard groups.
2021-06-07 12:13:41 -04:00
paul121
1e639cdd8c
Default the group #type to container if none was provided.
2021-06-07 12:13:41 -04:00
paul121
b66f0db401
Allow modules to define dashboard groups per layout region.
2021-06-07 12:13:41 -04:00
paul121
ae22af2c56
Display the plans pane in the second region.
2021-06-07 12:13:41 -04:00
paul121
03eb2a9918
Display log panes in the first layout region.
2021-06-07 12:13:41 -04:00
paul121
4091d7db01
Add padding between layout columns.
2021-06-07 12:13:41 -04:00
paul121
2633517aa6
Document layout region option.
2021-06-07 12:13:41 -04:00
paul121
5ca334cd6a
Render the dashboard using the layout_twocol layout.
2021-06-07 12:13:41 -04:00
paul121
9233882376
Depend on the core layout_discovery module.
2021-06-07 12:13:41 -04:00
Pedro Cambra
217da91e5a
Improve drag and drop behaviour
2021-06-07 11:53:59 -04:00
Michael Stenta
e1efdc3aba
Add location UI help text.
2021-06-07 11:06:16 -04:00
Michael Stenta
cdae05caa7
Move toggle link to a button inline with Save and Reset.
2021-06-07 11:06:16 -04:00
Michael Stenta
7a86c2f2fb
Fix locations overview tree so that it works without a root parent.
2021-06-07 11:06:16 -04:00
Michael Stenta
abb0f7944a
Remove unused use statements.
2021-06-07 07:53:16 -04:00
Michael Stenta
cf7d26f683
Do not include archived child locations.
2021-06-07 07:53:16 -04:00
Michael Stenta
5e0c22d0c5
Refactor getAssetChildren() into getLocations() because it is specifically child locations. Always return an array.
2021-06-07 07:53:16 -04:00
Michael Stenta
cfa6ac67bc
Add docblock for build() method.
2021-06-07 07:53:16 -04:00
Michael Stenta
cd7139f26e
Refactor access callback to forbid access if the asset is not a location or it has no child locations.
2021-06-07 07:51:29 -04:00
Michael Stenta
062d7ffc28
Add an "access locations overview" permission for /locations and /asset/%/locations.
...
Grant it to farmOS managed roles by default.
2021-06-07 07:51:29 -04:00
Michael Stenta
317efd01cd
Set the page title of asset/%/locations to "Locations in %location".
2021-06-07 07:51:28 -04:00
Michael Stenta
8cd89c8150
Hide "Children" tab on location assets.
2021-06-05 21:34:10 -04:00
Pedro Cambra
bf9258536f
Add toggle link and node links
2021-06-05 21:34:10 -04:00
Pedro Cambra
a42a9cc527
Removed location force revision as it will implemented more generally in https://www.drupal.org/project/farm/issues/3216766
2021-06-05 21:34:10 -04:00
Pedro Cambra
7e91f85c81
Added status to the save button
2021-06-05 21:34:10 -04:00
Pedro Cambra
511bd3771d
Force revision creation through json api
2021-06-05 21:34:10 -04:00
Pedro Cambra
7ab249b03c
Added route access so the location tab is not displayed if the asset has no children
2021-06-05 21:34:10 -04:00
Pedro Cambra
48e42a252c
Overwrite inspire tree config
2021-06-05 21:34:10 -04:00
Pedro Cambra
2926c85b5d
Renamed locations ui library to a more sensible name
2021-06-05 21:34:10 -04:00
Michael Stenta
26e1d2459c
Only load location assets in buildTree().
2021-06-05 21:34:09 -04:00
Michael Stenta
4ed3684202
Add a Locations link to the main farmOS menu.
2021-06-05 21:34:09 -04:00
Michael Stenta
a940116213
Move /asset-locations to /locations.
2021-06-05 21:34:09 -04:00
Michael Stenta
205984280e
Add docblock comments to buildTree() method so code sniffer tests pass.
2021-06-05 21:34:09 -04:00
Michael Stenta
4d631d7f38
Declare asset and log module dependencies in farm_location module.
2021-06-05 21:34:09 -04:00
Michael Stenta
3237a750c1
Move location hierarchy editor code to farm_ui_location.
2021-06-05 21:34:09 -04:00
Michael Stenta
fd3a511d0a
Create a new farmOS UI Location module.
2021-06-05 21:34:09 -04:00
pcambra
771c753518
First stub of the asset location hierarchy editor feature.
2021-06-05 21:34:09 -04:00
Michael Stenta
51562201ee
Move farm_dashboard to farm_ui_dashboard.
2021-06-05 21:34:09 -04:00
Michael Stenta
69638f33ec
Add a Farm UI Help module.
2021-06-05 16:56:15 -04:00
Michael Stenta
4d59cd69c7
Do not archive areas without an area type during migration.
2021-06-05 14:53:17 -04:00
Michael Stenta
5c6856fe0c
Add "Migrated from farmOS 1.x on [date]" revision log messages to migrated records.
2021-06-05 14:53:17 -04:00
pcambra
0f87c085ea
Issue #3216766 : Revisions are not supported on JSON API
2021-06-04 22:45:01 -04:00
Michael Stenta
e000ef821b
Include asset name in asset/%/children and asset/%/assets page titles.
2021-06-04 22:45:01 -04:00
Michael Stenta
00720477f2
Include asset name in asset/%/logs page title.
2021-06-04 22:18:20 -04:00
Michael Stenta
85e7815090
Enforce the integrity of entity references to data_stream and quantity entities.
2021-06-04 22:04:38 -04:00
paul121
8fb00a69f3
Ensure the table is joined.
2021-06-04 21:41:09 -04:00
paul121
25abf02a75
Simplify the where expression to not include the asset ID.
2021-06-04 21:41:09 -04:00
paul121
f2b3ffc07f
Include asset references via the log.location field in access check.
2021-06-04 21:41:09 -04:00
Paul Weidner
44fbca2491
Use the asset_or_location argument plugin for the page_asset display.
2021-06-04 21:41:09 -04:00
Paul Weidner
2f6f945efc
Add the asset_or_location as an available argument for the log_field_data views table.
2021-06-04 21:41:08 -04:00
Paul Weidner
6a14fe5809
Implement an asset_or_location views argument plugin.
2021-06-04 21:36:11 -04:00
Michael Stenta
238fb66b85
Ensure an empty array is not used in SQL WHERE IN ().
2021-06-04 21:28:18 -04:00
Michael Stenta
c41d943760
Only show "Children" tab if the asset has children.
2021-06-04 21:17:41 -04:00
Michael Stenta
187bd7abcb
Move all Views hooks to *.views.inc and *.views_execution.inc include files.
2021-06-04 21:17:41 -04:00
Michael Stenta
f88b58e0d0
Only show "Members" tab on group assets.
2021-06-04 21:17:01 -04:00
Michael Stenta
ef2481d544
Add a "Members" tab to asset pages that uses the Views contextual filter to show assets in the group.
2021-06-04 21:17:01 -04:00
Michael Stenta
390d69fe3e
Provide a Views argument handler for filtering assets by group.
2021-06-04 21:17:01 -04:00
Michael Stenta
bde8a08c85
Only show "Assets" tab on Location assets.
2021-06-04 21:15:25 -04:00
Michael Stenta
45cfc85608
Add an "Assets" tab to asset pages that uses the Views contextual filter to show assets in the location.
2021-06-04 21:15:25 -04:00
Michael Stenta
2ac1a0d41e
Provide a Views argument handler for filtering assets by location.
2021-06-04 21:15:25 -04:00
Michael Stenta
fda3f325ac
Add an isLocation() method to the asset.location service.
2021-06-04 21:15:25 -04:00
Michael Stenta
bab926b199
Reformat farm_location_views_data_alter() to make it easier to extend.
2021-06-04 21:13:30 -04:00
Michael Stenta
2849b5f9f4
Automated tests for GroupAssetLocation::getAssetsByLocation().
2021-06-04 21:12:37 -04:00
Michael Stenta
90fe4498a0
Add getAssetsByLocation() method to GroupAssetLocation.
2021-06-04 21:12:37 -04:00
Michael Stenta
ce152ddd31
Do not filter out archived assets - this should be the responsibility of downstream code.
2021-06-04 21:12:37 -04:00
Michael Stenta
f6aadf4cd7
Automated tests for getAssetsByLocation() method.
2021-06-04 21:12:37 -04:00
Michael Stenta
cc9e0a8a6c
Add a getAssetsByLocation() method to the asset.location service.
2021-06-04 21:12:37 -04:00
Michael Stenta
bd9f63bed7
Automated tests for getGroupMembers() method.
2021-06-04 21:10:41 -04:00
Michael Stenta
f68ec88102
Add a getGroupMembers() method to the group.membership service.
2021-06-04 16:07:40 -04:00
Michael Stenta
9f841e0183
Fix farm_ui_views RouteSubscriber docblock.
2021-06-04 16:07:40 -04:00
Michael Stenta
a860653c76
Fix AssetLocation @param $asset docblocks.
2021-06-04 14:49:03 -04:00
Paul Weidner
eae26e5e7f
Issue #3216789 : Remove the local task plugin definition for farm entity collection links.
2021-06-01 20:21:16 -04:00
Michael Stenta
d766578731
Sort the "Group" field before the "Location" field.
2021-05-27 14:59:33 -04:00
Michael Stenta
f9f3305260
Allow sorting a field before another field (default is after).
2021-05-27 14:59:33 -04:00
Michael Stenta
9adf6ea30e
Set $preserve_keys argument to TRUE in both array_slice() calls.
2021-05-27 14:59:33 -04:00
Michael Stenta
596b8c8959
Split Views field sorting logic out to a helper function.
2021-05-27 14:59:33 -04:00
Michael Stenta
bc60a2b76b
Add the computed "Group" field to asset Views.
2021-05-27 14:59:33 -04:00
Michael Stenta
d7023002c4
Reformat farm_group_views_pre_view() to accommodate more logic.
2021-05-27 14:59:33 -04:00
Michael Stenta
58ced4cdb3
Expose the computed "group" asset field to Views.
2021-05-27 14:59:33 -04:00
Michael Stenta
0eff167220
Override the "collection" link path for assets, logs, and plans to use the Views provided by farm_ui_views.
2021-05-27 13:01:10 -04:00
Michael Stenta
b27419ea68
Add EXIF Orientation module.
2021-05-26 12:33:26 -04:00
Michael Stenta
360e133164
Add Birth log type and migration.
2021-05-26 12:19:05 -04:00
paul121
76d6370fb3
Only return access result allowed or access result neutral.
2021-05-21 12:33:04 -07:00
paul121
a2cb3b26ab
Add the log_list:bundle cache tag to the access result.
2021-05-21 10:56:25 -07:00
paul121
838cd33c15
Use entity aggregate query to get log counts.
2021-05-21 10:56:21 -07:00
paul121
08fba9b13e
Remove unnecessary service argument.
2021-05-21 09:20:03 -07:00
Michael Stenta
5df960aab6
Fix Notice: Undefined index: region in farm_ui_views_add_bundle_handlers().
2021-05-20 18:40:13 -04:00
Michael Stenta
03deaec1a1
Adapt hook_views_pre_view() and hook_views_pre_render() logic to work with page_asset display.
2021-05-20 18:39:35 -04:00
Michael Stenta
3623072fa9
Only show tabs for log types that have query results.
2021-05-20 18:39:35 -04:00
Michael Stenta
6856438e71
Add tabs for each log type.
2021-05-20 18:39:35 -04:00
Michael Stenta
975ac415d5
Add a Logs tab to asset pages that shows all logs.
2021-05-20 17:47:36 -04:00
Michael Stenta
8f5b1ec82d
Add an "Asset reference (page)" display to farm_log View for logs that reference an asset.
2021-05-20 17:47:36 -04:00
Michael Stenta
16a64f9b4e
Add @see FarmQuantityViewsMenuLink to FarmViewsMenuLink.
2021-05-20 17:47:36 -04:00
Michael Stenta
2309a0296d
Set weight of "Children" tab to 50.
2021-05-20 17:47:36 -04:00
Michael Stenta
dcedf0c083
Add enforced dependency on farm_plant to all of its installed config.
2021-05-20 17:47:36 -04:00
paul121
05cbfdc34f
Don't add fields or filters for "hidden" bundle fields.
2021-05-20 17:31:59 -04:00
paul121
9ce8e65617
Reverse the bundle fields array to preserve the original field order.
2021-05-20 17:31:59 -04:00
paul121
38100c1f8b
Add bundle-specific views fields in between other columns.
2021-05-20 17:31:59 -04:00
paul121
292d46878a
Create reverse relationships for ER bundle fields after they are installed.
2021-05-20 17:31:59 -04:00
paul121
2c89b25a69
Fix file field handler.
2021-05-08 14:26:41 -07:00
paul121
af805d4502
Extend from QuantityViewsData for quantity entities.
2021-04-21 14:26:25 -04:00
Michael Stenta
0ce20b9916
Add unit_quantity_value field to the quantity__unit_quantity views data table.
2021-04-21 14:26:25 -04:00
paul121
3116777ca4
Add unit_price_value field to the quantity__unit_price views data table.
2021-04-21 14:26:25 -04:00
paul121
e4034a696a
Render timestamp fields in the html_date format.
2021-04-21 14:26:25 -04:00
paul121
5bf9a605fc
Exposed string fields use the contains operator.
2021-04-21 14:26:25 -04:00
paul121
719668844d
Use a multi-select field for exposed taxonomy_term reference filters.
2021-04-21 14:26:25 -04:00
paul121
3c5dc06539
Do not render a link to referenced taxonomy terms.
2021-04-21 14:26:25 -04:00
paul121
78a50470e8
Do not set an ID when adding views handlers.
2021-04-21 14:26:25 -04:00
paul121
bf3f97d984
Add log_category exposed filter to farm_log views.
2021-04-21 14:26:25 -04:00
paul121
7358e4d64c
Extend entity views data to configure the correct filter for all taxonomy_term reference fields.
2021-04-21 14:26:23 -04:00
paul121
eed6503455
Add bundle plugin for movement log type used in tests.
2021-04-21 08:21:02 -04:00
paul121
6642f2bc08
Add bundle plugins for asset types used in tests.
2021-04-21 08:21:02 -04:00
paul121
5136e378e5
Remove todo referencing issue #3197363 .
...
This should have been listed above the next code block.
2021-04-21 08:21:02 -04:00
paul121
ec5156876f
Update the map size when the map's field wrapper display state changes.
2021-04-21 08:21:02 -04:00
paul121
85e7449cb6
Render the intrinsic_geometry form field below is_fixed in forms.
2021-04-21 08:21:02 -04:00
paul121
014bea7e5c
Hide the intrinsic_geometry field in asset forms if is_fixed is unchecked.
2021-04-21 08:21:01 -04:00
paul121
88a975d9cc
Add test for group field visibility.
2021-04-21 07:03:58 -04:00
paul121
294aa639e4
Hide the group field in log forms if is_group_assignment is unchecked.
2021-04-21 07:03:58 -04:00
paul121
683019cd7a
Render the is_group_assignment filter before the status filter.
2021-04-21 07:03:58 -04:00
paul121
c456697e89
Add is_group_assignment exposed filter to farm_log views.
2021-04-21 07:03:58 -04:00
paul121
e82ac54474
Allow access to the view label operation on bundle entity types.
2021-04-20 09:22:02 -07:00
paul121
f4c8a7116e
Do not display the entity type field in entity forms.
2021-04-20 09:21:59 -07:00
paul121
7668715633
Add page view of asset children in the Children tab.
2021-04-19 13:34:00 -04:00
Michael Stenta
ef2b36790d
Adjust plant and animal bundle field view display weights.
2021-04-19 13:25:55 -04:00
paul121
0042e53bc2
Add entity type field to entity view pages.
2021-04-19 13:16:16 -04:00
paul121
1828edfb91
Grant access farm_asset entity browser pages to all managed roles.
2021-04-19 13:06:40 -04:00
Michael Stenta
2e43c1a7f2
Remove old color config, logic, and schema.
2021-04-16 08:09:27 -04:00
Michael Stenta
709e8daa02
Refactor asset type and land/structure type layer color logic to use layer style definitions.
2021-04-16 07:47:25 -04:00
Michael Stenta
e569f74918
Provide a layer style loader service for loading styles based on conditions.
2021-04-16 07:46:59 -04:00
Michael Stenta
7f5050681f
Create a simple LayerStyle config entity for creating map layer style definitions.
2021-04-16 07:39:13 -04:00
Michael Stenta
69d9d88714
Add a color property to structure types.
2021-04-14 08:57:21 -04:00
Michael Stenta
6a57e282bd
Add a color property to land types.
2021-04-14 08:57:21 -04:00
Michael Stenta
48bd659273
Set map layer colors for all asset types.
2021-04-14 08:57:21 -04:00
Michael Stenta
98ffd94b5a
Add a third-party setting for asset map layer color.
2021-04-14 08:57:21 -04:00
Michael Stenta
44f4767420
Fix caching of breadcrumbs.
2021-04-13 09:56:07 -04:00
Michael Stenta
595b6ff742
Translate breadcrumb links.
2021-04-13 09:53:45 -04:00
Michael Stenta
239467d123
Build breadcrumbs on asset/log/plan pages.
2021-04-09 07:20:21 -04:00
Michael Stenta
256deb62e6
Split asset layers into two groups: Assets and Location assets.
2021-04-08 19:34:03 -04:00
paul121
9d287f351c
Test multiple allowed origins.
2021-04-08 19:05:36 -04:00
paul121
8734e3d276
Add CORS headers for allowed origins configured on consumers.
2021-04-08 19:05:36 -04:00
paul121
08857be054
Add an allowed_origins string field to consumer entities.
2021-04-08 19:05:36 -04:00
paul121
2a9084c1e2
Only add bundle fields to the consumer entity.
2021-04-08 17:10:06 -04:00
paul121
a972ee23c2
Move map buttons to the top when focused.
...
Prevents surrounding control buttons from covering up the :focus
box-shadow. A position is required.
2021-04-08 16:36:16 -04:00
paul121
0274820b86
Override the geocoder input to work with Gin :focus box-shadow.
2021-04-08 16:36:16 -04:00
paul121
b63be44b98
Alphabetize library definitions.
2021-04-08 16:36:16 -04:00
paul121
e7978e89e8
Set the text color of map control buttons to match the SVG path fill color.
2021-04-08 16:36:16 -04:00
paul121
2c5a38dc6f
Issue #3207716 by paul121: Use BundleFieldDefinition for additional Consumer fields
2021-04-08 15:57:27 -04:00
Michael Stenta
2cfb5ba402
Remove popup dependency from asset_type_layers behavior.
2021-04-08 15:37:23 -04:00
Michael Stenta
930df73049
Revert "Add a setting to configure if the map popup behavior is enabled."
...
This reverts commit 19f8851543
.
2021-04-08 15:37:23 -04:00
Michael Stenta
c7ddaab912
Add land/structure type layers to land/structure asset Views.
2021-04-08 15:37:23 -04:00
Michael Stenta
a27225e383
Ensure that farm_ui_map's hook_views_pre_render() runs first.
2021-04-08 15:37:23 -04:00
Michael Stenta
76b46403f3
Add support for array parameters in asset_type_layers.js.
2021-04-08 15:37:23 -04:00
Michael Stenta
5ee898f819
Add bundle-specific exposed filters to the farm_asset_geojson View.
2021-04-08 15:37:23 -04:00
Michael Stenta
82a77648c8
Create a helper function for adding bundle-specific field and filter formatters.
2021-04-08 15:37:23 -04:00
Michael Stenta
9481dd7207
Only add a single asset cluster layer to maps.
...
When there are multiple cluster layers the meaning of the
numbers becomes less discernible. Setting different cluster
icon colors may improve this, but a single layer is simple
for now. The exposed and contextual type filter allows
limiting the cluster counts by type if necessary.
2021-04-08 15:37:23 -04:00
Michael Stenta
b4b19147a9
Allow multiple asset type contextual filters in farm_asset_geojson View.
2021-04-08 15:37:23 -04:00
Michael Stenta
a415eb0714
Refactor bundle filtering logic to take exposed type filter into account.
2021-04-08 15:37:23 -04:00
Michael Stenta
4f8583593a
Dynamically copy all exposed filters from farm_asset View to farm_asset_geojson Views.
...
This allows the map on /assets/% to be filtered with the same
exposed filters as the farm_asset View itself.
2021-04-08 15:37:23 -04:00
Michael Stenta
33c47849b8
Remove logic for adding separate land/structure type layers.
...
This needs to be refactored/moved to the land/structure modules.
2021-04-08 15:37:23 -04:00
Michael Stenta
ce2a6304c8
Remove "Other locations" layer from dashboard.
2021-04-08 15:37:23 -04:00
Michael Stenta
fe95745153
Remove farmOS-map version from farm_map.libraries.yml.
...
We don't need to keep this up-to-date alongside the composer.json version constraint.
2021-04-08 15:37:23 -04:00
Michael Stenta
c82536d4d0
Move asset_type_layers behavior to farm_ui_map.
2021-04-08 15:37:23 -04:00
Michael Stenta
2e4d0bef1d
Move logic for disabling zoom when WKT is present to farm_ui_map.
2021-04-08 15:37:23 -04:00
Michael Stenta
83e6d3abfb
Add "all locations" layers to default and geofield maps via farm_ui_map instead of default behaviors.
2021-04-08 15:37:23 -04:00
Michael Stenta
b58f4f8b1a
Move dashboard map and block to farm_ui_map.
2021-04-08 14:59:39 -04:00
Michael Stenta
07b06b3a5f
Move subscriber logic for adding dashboard map asset layers to farm_ui_map.
2021-04-08 11:24:55 -04:00
Michael Stenta
746e189664
Split map logic out of farm_ui_views to a new farm_ui_map module.
2021-04-08 11:24:55 -04:00
Michael Stenta
f57cebd68f
Split Asset GeoJSON Views displays out to their own View provided by the farm_location module.
2021-04-08 11:24:55 -04:00
Michael Stenta
577f04fa0c
Patch Geofield to add support for centroid WKT in LatLon formatter (Issue #3207078 ), and remove custom geofield_centroid formatter.
2021-04-08 11:24:55 -04:00
paul121
19f8851543
Add a setting to configure if the map popup behavior is enabled.
2021-04-08 11:24:55 -04:00
paul121
848f271882
Add the asset_type_layers behavior to the asset_list map config.
2021-04-08 11:24:55 -04:00
paul121
d2d42f3811
Add an "Other locations" layer to the dashboard map.
2021-04-08 11:24:55 -04:00
paul121
a51c58185a
Add layers for location asset types to the dashboard map.
2021-04-08 11:24:55 -04:00
paul121
8b4e1eeb9f
Add cache tag on the map type.
2021-04-08 11:24:55 -04:00
paul121
7487a782e0
Remove redundant div.
2021-04-08 11:24:55 -04:00
paul121
e066abfd49
Zoom to WKT if it exists else zoom to all locations vectors.
2021-04-08 11:24:55 -04:00
paul121
b5a56381b4
Use array_replace_recursive to allow overriding of values.
2021-04-08 11:24:55 -04:00
paul121
dd423d2208
Dynamically add asset layers to the dashboard map.
2021-04-08 11:24:55 -04:00
paul121
42d1e75535
Add helper function to get the map target ID.
2021-04-08 11:24:55 -04:00
paul121
2baa65eeba
Display asset cluster layers in a separate layer group.
2021-04-08 11:24:55 -04:00
paul121
515352ef4e
Create a geojson feed of asset centroids. Change paths to be assets/geojson/{geom_type}/{asset_type}
2021-04-08 11:24:55 -04:00
paul121
e6f3ec7ece
Provide a centroid formatter to format geofield centroids as a WKT point.
2021-04-08 11:24:55 -04:00
paul121
0ad329e5fd
Add an All locations layer to default and geofield maps.
2021-04-08 11:24:55 -04:00
paul121
1383434df9
Do not default to the Assets layer group, make this optional.
2021-04-08 11:24:55 -04:00
paul121
fb09715727
Change asset geojson path to /assets/geojson/type and default to all.
2021-04-08 11:24:55 -04:00
paul121
214d9e9c1f
Recreate the exposed_filters array before creating each map layer.
2021-04-08 11:24:55 -04:00
paul121
191caffb52
Reverse layers array before adding to the map instance.
2021-04-08 11:24:55 -04:00
paul121
1178422f75
Create individual layers for land_type and structure_type assets.
2021-04-08 11:24:55 -04:00
paul121
bdfd2546c2
Add land_type and structure_type exposed filters to asset geojson display.
2021-04-08 11:24:55 -04:00
paul121
8cf638cd33
Allow the layer group to be specified.
2021-04-08 11:24:55 -04:00
paul121
325dec86a6
Render area assets on the dashboard map.
2021-04-08 11:24:55 -04:00
paul121
aa5e956717
Assemble geojson url client side.
2021-04-08 11:24:55 -04:00
paul121
ea235f2207
Render a map with asset geometries as an attachment before asset views.
2021-04-08 11:24:55 -04:00
paul121
7b17007e69
Create asset_list map type.
2021-04-08 11:24:55 -04:00
paul121
ced32098f6
Depend on farm_map.
2021-04-08 11:24:54 -04:00
paul121
5d1d7aa324
Provide an asset_type_layers map behavior.
2021-04-08 11:24:54 -04:00
paul121
90080daa90
Add geojson feed of asset geometry to the farm_assets view.
2021-04-08 11:24:54 -04:00
paul121
75ddc435b4
Add dependency on drupal/views_geojson to create views geojson feeds.
2021-04-08 11:24:54 -04:00
paul121
dc5dd3e2fa
Include the computed asset geometry field in views.
2021-04-08 11:24:54 -04:00