function theme_calendar_systems_profile_overview in Calendar Systems 7
Same name and namespace in other branches
- 8 calendar_systems.admin.inc \theme_calendar_systems_profile_overview()
- 6.3 calendar_systems.admin.inc \theme_calendar_systems_profile_overview()
- 6 calendar_systems.admin.inc \theme_calendar_systems_profile_overview()
- 7.3 calendar_systems.admin.inc \theme_calendar_systems_profile_overview()
- 7.2 calendar_systems.admin.inc \theme_calendar_systems_profile_overview()
Theme callback for calendar systems profiles form.
File
- ./
calendar_systems.admin.inc, line 100 - Contains Calendar Systems administration form callbacks.
Code
function theme_calendar_systems_profile_overview($variables) {
// Check of unexpectency!
if (!isset($variables['form']['formats'])) {
return t('There were a problem getting calendar systems profiles.');
}
// Theme the form as a HTML table:
$rows = array();
// Build rows array:
foreach (element_children($variables['form']['formats']) as $item) {
$format =& $variables['form']['formats'][$item];
$rows[] = array(
drupal_render($format['name']),
drupal_render($format['editor']),
isset($format['remove']) ? drupal_render($format['remove']) : '',
);
}
// And the header:
$header = array(
t('Language'),
t('Calendar system'),
array(
'colspan' => 2,
'data' => t('Operations'),
),
);
// Theme the table:
$output = theme('table', array(
'header' => $header,
'rows' => $rows,
));
// Render the actual form & append:
$output .= drupal_render_children($variables['form']);
return $output;
}