Révision 7d7b5830
Ajouté par Assos Assos il y a environ 9 ans
drupal7/sites/all/modules/module_filter/module_filter.theme.inc | ||
---|---|---|
32 | 32 |
} |
33 | 33 |
|
34 | 34 |
$header = array( |
35 |
t('Enabled'),
|
|
36 |
t('Name'),
|
|
37 |
t('Version'),
|
|
38 |
t('Description')
|
|
35 |
array('data' => '', 'class' => array('checkbox')),
|
|
36 |
array('data' => t('Name'), 'class' => array('name')),
|
|
37 |
array('data' => t('Description'), 'class' => array('description')),
|
|
38 |
array('data' => t('Links'), 'class' => array('links')),
|
|
39 | 39 |
); |
40 | 40 |
$package_ids = array('all'); |
41 | 41 |
$enabled['all'] = array(); |
... | ... | |
79 | 79 |
} |
80 | 80 |
|
81 | 81 |
$row = array(); |
82 |
|
|
83 |
$version = !empty($module['version']['#markup']); |
|
84 |
$requires = !empty($module['#requires']); |
|
85 |
$required_by = !empty($module['#required_by']); |
|
86 |
|
|
82 | 87 |
$toggle_enable = ''; |
83 | 88 |
if (isset($module['enable']['#type']) && $module['enable']['#type'] == 'checkbox') { |
84 | 89 |
unset($module['enable']['#title']); |
... | ... | |
89 | 94 |
$toggle_enable = '<div class="js-hide toggle-enable ' . $class . '"><div> </div></div>'; |
90 | 95 |
} |
91 | 96 |
$row[] = array('class' => array('checkbox'), 'data' => $toggle_enable . drupal_render($module['enable'])); |
97 |
|
|
92 | 98 |
$label = '<label'; |
93 | 99 |
if (isset($module['enable']['#id'])) { |
94 | 100 |
$label .= ' for="' . $module['enable']['#id'] . '"'; |
95 | 101 |
} |
96 |
$row[] = array('class' => array('name'), 'data' => $label . '><strong>' . drupal_render($module['name']) . '</strong><br><span class="module-machine-name">(' . $key . ')</span></label>'); |
|
97 |
$row[] = array('class' => array('version'), 'data' => drupal_render($module['version'])); |
|
98 |
// Add the description, along with any modules it requires and any |
|
99 |
// operation links. |
|
100 |
$description = drupal_render($module['description']); |
|
101 |
if ($module['#requires']) { |
|
102 |
$description .= '<div class="admin-requirements">' . t('Requires: !module-list', array('!module-list' => implode(', ', $module['#requires']))) . '</div>'; |
|
103 |
} |
|
104 |
if ($module['#required_by']) { |
|
105 |
$description .= '<div class="admin-requirements">' . t('Required by: !module-list', array('!module-list' => implode(', ', $module['#required_by']))) . '</div>'; |
|
102 |
$row[] = array('class' => array('name'), 'data' => $label . '><strong>' . drupal_render($module['name']) . '</strong> <span class="module-machine-name">(' . $key . ')</span></label>'); |
|
103 |
|
|
104 |
// Add the description, along with any modules it requires. |
|
105 |
$description = '<span class="details"><span class="text">' . drupal_render($module['description']) . '</span></span>'; |
|
106 |
if ($version || $requires || $required_by) { |
|
107 |
$description .= '<div class="requirements">'; |
|
108 |
if ($version) { |
|
109 |
$description .= '<div class="admin-requirements">' . t('Version: !module-version', array('!module-version' => drupal_render($module['version']))) . '</div>'; |
|
110 |
} |
|
111 |
if ($requires) { |
|
112 |
$description .= '<div class="admin-requirements">' . t('Requires: !module-list', array('!module-list' => implode(', ', $module['#requires']))) . '</div>'; |
|
113 |
} |
|
114 |
if ($required_by) { |
|
115 |
$description .= '<div class="admin-requirements">' . t('Required by: !module-list', array('!module-list' => implode(', ', $module['#required_by']))) . '</div>'; |
|
116 |
} |
|
117 |
$description .= '</div>'; |
|
106 | 118 |
} |
119 |
$row[] = array('data' => '<div class="inner expand" role="button">' . $description . '</div>', 'class' => array('description')); |
|
120 |
|
|
107 | 121 |
$operations = (module_exists('ctools')) ? theme('module_filter_operations', array('links' => $module['links'], 'dropbutton' => TRUE)) : theme('module_filter_operations', array('links' => $module['links'])); |
108 |
if (!empty($operations)) { |
|
109 |
$description .= $operations; |
|
110 |
} |
|
111 |
$row[] = array('data' => $description, 'class' => array('description')); |
|
122 |
$row[] = array('data' => '<div class="links">' . $operations . '</div>', 'class' => array('links')); |
|
112 | 123 |
|
113 | 124 |
$class = array(module_filter_get_id($package) . '-tab', 'module', $stripe); |
114 | 125 |
if (isset($recent_modules[$key])) { |
... | ... | |
159 | 170 |
$dropbutton = $vars['dropbutton']; |
160 | 171 |
|
161 | 172 |
$operations = array(); |
162 |
foreach (array('configure', 'permissions', 'help') as $key) {
|
|
173 |
foreach (element_children($links) as $key) {
|
|
163 | 174 |
if ($dropbutton) { |
164 | 175 |
hide($links[$key]); |
165 | 176 |
if (!empty($links[$key]['#href'])) { |
Formats disponibles : Unified diff
Weekly update of contrib modules