You are here

function theme_uc_settings_overview in Ubercart 5

Theme an array of settings information into a pretty little table.

11 theme calls to theme_uc_settings_overview()
uc_cart_cart_settings_overview in uc_cart/uc_cart.module
uc_cart_checkout_settings_overview in uc_cart/uc_cart.module
uc_catalog_settings_overview in uc_catalog/uc_catalog.module
Display an overview of all catalog settings.
uc_country_settings_overview in uc_store/uc_store.module
Display the country settings overview.
uc_notify_settings_overview in uc_notify/uc_notify.module
Display the notification settings overview page.

... See full list

File

uc_store/uc_store.module, line 2505
Contains global Ubercart functions and store administration functionality.

Code

function theme_uc_settings_overview($sections) {
  if (!is_array($sections) || count($sections) == 0) {
    return t('No overview found.');
  }
  uc_add_js(drupal_get_path('module', 'uc_store') . '/uc_store.js');
  $output = '<table class="settings-overview">';
  foreach ($sections as $section) {
    $output .= '<tr class="section" id="' . $section['edit'] . '">' . '<td valign="top">' . uc_store_get_icon('file:order_edit', FALSE, 'settings-icon', t('Edit')) . '</td><td class="section-items">' . '<div class="section-title">' . $section['title'] . ':</div>';
    if (is_array($section['items']) && count($section['items']) > 0) {
      $output .= theme('item_list', $section['items']);
    }
    else {
      $output .= '<tr><td>' . t('No settings found.') . '</td></tr>';
    }
    $output .= '</td></tr>';
  }
  $output .= '</table>';
  return $output;
}