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
Symbioquine
9c94dab9db
Decouple FarmMap render element styling and JS instantiation #436
...
**Why?** It should be possible to leverage the farm_map
module's extension mechanism and default styling without
necessarily giving it full control over when the map
instance gets created.
Currently, the FarmMap render element uses the 'farm-map'
CSS class to inform the JS code in `farm_map.js` that it should
instantiate the map. This is problematic since that CSS class
is also used for styling and there's a bunch of code in the
FarmMap render element and in `farm_map.js` which should
be common to pretty much all farmOS maps.
To fix that, this change introduces a new [data attribute] which
is used instead of the CSS class to signal the JS code in `farm_map.js`
that it should actually instantiate the map.
[data attribute]: https://developer.mozilla.org/en-US/docs/Learn/HTML/Howto/Use_data_attributes
2021-09-03 15:20:26 -04:00
Michael Stenta
8f9123b975
Set popup behavior weight to -100.
...
...so that behaviors that use instance.popup.on()
(including asset_type_layers) don't need to worry
about setting their weight heavier.
2021-09-03 15:19:03 -04:00
Michael Stenta
fcf32771bd
Only show popups for features that have a name.
...
This fixes the annoying issue where a mostly-blank popup
appears while drawing shapes in Geofield widget.
2021-09-03 15:16:33 -04:00
Michael Stenta
37d10f738a
Add @see link to Issue #3230970 : Generalize KML importer to create any asset type
2021-09-01 23:21:37 -04:00
Michael Stenta
71db605a98
Merge geometries from multiple uploaded files together.
2021-09-01 22:47:08 -04:00
Michael Stenta
2b7408e87c
Support KMZ files in GeofieldWidget "Import geometry from uploaded files".
2021-09-01 22:47:08 -04:00
Michael Stenta
a01cc1a930
Change "Find using files field" to "Import geometry from uploaded files".
2021-09-01 22:47:08 -04:00
Michael Stenta
e2a1c112e4
Ensure field wrapper DOM ID is unique with Html::getUniqueId().
2021-09-01 22:47:08 -04:00
paul121
edc107d74a
Add warning messages.
2021-09-01 22:47:08 -04:00
paul121
c123e3d2b4
Disable the find using files field button until a file is uploaded.
2021-09-01 22:47:08 -04:00
paul121
299ff56ee0
Allow log and asset geometry to be populated from the file field.
2021-09-01 22:47:08 -04:00
paul121
ca13997d69
Add setting to farm_map_geofield field widget to support populating geometry from a form file field.
2021-09-01 22:47:08 -04:00
paul121
70ad63479d
Allow geojson and gpx file extensions.
2021-09-01 22:47:08 -04:00
Michael Stenta
261e957b1b
Do not reduce geometries after they have been combined with combineWkt().
...
Reducing changes a GeometryCollection of Polygons into a
MultiPolygon, which is not our intention in most cases.
If code needs a reduced geometry it can call the reduceWkt()
method intentionally.
2021-09-01 22:46:37 -04:00
Michael Stenta
41d3eac174
Move WktTrait to farm_geo module.
2021-09-01 22:46:37 -04:00
Michael Stenta
8c0d20d138
Remove unused $defaultFileScheme from KmlImporter.
2021-09-01 16:59:12 -04:00
Michael Stenta
950d666e56
Support KMZ files in KML importer.
2021-09-01 15:27:02 -04:00
Michael Stenta
ec24339bd3
Change KML content type to application/vnd.google-earth.kml+xml.
2021-09-01 15:27:02 -04:00
Michael Stenta
84e2e64f48
Add KML importer help text.
2021-09-01 15:27:02 -04:00
Michael Stenta
e293ca80bf
Hide KML importer output until submission.
2021-09-01 15:27:02 -04:00
Michael Stenta
45acc539a3
Add menu link for KML importer and depend on farm_import.
2021-09-01 15:27:02 -04:00
Michael Stenta
414b9e27ed
Change KML importer route to farm.import.kml.
2021-09-01 15:27:02 -04:00
Michael Stenta
5f81d46338
Add a /import page controller that displays all sub-menu items.
2021-09-01 15:27:02 -04:00
Michael Stenta
6487f394f0
Create a placeholder farm_import module.
...
This can be the future home of import-related support code.
CSV importers can be built here, or in sub-modules of this.
The KML importer can move here, and future importers for
GeoJSON and other formats may also be added.
2021-09-01 15:27:02 -04:00
Michael Stenta
3ea781aa42
Change KML importer form router path to import/kml.
2021-09-01 15:27:02 -04:00
Michael Stenta
64ba44c694
Move farm_kml_import module to farm_import_kml.
2021-09-01 15:27:02 -04:00
Michael Stenta
2303d9c14a
Expand ContentEntityGeometryNormalizer docblock.
2021-09-01 15:27:02 -04:00
Michael Stenta
08cb0edda8
The farm_kml_import module depends on farm_kml.
2021-09-01 15:27:02 -04:00
Michael Stenta
d37d801002
Rename ContentEntityNormalizer to ContentEntityGeometryNormalizer.
2021-09-01 15:27:02 -04:00
Michael Stenta
c0989179be
Move GeometryWrapper and ContentEntityNormalizer to farm_geo module.
2021-09-01 15:27:02 -04:00
Michael Stenta
38e8b9fcf3
Start a new farm_geo module for geospatial features that other modules can use.
2021-09-01 15:27:02 -04:00
Michael Stenta
633f3e2ac5
Add references to GeoPHP maintainer suggestions to create a Geometry wrapper object for storing non-geospatial properties.
2021-09-01 15:27:02 -04:00
Michael Stenta
8fff08df4e
Add entity type, bundle, and internal ID to KML.
2021-09-01 15:27:02 -04:00
Michael Stenta
0424fbbd84
Use UUIDs as the geometry ID property instead of Drupal internal ID.
2021-09-01 11:21:12 -04:00
paul121
8a1e640f32
Refactor KML to denormalize to a GeometryWrapper object.
2021-09-01 11:21:12 -04:00
paul121
297a227e92
Refactor the ContentEntityNormalizer to normalize from a GeometryWrapper object.
...
This allows the ContentEntityNormalizer to be supported by other
normalizers and encoders that support a format prefixed "geometry_".
2021-09-01 11:21:12 -04:00
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