Skip to content

Commit

Permalink
Merge branch '4.1' into 4
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Dec 3, 2024
2 parents 4bbf121 + da29c31 commit 0a69e04
Show file tree
Hide file tree
Showing 12 changed files with 92 additions and 46 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/add-prs-to-project.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Add new PRs to github project

on:
pull_request_target:
types:
- opened
- ready_for_review

permissions: {}

jobs:
addprtoproject:
name: Add PR to GitHub Project
# Only run on the silverstripe account
if: github.repository_owner == 'silverstripe'
runs-on: ubuntu-latest
steps:
- name: Add PR to github project
uses: silverstripe/gha-add-pr-to-project@v1
with:
app_id: ${{ vars.PROJECT_PERMISSIONS_APP_ID }}
private_key: ${{ secrets.PROJECT_PERMISSIONS_APP_PRIVATE_KEY }}
8 changes: 4 additions & 4 deletions .github/workflows/dispatch-ci.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
name: Dispatch CI

on:
# At 6:30 AM UTC, only on Monday and Tuesday
# At 2:10 PM UTC, only on Saturday and Sunday
schedule:
- cron: '30 6 * * 1,2'
- cron: '10 14 * * 6,0'

permissions: {}

jobs:
dispatch-ci:
name: Dispatch CI
# Only run cron on the colymba account
if: (github.event_name == 'schedule' && github.repository_owner == 'colymba') || (github.event_name != 'schedule')
# Only run cron on the silverstripe account
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
runs-on: ubuntu-latest
permissions:
contents: read
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/keepalive.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Keepalive

on:
# At 3:15 AM UTC, on day 16 of the month
# At 11:55 AM UTC, on day 28 of the month
schedule:
- cron: '15 3 16 * *'
- cron: '55 11 28 * *'
workflow_dispatch:

permissions: {}

jobs:
keepalive:
name: Keepalive
# Only run cron on the colymba account
if: (github.event_name == 'schedule' && github.repository_owner == 'colymba') || (github.event_name != 'schedule')
# Only run cron on the silverstripe account
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
runs-on: ubuntu-latest
permissions:
actions: write
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/merge-up.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
name: Merge-up

on:
# At 6:30 AM UTC, only on Friday
# At 2:10 PM UTC, only on Wednesday
schedule:
- cron: '30 6 * * 5'
- cron: '10 14 * * 3'
workflow_dispatch:

permissions: {}

jobs:
merge-up:
name: Merge-up
# Only run cron on the colymba account
if: (github.event_name == 'schedule' && github.repository_owner == 'colymba') || (github.event_name != 'schedule')
# Only run cron on the silverstripe account
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/tag-patch-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ permissions: {}
jobs:
tagpatchrelease:
name: Tag patch release
# Only run cron on the colymba account
if: (github.event_name == 'schedule' && github.repository_owner == 'colymba') || (github.event_name != 'schedule')
# Only run cron on the silverstripe account
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/update-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ name: Update JS

on:
workflow_dispatch:
# At 10:50 AM UTC, on day 1 of the month, only in March and September
# At 6:30 PM UTC, on day 1 of the month, only in March and September
schedule:
- cron: '50 10 1 3,9 *'
- cron: '30 18 1 3,9 *'

permissions: {}

jobs:
update-js:
name: Update JS
# Only run cron on the colymba account
if: (github.event_name == 'schedule' && github.repository_owner == 'colymba') || (github.event_name != 'schedule')
# Only run cron on the silverstripe account
if: (github.event_name == 'schedule' && github.repository_owner == 'silverstripe') || (github.event_name != 'schedule')
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down
30 changes: 10 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
# GridField Bulk Editing Tools

: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:

[![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)
[![License](https://poser.pugx.org/colymba/gridfield-bulk-editing-tools/license.svg)](#license-and-copyright)
[![CI](/~https://github.com/silverstripe/silverstripe-gridfield-bulk-editing-tools/actions/workflows/ci.yml/badge.svg)](/~https://github.com/silverstripe/silverstripe-gridfield-bulk-editing-tools/actions/workflows/ci.yml)
[![Silverstripe supported module](https://img.shields.io/badge/silverstripe-supported-0071C4.svg)](https://www.silverstripe.org/software/addons/silverstripe-commercially-supported-module-list/)

Set of SilverStripe CMS GridField components to facilitate bulk file upload & record editing.

## Components:
## Components

* [Bulk Upload](#bulk-upload): Upload multiple images or files at once into DataObjects
* [Bulk Manager](#bulk-manager): Delete, Unlink, Edit (and more) multiple records at once

Expand All @@ -19,18 +17,23 @@ composer require colymba/gridfield-bulk-editing-tools
```

## Bulk Upload

Upload multiple images or files at once into DataObjects. Perfect for galleries and the like.

```php
$config->addComponent(new \Colymba\BulkUpload\BulkUploader());
```

### 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);
```
Expand All @@ -40,24 +43,11 @@ Your `DataObject` should `own` the `Image`/`File` relation so it is published at
See [BULK_UPLOAD.md](docs/en/BULK_UPLOAD.md) for detailed configuration.

## Bulk Manager

Perform actions on multiple records straight from the GridField

```php
$config->addComponent(new \Colymba\BulkManager\BulkManager());
```

See [BULK_MANAGER.md](docs/en//BULK_MANAGER.md) for detailed configuration.

## Tooling
* `npm run watch` for development
* `npm run dist` before pushing to the repo

## 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.

## License and Copyright

[BSD 3-clause license](LICENSE)
11 changes: 7 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{
"name": "colymba/gridfield-bulk-editing-tools",
"type": "silverstripe-vendormodule",
"description": "SilverStripe GridField component to upload images/files and edit records in bulk",
"homepage": "/~https://github.com/colymba/GridFieldBulkEditingTools",
"description": "Silverstripe CMS GridField component to upload images/files and edit records in bulk",
"keywords": [
"silverstripe",
"bulk upload",
Expand All @@ -16,8 +15,12 @@
"homepage": "http://t-f.io"
},
{
"name": "GitHub contributors",
"homepage": "/~https://github.com/colymba/GridFieldBulkEditingTools/contributors"
"name": "SilverStripe",
"homepage": "http://silverstripe.com"
},
{
"name": "The SilverStripe Community",
"homepage": "http://silverstripe.org"
}
],
"require": {
Expand Down
17 changes: 17 additions & 0 deletions lang/eo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
eo:
GRIDFIELD_BULKMANAGER_EDIT_HANDLER:
CANCEL_BTN_LABEL: Nuligi
HEADER_TEXT: 'Redaktas {count} {class}'
SAVE_BTN_LABEL: 'Konservi ĉion'
SAVE_RESULT_TEXT: '{count} {class} sukcese konservita.'
TOGGLE_ALL_LINK: 'Vidigi/kaŝi ĉion'
GRIDFIELD_BULK_MANAGER:
ACTION_BTN_LABEL: Iri
ARCHIVE_SELECT_LABEL: Enarkivigi
COMPONENT_TITLE: 'Ŝanĝi elementojn unuope aŭ pliope.'
DELETE_SELECT_LABEL: Forigi
EDIT_SELECT_LABEL: Redakti
PUBLISH_SELECT_LABEL: Publikigi
SELECT_ALL_LABEL: 'Elekti ĉiujn'
UNLINK_SELECT_LABEL: Malligi
UNPUBLISH_SELECT_LABEL: Malpublikigi
1 change: 1 addition & 0 deletions lang/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ ru:
COMPONENT_TITLE: 'Редактировать одну или несколько записей одновременно'
DELETE_SELECT_LABEL: Удалить
EDIT_SELECT_LABEL: Редактировать
SELECT_ALL_LABEL: 'Выбрать все'
UNLINK_SELECT_LABEL: Отвязать
17 changes: 17 additions & 0 deletions lang/sl.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
sl:
GRIDFIELD_BULKMANAGER_EDIT_HANDLER:
CANCEL_BTN_LABEL: Prekliči
HEADER_TEXT: 'Urejanje {count} iz {class}'
SAVE_BTN_LABEL: 'Shrani vse'
SAVE_RESULT_TEXT: 'Uspešno shranjeno {count} iz {class} '
TOGGLE_ALL_LINK: 'Prikaži/skrij vse'
GRIDFIELD_BULK_MANAGER:
ACTION_BTN_LABEL: Sproži
ARCHIVE_SELECT_LABEL: Arhiviraj
COMPONENT_TITLE: 'Uredi enega ali več vnosov hkrati.'
DELETE_SELECT_LABEL: Izbriši
EDIT_SELECT_LABEL: Uredi
PUBLISH_SELECT_LABEL: Objavi
SELECT_ALL_LABEL: 'Izberi vse'
UNLINK_SELECT_LABEL: Odpni
UNPUBLISH_SELECT_LABEL: 'Umakni iz objave'
4 changes: 0 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
],
"author": "Thierry Francois",
"license": "BSD-3-Clause",
"bugs": {
"url": "/~https://github.com/colymba/GridFieldBulkEditingTools/issues"
},
"homepage": "/~https://github.com/colymba/GridFieldBulkEditingTools",
"dependencies": {
"core-js": "^3.26.0"
},
Expand Down

0 comments on commit 0a69e04

Please sign in to comment.