Is table layout the only one supported?
kirilius - January 29, 2009 - 21:06
| Project: | Views Bulk Operations (VBO) |
| Version: | 6.x-1.x-dev |
| Component: | User interface |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | postponed |
Jump to:
Description
I have a grid view that displays thumbnails of images (a typical gallery page) and I would like to modify that view in order to add bulk operations and a check-box under each thumbnail. However it seems that the table (list) style is the only one available to Views Bulk Operations. Is there a way to add bulk operations and to keep the grid layout?

#1
There's isn't currently a way to support arbitrary display styles. This would require significant changes in VBO core, so unless there's lots of demand for it, or someone is willing to help out with the implementation, I won't have the ability to work on it soon.
#2
Thanks.
#3
#4
+1
#5
I'm trying to reuse VBO for end-user purposes, ie building views that let users do operations on nodes and users (eg sending mail to other users in a view). BTW, do you think this might be a bad idea? Most use-cases seem to be for administrative purposes.
Anyhow, we would like to keep the frontend of our site free from tables - so choosing another layout such as Unformatted would be nice. I just peeked into the code and noticed this...
// Render the view as table. Function from views/theme/theme.inc
template_preprocess_views_view_table($vars);
... in theme_views_node_selector(). Do you think there are many other dependencies in the VBO code if we want to change the style by calling template_preprocess_views_view_unformatted()?
Thanks,
Claes
#6
@Claes:
> BTW, do you think this might be a bad idea?
The VBO permission system should allow to safely expose this functionality to end-users. The actions_permissions module helps ensure that no unwanted actions are exposed to unprivileged users. In fact, I think VBO is already being used with end-users in some cases.
> Do you think there are many other dependencies in the VBO code if we want to change the style by calling template_preprocess_views_view_unformatted()?
Significantly, the plugin style class
views_bulk_operations_plugin_styleextendsviews_plugin_style_table. So changing the style will require extending the class of the desired style.Alternatively, you might want to consider another approach to implementing
class views_bulk_operations_plugin_style: extend the baseviews_plugin_styleclass and use the Composite pattern to instantiate the desired base plugin inside the new class, forwarding calls to it when necessary. This would even allow for VBO admins to choose which style should be extended for VBO.In any case, please keep me informed of your progress and I'd be glad to help.
#7
Ok, thanks for the feedback! We will probably have to stick with tables for the time being, I have too little time to work with this right now - a little baby here at home doesn't appreciate me coding PHP during the days ;-) This might change in the future though, and I'll let you know if I decide to give this a try.