function theme_module_filter_system_modules_tabs in Module Filter 7
Same name and namespace in other branches
- 6 module_filter.theme.inc \theme_module_filter_system_modules_tabs()
- 7.2 module_filter.theme.inc \theme_module_filter_system_modules_tabs()
Theme callback for the modules tabbed form.
File
- ./
module_filter.theme.inc, line 55 - @author greenSkin
Code
function theme_module_filter_system_modules_tabs($variables) {
$form = $variables['form'];
$count_enabled = variable_get('module_filter_count_enabled', 1);
// Display packages.
$all = t('All');
$all_count = $count_enabled ? '<span class="counts">' . t('!enabled of !total', array(
'!enabled' => $form['#tab_counts'][$all]['enabled'],
'!total' => $form['#tab_counts'][$all]['total'],
)) . '</span>' : '';
$tabs = array(
'all' => '<li class="active"><a id="all-tab" class="project-tab overlay-exclude" href="#all">' . $all . $all_count . '</a></li>',
);
foreach ($form['#packages'] as $package) {
$id = module_filter_get_id($package);
$count = $count_enabled ? '<span class="counts">' . t('!enabled of !total', array(
'!enabled' => $form['#tab_counts'][$package]['enabled'],
'!total' => $form['#tab_counts'][$package]['total'],
)) . '</span>' : '';
$tabs[$id] = '<li><a id="' . $id . '-tab" class="project-tab overlay-exclude" href="#' . str_replace('-', '_', $id) . '">' . $package . $count . '</a></li>';
}
$output = '<div id="module-filter-wrapper">';
$output .= '<div id="module-filter-left">';
$output .= '<div id="module-filter-tabs"><ul>' . implode($tabs) . '</ul></div>';
$output .= '<div id="module-filter-submit">' . drupal_render($form['actions']) . '</div></div>';
$output .= '<div id="module-filter-right"><div id="module-filter-squeeze">' . drupal_render($form['module_filter']);
$output .= drupal_render($form['modules']) . '</div></div>';
$output .= '<div class="clear-block"></div>';
$output .= '</div>';
$output .= drupal_render_children($form);
return $output;
}