function sgrid_views_pre_render in Sortable Grid Views Plugin 6
Same name and namespace in other branches
- 7 sgrid.views.inc \sgrid_views_pre_render()
File
- ./
sgrid.views.inc, line 69 - sgrid.views.inc Views include file for Sortable Grid module
Code
function sgrid_views_pre_render(&$view) {
// Is the style of the current display is ours, we need our form
if ($view->style_plugin->definition['handler'] == 'views_plugin_style_sgrid') {
if (user_access('sort Sortable Grid Views')) {
$view->attachment_after = drupal_get_form('form_save_order', $view->name . '_' . $view->current_display);
}
// We also need to add our sortable class to the view
$view->display_handler
->set_option('css_class', 'sortable');
}
}