function oa_core_views_pre_render in Open Atrium Core 7.2
Implements hook_views_pre_render().
File
- ./
oa_core.module, line 738
Code
function oa_core_views_pre_render(&$view) {
if ($view->name == 'oa_core_space_types') {
if (count($view->result) == 1) {
// If there is only one Space Blueprint, then we jump to it automatically.
$args = $_GET;
unset($args['q']);
drupal_goto('node/add/oa-space/' . $view->result[0]->tid, array(
'query' => $args,
));
}
elseif (user_access('administer taxonomy')) {
$view->attachment_before = '<p>' . t('Manage existing <em>Space Blueprints</em> or add new ones by <a href="!url">administrating the taxonomy</a>.', array(
'!url' => url('admin/structure/taxonomy/space_type'),
)) . '</p>';
}
}
}