We use VBO as the default method to provide user-friendly admin interfaces.
Multiple times we were asked if it might be possible to render the action-buttons on every row.
Yes, this means that 'bulk-operation' becomes 'single-operation'.
Unless there are lots of possible operations this clears up the interface and makes it more straight forward what will happen.
Alternatives...
I investigated a lot of alternative options for this type of UI, but there does not seem to be an alternative. We tried:
Page_manager + views-custom field
Custom callbacks: a page_manager endpoint with validation that fires a rules-component, token-replacement in a Views-field to render the link.
This is kinda configurable, but it's a lot of work, needs (too much) extra modules. Also prone for errors.
Custom Views plugins
Custom views-plugins that render the link/button. That again fires a rules-component.
Very difficult to create and therefore hard to maintain when changes are asked.
Most of the custom code is boilerplate and validation.
Proposal
Add option Render operations in Views Field
in Bulk operations settings > Display operations as
form.
If this option is chosen these options can be dropped or get a default 'single' value:
- Enable 'select all items on all pages' not relevant
- Make the whole row clickable breaks separate button UI
- Force single should default to TRUE
- Number of entities to load at once not relevant
- Skip batching <em>probably</em>not relevant
Tasks
- Validate that this a good idea.
- Validate we can do this with the current code-base.
- Mock user-interface.
- Code functionality, without touching current implementation (keep BC).
Comments
Comment #2
ndf CreditAttribution: ndf commentedComment #3
ndf CreditAttribution: ndf commentedComment #4
ndf CreditAttribution: ndf commentedIs this a good idea?
Can we make this with the current code-base?
Comment #5
NWOM CreditAttribution: NWOM commentedThe other advantage to this approach, is that you can hide the VBO field and show it as a link within the Views Contextual Link dropdown, essentially replacing the old VBO Context Menu module. I'm definitely a fan if it would support Contextual Links.
Comment #6
tempo22 CreditAttribution: tempo22 commentedI'm also awaiting this feature.
I have found a sandbox project who seem to allow this : https://www.drupal.org/sandbox/jamesharv/1843622
The project is a bit old and may require some updates.
Comment #7
veroniqueg CreditAttribution: veroniqueg commentedI'm interested in this, thanks for pointing to the vro module.
I updated it to fix the bugs I had here https://www.drupal.org/node/2817209
I think it could be interesting to add the feature to vbo instead of having another module with a lot of code in common
Comment #8
NWOM CreditAttribution: NWOM commentedSetting to "Active", since "Needs Review" is based on a submitted patch.
Comment #9
vmkazakoff CreditAttribution: vmkazakoff commentedJust in case someone find this tread - this is possible with rules link module, if you need only several actions.