function theme_views_ui_view_info in Views (for Drupal 7) 7.3
Same name and namespace in other branches
- 8.3 views_ui/theme/theme.inc \theme_views_ui_view_info()
Theme function; returns basic administrative information about a view.
TODO: template + preprocess.
1 theme call to theme_views_ui_view_info()
- views_ui::list_build_row in plugins/
export_ui/ views_ui.class.php - Build a row based on the item.
File
- includes/
admin.inc, line 827 - Provides the Views' administrative interface.
Code
function theme_views_ui_view_info($variables) {
$view = $variables['view'];
$title = $view
->get_human_name();
$displays = _views_ui_get_displays_list($view);
$displays = empty($displays) ? t('None') : format_plural(count($displays), 'Display', 'Displays') . ': ' . '<em>' . implode(', ', $displays) . '</em>';
switch ($view->type) {
case t('Default'):
default:
$type = t('In code');
break;
case t('Normal'):
$type = t('In database');
break;
case t('Overridden'):
$type = t('Database overriding code');
break;
}
$output = '';
$output .= '<div class="views-ui-view-title">' . check_plain($title) . "</div>\n";
$output .= '<div class="views-ui-view-displays">' . $displays . "</div>\n";
$output .= '<div class="views-ui-view-storage">' . $type . "</div>\n";
$output .= '<div class="views-ui-view-base">' . t('Type') . ': ' . check_plain($variables['base']) . "</div>\n";
return $output;
}