2023-04-19 15:45:06 +12:00
# GridField Bulk Editing Tools
2019-11-12 09:27:52 +02:00
2023-04-19 15:45:06 +12:00
:warning: I haven't been able to give as much love as I would like to these repos as they deserve. If you have time and are interested to help maintain them, give me a shout. :rotating_light:
2014-10-01 12:29:38 +03:00
[![Latest Stable Version ](https://poser.pugx.org/colymba/gridfield-bulk-editing-tools/v/stable.svg )](https://github.com/colymba/GridFieldBulkEditingTools/releases)
[![Latest Unstable Version ](https://poser.pugx.org/colymba/gridfield-bulk-editing-tools/v/unstable.svg )](https://github.com/colymba/GridFieldBulkEditingTools/tree/master)
2018-02-01 13:40:23 +02:00
[![License ](https://poser.pugx.org/colymba/gridfield-bulk-editing-tools/license.svg )](#license -and-copyright)
2014-10-01 12:29:38 +03:00
2023-04-19 15:45:06 +12:00
Set of SilverStripe CMS GridField components to facilitate bulk file upload & record editing.
2013-12-05 19:42:17 +02:00
2014-10-01 12:29:38 +03:00
## Components:
2014-05-04 18:13:03 +03:00
* [Bulk Upload ](#bulk-upload ): Upload multiple images or files at once into DataObjects
2014-10-01 12:29:38 +03:00
* [Bulk Manager ](#bulk-manager ): Delete, Unlink, Edit (and more) multiple records at once
2013-12-05 19:42:17 +02:00
2012-07-18 02:27:28 +03:00
## Installation
2023-04-19 15:45:06 +12:00
```sh
composer require colymba/gridfield-bulk-editing-tools
```
2014-05-11 22:23:03 +03:00
2014-05-04 18:13:03 +03:00
## Bulk Upload
Upload multiple images or files at once into DataObjects. Perfect for galleries and the like.
2013-12-05 19:42:17 +02:00
2017-01-26 01:27:11 +13:00
```php
$config->addComponent(new \Colymba\BulkUpload\BulkUploader());
```
2013-12-05 19:42:17 +02:00
2018-03-02 11:36:15 +02:00
### Versioned
By default `BulkUploader` will write to the current stage (most likely Draft). To auto publish your `DataObject` , use the following param or config:
```php
$config->addComponent(new \Colymba\BulkUpload\BulkUploader(null, null, true));
```
OR
```php
$config->getComponentByType('Colymba\\BulkUpload\\BulkUploader')->setAutoPublishDataObject(true);
```
Your `DataObject` should `own` the `Image` /`File` relation so it is published at the same time: [See SilverStripe DataObject ownership DOC ](https://github.com/silverstripe/silverstripe-framework/blob/4.0/docs/en/02_Developer_Guides/00_Model/10_Versioning.md#dataobject-ownership )
2018-02-12 15:32:28 +02:00
See [BULK_UPLOAD.md ](docs/en/BULK_UPLOAD.md ) for detailed configuration.
2012-08-10 00:52:46 +03:00
2012-09-06 19:05:16 +03:00
## Bulk Manager
2013-12-05 19:42:17 +02:00
Perform actions on multiple records straight from the GridField
2017-01-26 01:27:11 +13:00
```php
$config->addComponent(new \Colymba\BulkManager\BulkManager());
```
2013-12-05 19:42:17 +02:00
2018-02-12 15:32:28 +02:00
See [BULK_MANAGER.md ](docs/en//BULK_MANAGER.md ) for detailed configuration.
2012-09-05 23:40:59 +03:00
2018-02-28 21:12:05 +02:00
## Tooling
* `npm run watch` for development
* `npm run dist` before pushing to the repo
2014-03-15 15:53:20 +02:00
## Translations
Translations of the natural language strings are managed through a third party translation interface, transifex.com.
Please use [https://www.transifex.com/projects/p/gridfieldbulkeditingtools/ ](https://www.transifex.com/projects/p/gridfieldbulkeditingtools/ ) to contribute translations, rather than sending pull requests with YAML/JS files.
2018-02-01 13:40:23 +02:00
## License and Copyright
2013-08-04 16:21:06 +03:00
2018-02-01 13:40:23 +02:00
[BSD 3-clause license ](LICENSE )