function ad_admin_groups_list in Advertisement 5.2
Same name and namespace in other branches
- 5 ad.module \ad_admin_groups_list()
- 6.3 ad.admin.inc \ad_admin_groups_list()
- 6 ad.admin.inc \ad_admin_groups_list()
- 6.2 ad.admin.inc \ad_admin_groups_list()
- 7 ad.admin.inc \ad_admin_groups_list()
File
- ./
ad.module, line 2048 - An advertising system for Drupal powered websites.
Code
function ad_admin_groups_list() {
_ad_check_install();
$header = array(
array(
'data' => t('Name'),
'field' => 'name',
),
array(
'data' => t('Description'),
'field' => 'description',
),
array(
'data' => t('Options'),
),
);
$groups = taxonomy_get_tree(_ad_get_vid());
if ($groups != array()) {
foreach ($groups as $group) {
$row = array();
$row[] = $group->name;
$row[] = $group->description;
$row[] = l(t('edit'), "admin/content/ad/groups/{$group->tid}/edit");
$rows[] = $row;
}
}
else {
$rows[] = array(
array(
'data' => t('No groups have been created.'),
'colspan' => 3,
),
);
}
$output = theme('table', $header, $rows);
$output .= theme('pager', NULL, 15, 0);
return $output;
}