4 * Override or insert variables into the maintenance page template.
6 function seven_preprocess_maintenance_page(&$vars) {
7 // While markup for normal pages is split into page.tpl.php and html.tpl.php,
8 // the markup for the maintenance page is all in the single
9 // maintenance-page.tpl.php template. So, to have what's done in
10 // seven_preprocess_html() also happen on the maintenance page, it has to be
12 seven_preprocess_html($vars);
16 * Override or insert variables into the html template.
18 function seven_preprocess_html(&$vars) {
19 // Add conditional CSS for IE8 and below.
20 drupal_add_css(path_to_theme() .
'/ie.css', array('group' => CSS_THEME
, 'browsers' => array('IE' => 'lte IE 8', '!IE' => FALSE
), 'weight' => 999, 'preprocess' => FALSE
));
24 * Override or insert variables into the page template.
26 function seven_preprocess_page(&$vars) {
27 $vars['primary_local_tasks'] = $vars['tabs'];
28 unset($vars['primary_local_tasks']['#secondary']);
29 $vars['secondary_local_tasks'] = array(
30 '#theme' => 'menu_local_tasks',
31 '#secondary' => $vars['tabs']['#secondary'],
36 * Display the list of available node types for node creation.
38 function seven_node_add_list($variables) {
39 $content = $variables['content'];
42 $output = '<ul class="admin-list">';
43 foreach ($content as
$item) {
44 $output .
= '<li class="clearfix">';
45 $output .
= '<span class="label">' .
l($item['title'], $item['href'], $item['localized_options']) .
'</span>';
46 $output .
= '<div class="description">' .
filter_xss_admin($item['description']) .
'</div>';
52 $output = '<p>' .
t('You have not created any content types yet. Go to the <a href="@create-content">content type creation page</a> to add a new content type.', array('@create-content' => url('admin/structure/types/add'))) .
'</p>';
58 * Overrides theme_admin_block_content().
60 * Use unordered list markup in both compact and extended mode.
62 function seven_admin_block_content($variables) {
63 $content = $variables['content'];
65 if (!empty($content)) {
66 $output = system_admin_compact_mode() ?
'<ul class="admin-list compact">' : '<ul class="admin-list">';
67 foreach ($content as
$item) {
68 $output .
= '<li class="leaf">';
69 $output .
= l($item['title'], $item['href'], $item['localized_options']);
70 if (isset($item['description']) && !system_admin_compact_mode()) {
71 $output .
= '<div class="description">' .
filter_xss_admin($item['description']) .
'</div>';
81 * Override of theme_tablesort_indicator().
83 * Use our own image versions, so they show up as black and not gray on gray.
85 function seven_tablesort_indicator($variables) {
86 $style = $variables['style'];
87 $theme_path = drupal_get_path('theme', 'seven');
88 if ($style == 'asc') {
89 return theme('image', array('uri' => $theme_path .
'/images/arrow-asc.png', 'alt' => t('sort ascending'), 'width' => 13, 'height' => 13, 'title' => t('sort ascending')));
92 return theme('image', array('uri' => $theme_path .
'/images/arrow-desc.png', 'alt' => t('sort descending'), 'width' => 13, 'height' => 13, 'title' => t('sort descending')));
97 * Implements hook_css_alter().
99 function seven_css_alter(&$css) {
100 // Use Seven's vertical tabs style instead of the default one.
101 if (isset($css['core/misc/vertical-tabs.css'])) {
102 $css['core/misc/vertical-tabs.css']['data'] = drupal_get_path('theme', 'seven') .
'/vertical-tabs.css';
104 if (isset($css['core/misc/vertical-tabs-rtl.css'])) {
105 $css['core/misc/vertical-tabs-rtl.css']['data'] = drupal_get_path('theme', 'seven') .
'/vertical-tabs-rtl.css';
107 // Use Seven's jQuery UI theme style instead of the default one.
108 if (isset($css['core/misc/ui/jquery.ui.theme.css'])) {
109 $css['core/misc/ui/jquery.ui.theme.css']['data'] = drupal_get_path('theme', 'seven') .
'/jquery.ui.theme.css';