You are here

function template_preprocess_views_ui_display_tab_setting in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 8.3 views_ui/theme/theme.inc \template_preprocess_views_ui_display_tab_setting()

File

includes/admin.inc, line 1916
Provides the Views' administrative interface.

Code

function template_preprocess_views_ui_display_tab_setting(&$variables) {
  static $zebra = 0;
  $variables['zebra'] = $zebra % 2 === 0 ? 'odd' : 'even';
  $zebra++;

  // Put the main link to the left side.
  array_unshift($variables['settings_links'], $variables['link']);
  $variables['settings_links'] = implode('<span class="label">&nbsp;|&nbsp;</span>', $variables['settings_links']);

  // Add classes associated with this display tab to the overall list.
  $variables['classes_array'] = array_merge($variables['classes_array'], $variables['class']);
  if (!empty($variables['defaulted'])) {
    $variables['classes_array'][] = 'defaulted';
  }
  if (!empty($variables['overridden'])) {
    $variables['classes_array'][] = 'overridden';
    $variables['attributes_array']['title'][] = t('Overridden');
  }

  // Append a colon to the description, if requested.
  if ($variables['description'] && $variables['description_separator']) {
    $variables['description'] .= t(':');
  }
}