function theme_ad_add_list in Advertisement 7.2
Display the list of available ad types for ad creation.
1 theme call to theme_ad_add_list()
- ad_ui_add_page in includes/
ad_ui.inc - Menu callback: display a list of ad types that the user can create.
File
- includes/
ad_ui.inc, line 24
Code
function theme_ad_add_list($variables) {
$content = $variables['content'];
$output = '';
if ($content) {
$output = '<dl class="ad-type-list">';
foreach ($content as $item) {
$output .= '<dt>' . l($item['title'], $item['href'], $item['localized_options']) . '</dt>';
$output .= '<dd>' . filter_xss_admin($item['description']) . '</dd>';
}
$output .= '</dl>';
}
else {
if (user_access('administer ad types')) {
$output = '<p>' . t('You have not created any ad types yet. Go to the <a href="@create-ad-type">ad type creation page</a> to add a new ad type.', array(
'@create-ad-type' => url('admin/ad/types/add'),
)) . '</p>';
}
else {
$output = '<p>' . t('No ad types have been created yet for you to use.') . '</p>';
}
}
return $output;
}