function theme_ad_admin_ads in Advertisement 6
Same name and namespace in other branches
- 5.2 ad.module \theme_ad_admin_ads()
- 5 ad.module \theme_ad_admin_ads()
- 6.3 ad.admin.inc \theme_ad_admin_ads()
- 6.2 ad.admin.inc \theme_ad_admin_ads()
Theme ad administration overview.
File
- ./
ad.admin.inc, line 175 - Advertisement admin pages and functions.
Code
function theme_ad_admin_ads($form) {
// Overview table:
$header = array(
theme('table_select_header_cell'),
t('Title'),
t('Group'),
t('Type'),
t('Status'),
t('Operations'),
);
$output = drupal_render($form['options']);
if (isset($form['title']) && is_array($form['title'])) {
foreach (element_children($form['title']) as $key) {
$row = array();
$row[] = drupal_render($form['ads'][$key]);
$row[] = drupal_render($form['title'][$key]);
$row[] = drupal_render($form['group'][$key]);
$row[] = drupal_render($form['adtype'][$key]);
$row[] = drupal_render($form['adstatus'][$key]);
$row[] = drupal_render($form['operations'][$key]);
$rows[] = $row;
}
}
else {
$rows[] = array(
array(
'data' => t('No ads available.'),
'colspan' => '6',
),
);
}
$output .= theme('table', $header, $rows);
if ($form['pager']['#value']) {
$output .= drupal_render($form['pager']);
}
$output .= drupal_render($form);
return $output;
}