3
0
Fork 0
mirror of https://github.com/farmOS/farmOS.git synced 2024-02-23 11:37:38 +01:00
Commit graph

1796 commits

Author SHA1 Message Date
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
ddd05f8b23 Patch Drupal core to fix Issue #3134470: Switch to entity owner in EntityContentBase during validation 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
Michael Stenta
c4432b29e4 Set PHP upload limit and disable expose_php in Docker image #443 2021-09-14 19:24:19 -04:00
Michael Stenta
b3d62baf33 Set PHP expose_php to Off. 2021-09-14 14:44:15 -04:00
Michael Stenta
38fe21bdb2 Set PHP post_max_size and upload_max_filesize to 100M. 2021-09-14 14:43:54 -04:00
Symbioquine
698775d434 Update farmOS-map to v2.0.2 #442
**Why?** Pick up bug fixes relating to ol-side-panel and
the layer switcher in the side panel.
2021-09-13 09:20:59 -07: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
Michael Stenta
462f606625 Issue #3214097 by paul121: The file permissions could not be set on keys/*.key 2021-09-09 16:39:12 -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
Michael Stenta
929da330f4 Issue #3230933 by paul121: Use composer-merge-plugin to include farmOS-map instead of Asset Packagist 2021-09-09 15:13:55 -04:00
paul121
bec02f680e Update farmOS-map to v2.0.1. 2021-09-09 15:03:27 -04:00
paul121
73a4fdc529 Move farmOS-map composer dependency to composer.libraries.json. 2021-09-09 15:03:27 -04:00
Michael Stenta
dcd01c169f Issue #3187558 by paul121, m.stenta: Create action links to add logs from the asset view pages 2021-09-09 15:03:00 -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
c327472dc4 Move UI modules into core directory. 2021-09-09 14:27:31 -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
1ea5f0069e The Seed module depends on farm_plant_type, not farm_plant. 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
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
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
2a52a82d4f Fix hook_farm_api_meta_alter() documentation. 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
8febc54dc7 Merge branch '2.x-record-layout' into 2.x 2021-09-09 14:27:12 -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
345464c6ad Restrict new user registration via hook_install() instead of config/install. 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
Michael Stenta
118b448170 Decouple FarmMap render element and JS instantiation #436 2021-09-06 07:04:33 -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