function theme_uc_admin_dashboard in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_store/uc_store.module \theme_uc_admin_dashboard()
1 theme call to theme_uc_admin_dashboard()
- uc_store_admin in uc_store/
uc_store.module
File
- uc_store/
uc_store.module, line 572 - Contains global Ubercart functions and store administration functionality.
Code
function theme_uc_admin_dashboard($type, $menus) {
if ($type == 1) {
uc_add_js(drupal_get_path('module', 'uc_store') . '/uc_store.js', 'module');
uc_add_js("var text_show = '" . t('- Show links -') . "';\nvar text_hide = '" . t('- Hide links -') . "';\n", 'inline');
}
$output = '<table class="uc-store-admin-table" align="center"><tr valign="top">';
$panels = 0;
if (is_array($menus)) {
foreach ($menus as $menu) {
$panel++;
if ($panel % 4 == 0) {
$output .= '</tr><tr valign="top">';
}
$panel_title = $menu['title'];
if ($type == 3) {
$panel_links = '';
}
else {
$panel_links = theme('admin_block_content', system_admin_menu_block($menu));
}
$panel_table = '<table width="100%"><tr>' . '<td>' . l(uc_store_get_icon($menu['path']), $menu['path'], array(), NULL, NULL, FALSE, TRUE) . '</td>' . '<td class="panel-title">' . l($menu['title'], $menu['path']) . '</td></tr>';
if (strlen($panel_links) > 0) {
if ($type == 1) {
$disp = 'display: none;';
}
$panel_table .= '<tr><td nowrap colspan="2" class="panel-links" ' . 'style="' . $disp . '">' . $panel_links . '</td></tr>';
if ($type == 1) {
$panel_table .= '<tr><td align="center" colspan="2" ' . 'class="panel-show-link" id="show-links-' . $panel . '"><a>' . t('- Show links -') . '</a></td></tr>';
}
}
$panel_table .= '</table>';
$output .= '<td class="uc-store-admin-panel" id="panel-' . $panel . '">' . $panel_table . '</td>';
}
}
$output .= '</tr></table>';
return $output;
}