Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make it easier for modules to add new batch actions #1805

Open
jajm opened this issue Jan 18, 2022 · 2 comments
Open

Make it easier for modules to add new batch actions #1805

jajm opened this issue Jan 18, 2022 · 2 comments
Assignees
Labels

Comments

@jajm
Copy link
Contributor

jajm commented Jan 18, 2022

On the admin "browse" pages, there is a dropdown list of batch actions (edit/delete all/selected).
It would be great if modules would be able to add their own batch actions there.
It is already possible to use the view.browse.before event to achieve that, but it feels a bit "hacky", especially if several modules add their own actions that way.

Are you (or someone else) working on something like that ? Would you accept a pull request for this feature ?

@Daniel-KM
Copy link
Contributor

I pushed a pull request some years ago (#1260) to avoid to override the default js, so it was possible simpler. Currently, I use a js that bypass this point, like in module Contribute. Nevertheless, the pr was missed and an event may be another good solution. Maybe we'll have an answer when Omeka team will come back from holidays.

@zerocrates
Copy link
Member

I'm open to having a simple option for modules to add to the dropdown choices here.

My main question is, is just having that sufficient to be useful? It seems like you'd need custom JS floating around anyway to actually get at the selections and submit. Daniel's prior PR code tries to address this somewhat by bringing some structure to our built-in options that new ones can also take advantage of...

It seems to me that a useful version of this feature would require both a server or client event (or configuration) for modules to hook into, as well as changes along those lines, so modules aren't adding dropdown entries and buttons and scripting to hide/show/replace the buttons just to get this to work. My thinking is something like an array of labels associated with target actions? And then an event or config to modify that array of batch options would be pretty simple to add.

The delete operations work differently already, though, so we'd want to either accomodate them in such a system or just change them to work in the same way as the other actions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants