1 |
85ad3d82
|
Assos Assos
|
<?php
|
2 |
|
|
|
3 |
|
|
|
4 |
|
|
|
5 |
|
|
|
6 |
|
|
function seven_preprocess_maintenance_page(&$vars) {
|
7 |
|
|
|
8 |
|
|
|
9 |
|
|
|
10 |
|
|
|
11 |
|
|
|
12 |
|
|
seven_preprocess_html($vars);
|
13 |
|
|
}
|
14 |
|
|
|
15 |
|
|
|
16 |
|
|
|
17 |
|
|
|
18 |
|
|
function seven_preprocess_html(&$vars) {
|
19 |
|
|
|
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));
|
21 |
|
|
|
22 |
|
|
drupal_add_css(path_to_theme() . '/ie7.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 7', '!IE' => FALSE), 'weight' => 999, 'preprocess' => FALSE));
|
23 |
|
|
|
24 |
|
|
drupal_add_css(path_to_theme() . '/ie6.css', array('group' => CSS_THEME, 'browsers' => array('IE' => 'lte IE 6', '!IE' => FALSE), 'weight' => 999, 'preprocess' => FALSE));
|
25 |
|
|
}
|
26 |
|
|
|
27 |
|
|
|
28 |
|
|
|
29 |
|
|
|
30 |
|
|
function seven_preprocess_page(&$vars) {
|
31 |
|
|
$vars['primary_local_tasks'] = $vars['tabs'];
|
32 |
|
|
unset($vars['primary_local_tasks']['#secondary']);
|
33 |
|
|
$vars['secondary_local_tasks'] = array(
|
34 |
|
|
'#theme' => 'menu_local_tasks',
|
35 |
|
|
'#secondary' => $vars['tabs']['#secondary'],
|
36 |
|
|
);
|
37 |
|
|
}
|
38 |
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
|
42 |
|
|
function seven_node_add_list($variables) {
|
43 |
|
|
$content = $variables['content'];
|
44 |
|
|
$output = '';
|
45 |
|
|
if ($content) {
|
46 |
|
|
$output = '<ul class="admin-list">';
|
47 |
|
|
foreach ($content as $item) {
|
48 |
|
|
$output .= '<li class="clearfix">';
|
49 |
|
|
$output .= '<span class="label">' . l($item['title'], $item['href'], $item['localized_options']) . '</span>';
|
50 |
|
|
$output .= '<div class="description">' . filter_xss_admin($item['description']) . '</div>';
|
51 |
|
|
$output .= '</li>';
|
52 |
|
|
}
|
53 |
|
|
$output .= '</ul>';
|
54 |
|
|
}
|
55 |
|
|
else {
|
56 |
|
|
$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>';
|
57 |
|
|
}
|
58 |
|
|
return $output;
|
59 |
|
|
}
|
60 |
|
|
|
61 |
|
|
|
62 |
|
|
|
63 |
|
|
|
64 |
|
|
|
65 |
|
|
|
66 |
|
|
function seven_admin_block_content($variables) {
|
67 |
|
|
$content = $variables['content'];
|
68 |
|
|
$output = '';
|
69 |
|
|
if (!empty($content)) {
|
70 |
|
|
$output = system_admin_compact_mode() ? '<ul class="admin-list compact">' : '<ul class="admin-list">';
|
71 |
|
|
foreach ($content as $item) {
|
72 |
|
|
$output .= '<li class="leaf">';
|
73 |
|
|
$output .= l($item['title'], $item['href'], $item['localized_options']);
|
74 |
|
|
if (isset($item['description']) && !system_admin_compact_mode()) {
|
75 |
|
|
$output .= '<div class="description">' . filter_xss_admin($item['description']) . '</div>';
|
76 |
|
|
}
|
77 |
|
|
$output .= '</li>';
|
78 |
|
|
}
|
79 |
|
|
$output .= '</ul>';
|
80 |
|
|
}
|
81 |
|
|
return $output;
|
82 |
|
|
}
|
83 |
|
|
|
84 |
|
|
|
85 |
|
|
|
86 |
|
|
|
87 |
|
|
|
88 |
|
|
|
89 |
|
|
function seven_tablesort_indicator($variables) {
|
90 |
|
|
$style = $variables['style'];
|
91 |
|
|
$theme_path = drupal_get_path('theme', 'seven');
|
92 |
|
|
if ($style == 'asc') {
|
93 |
|
|
return theme('image', array('path' => $theme_path . '/images/arrow-asc.png', 'alt' => t('sort ascending'), 'width' => 13, 'height' => 13, 'title' => t('sort ascending')));
|
94 |
|
|
}
|
95 |
|
|
else {
|
96 |
|
|
return theme('image', array('path' => $theme_path . '/images/arrow-desc.png', 'alt' => t('sort descending'), 'width' => 13, 'height' => 13, 'title' => t('sort descending')));
|
97 |
|
|
}
|
98 |
|
|
}
|
99 |
|
|
|
100 |
|
|
|
101 |
|
|
|
102 |
|
|
|
103 |
|
|
function seven_css_alter(&$css) {
|
104 |
|
|
|
105 |
|
|
if (isset($css['misc/vertical-tabs.css'])) {
|
106 |
|
|
$css['misc/vertical-tabs.css']['data'] = drupal_get_path('theme', 'seven') . '/vertical-tabs.css';
|
107 |
|
|
$css['misc/vertical-tabs.css']['type'] = 'file';
|
108 |
|
|
}
|
109 |
|
|
if (isset($css['misc/vertical-tabs-rtl.css'])) {
|
110 |
|
|
$css['misc/vertical-tabs-rtl.css']['data'] = drupal_get_path('theme', 'seven') . '/vertical-tabs-rtl.css';
|
111 |
|
|
$css['misc/vertical-tabs-rtl.css']['type'] = 'file';
|
112 |
|
|
}
|
113 |
|
|
|
114 |
|
|
if (isset($css['misc/ui/jquery.ui.theme.css'])) {
|
115 |
|
|
$css['misc/ui/jquery.ui.theme.css']['data'] = drupal_get_path('theme', 'seven') . '/jquery.ui.theme.css';
|
116 |
|
|
$css['misc/ui/jquery.ui.theme.css']['type'] = 'file';
|
117 |
|
|
}
|
118 |
|
|
} |