function theme_flag_admin_page in Flag 7.3
Same name and namespace in other branches
- 5 includes/flag.admin.inc \theme_flag_admin_page()
- 6.2 includes/flag.admin.inc \theme_flag_admin_page()
- 6 includes/flag.admin.inc \theme_flag_admin_page()
- 7.2 includes/flag.admin.inc \theme_flag_admin_page()
Theme the output for the main flag administration page.
1 theme call to theme_flag_admin_page()
- flag_admin_page in includes/
flag.admin.inc - Flag administration page. Display a list of existing flags.
File
- includes/
flag.admin.inc, line 191 - Contains administrative pages for creating, editing, and deleting flags.
Code
function theme_flag_admin_page($variables) {
$flags = $variables['flags'];
$default_flags = $variables['default_flags'];
$output = '';
$output .= drupal_render($variables['flag_admin_listing']);
$output .= theme('flag_admin_listing_disabled', array(
'flags' => $flags,
'default_flags' => $default_flags,
));
if (!module_exists('views')) {
$output .= '<p>' . t('The <a href="@views-url">Views</a> module is not installed, or not enabled. It is recommended that you install the Views module to be able to easily produce lists of flagged content.', array(
'@views-url' => url('http://drupal.org/project/views'),
)) . '</p>';
}
else {
$output .= '<p>';
$output .= t('Lists of flagged content can be displayed using views. You can configure these in the <a href="@views-url">Views administration section</a>.', array(
'@views-url' => url('admin/structure/views'),
));
if (flag_get_flag('bookmarks')) {
$output .= ' ' . t('Flag module automatically provides a few <a href="@views-url">default views for the <em>bookmarks</em> flag</a>. You can use these as templates by cloning these views and then customizing as desired.', array(
'@views-url' => url('admin/structure/views', array(
'query' => array(
'tag' => 'flag',
),
)),
));
}
$output .= ' ' . t('The <a href="@flag-handbook-url">Flag module handbook</a> contains extensive <a href="@customize-url">documentation on creating customized views</a> using flags.', array(
'@flag-handbook-url' => 'http://drupal.org/handbook/modules/flag',
'@customize-url' => 'http://drupal.org/node/296954',
));
$output .= '</p>';
}
if (!module_exists('flag_actions')) {
$output .= '<p>' . t('Flagging an item may trigger <em>actions</em>. However, you don\'t have the <em>Flag actions</em> module <a href="@modules-url">enabled</a>, so you won\'t be able to enjoy this feature.', array(
'@actions-url' => url(FLAG_ADMIN_PATH . '/actions'),
'@modules-url' => url('admin/modules'),
)) . '</p>';
}
else {
$output .= '<p>' . t('Flagging an item may trigger <a href="@actions-url">actions</a>.', array(
'@actions-url' => url(FLAG_ADMIN_PATH . '/actions'),
)) . '</p>';
}
if (!module_exists('rules')) {
$output .= '<p>' . t('Flagging an item may trigger <em>rules</em>. However, you don\'t have the <a href="@rules-url">Rules</a> module enabled, so you won\'t be able to enjoy this feature. The Rules module is a more extensive solution than Flag actions.', array(
'@rules-url' => url('http://drupal.org/node/407070'),
)) . '</p>';
}
else {
$output .= '<p>' . t('Flagging an item may trigger <a href="@rules-url">rules</a>.', array(
'@rules-url' => url('admin/config/workflow/rules'),
)) . '</p>';
}
$output .= '<p>' . t('To learn about the various ways to use flags, please check out the <a href="@handbook-url">Flag module handbook</a>.', array(
'@handbook-url' => 'http://drupal.org/handbook/modules/flag',
)) . '</p>';
return $output;
}