function theme_summary_overview in Ubercart 6.2
Theme a summaries array into a handy div for use with some JS enhancement.
Parameters
$summaries: An array of summary arrays each containing the following keys:
- path - the path of the settings form the array is summarizing.
- title - the title of the settings form.
- href - the actual URL of the summary's form page.
- items - an array of items formatted for theme_item_list().
$link: TRUE or FALSE indicating whether or not to display an edit icon linking to the settings form the summary represents.
Return value
The HTML output of the summary.
9 theme calls to theme_summary_overview()
- uc_cart_cart_settings_overview in uc_cart/
uc_cart.admin.inc - Display an overview of the cart settings.
- uc_cart_checkout_settings_overview in uc_cart/
uc_cart.admin.inc - Display an overview of the checkout settings.
- uc_catalog_settings_overview in uc_catalog/
uc_catalog.admin.inc - Display an overview of the catalog settings.
- uc_country_settings_overview in uc_store/
uc_store.admin.inc - Displays an overview of the country settings.
- uc_order_settings_overview in uc_order/
uc_order.admin.inc - Displays an overview of the order settings.
File
- uc_store/
includes/ summaries.inc, line 243 - Provides summaries of forms and fieldsets.
Code
function theme_summary_overview($summaries, $link = TRUE) {
// Add some Ubercart specific JS for modifying summaries.
drupal_add_js(drupal_get_path('module', 'uc_store') . '/includes/summaries.js');
drupal_add_js(array(
'editIconPath' => base_path() . drupal_get_path('module', 'uc_store') . '/images/order_edit.gif',
), 'setting');
$output = '';
foreach ($summaries as $summary) {
// Add a containing div for the summary overview.
$output .= '<div id="' . $summary['path'] . '" class="summary-overview">';
// Add a div for the header containing the title and edit link.
$output .= '<div class="summary-header"><span class="summary-title">' . check_plain($summary['title']) . ': </span>';
if ($link) {
$output .= ' <span class="summary-link">' . l(t('edit'), $summary['href']) . '</span>';
}
$output .= '</div>';
// Add in the list for the summary items.
$output .= theme('item_list', $summary['items']);
// Close out the summary overview div.
$output .= '</div>';
}
return $output;
}