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

  1. Validate that this a good idea.
  2. Validate we can do this with the current code-base.
  3. Mock user-interface.
  4. Code functionality, without touching current implementation (keep BC).

Comments

ndf created an issue. See original summary.

ndf’s picture

Issue summary: View changes
ndf’s picture

Issue summary: View changes
ndf’s picture

Status: Active » Needs review

Is this a good idea?
Can we make this with the current code-base?

NWOM’s picture

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

tempo22’s picture

I'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.

veroniqueg’s picture

I'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

NWOM’s picture

Status: Needs review » Active

Setting to "Active", since "Needs Review" is based on a submitted patch.

vmkazakoff’s picture

Just in case someone find this tread - this is possible with rules link module, if you need only several actions.