Download & Extend

Hide operations selector if no operation available

Project:Views Bulk Operations (VBO)
Version:6.x-1.x-dev
Component:Actions
Category:feature request
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

When there's no operation available, e. g. restricted by action permissions, the bulk operation drop down, shouldn't show up. Currently you just have one entry "Choose an operation", but nothing else.

Further I moved the single operation to the top, like the selector. I think this is more intuitive to users, as they might not want to scroll down.

AttachmentSize
vbo-hide-empty-operations.patch4.47 KB

Comments

#1

Status:needs work» needs review

Change status

#2

Status:needs review» needs work

Hiding the drop down without explanation would confuse users as much or more than an empty selector. IMO there could be a message instead of the drop down saying something like "No operations found".

Re: moving the single operation to the top, that's already implemented in the latest dev.

#3

Title:Hide operations selector if no operation available & move single operation to top» Hide operations selector if no operation available
Category:bug report» feature request

Renaming title to main issue.

#4

I agree with gnindl and appreciate the patch; I have a view that has role-based bulk operations, and some roles do not have access to those operations. Rather than giving someone a message that they don't have access to any roles or maintaining two, essentially duplicate versions of the same view, it's better to not show the options at all.

As a compromise, make it an option:

  • Hide VBO form if no operations are available
  • Show VBO form and status message if no operations are available: _____ (default status message: 'No operations are available')
  • Show VBO form even if no operations are available (this is the current default).

#5

Hello Guys....!
I am also facing same problem.
Like FluxSauce ... I want to show VBO only to Admin & editor role .
I don't want show drop-down to normal users.

How to achieve this in correct manner ("the drupal way")

AttachmentSize
vbo.JPG 36.58 KB

#6

The patch in the original post needs to be rerolled to include infojunkie's feedback from #2. That's the "drupal way"

#7

Status:needs work» needs review

A) I removed the code for moving a single operation to the top as it has been done in elsewhere

B) IMHO a message like "No operations found" would be very confusing for an END USER (If there are no operations available why the heck should you display anything?). It's just irritating. I see that it would be confusing for and administrator or developer if no message is displayed (module not enabled, code not working etc.). I think the end user's requirements should take precedence. Further I don't think showing an empty selector is a best practice for UX design.

AttachmentSize
vbo-hide-empty-operations-v2-2.12-patched1.patch 3.28 KB

#8

I'm having the same problem in drupal 7

#9

Status:needs review» needs work

The patch in #7 is working well, but now we get a series of checkboxes that do nothing - since the action drop-down has been removed. I don't think that's good UX because the user is confused as to whether the actions are intentionally hidden or he's seeing a bug.

The comment in #5 hints that maybe the view should revert to a normal table style if there are no actions. Or just remove the checkboxes column.