function theme_signup_view_label in Signup 5.2
Generates the appropriate selector label for a given view.
Parameters
$view: An object containing data about the view to generate a label for. Contains at least a name (string), description (string), page (bool), and block (bool) fields.
Return value
The plain text (no HTML allowed) to include as the label for this view in the drop-down selector for which view to embed on the site-wide signup settings page.
See also
1 theme call to theme_signup_view_label()
- signup_settings_page in ./
signup.module - Form builder for the settings page under admin/setttings/signup
File
- ./
signup.module, line 1661 - The Signup module (http://drupal.org/project/signup) manages replies to nodes. In particular, it's good for event management. Signup supports sending reminder emails and automatically closing signups for nodes with a start time, via the Event…
Code
function theme_signup_view_label($view) {
$display_types = array();
if (!empty($view->page)) {
$display_types[] = t('Page');
}
if (!empty($view->block)) {
$display_types[] = t('Block');
}
$label = check_plain($view->name);
$label .= ' [' . implode(', ', $display_types) . ']: ';
$label .= check_plain($view->description);
if (drupal_strlen($label) > 90) {
$label = drupal_substr($label, 0, 90) . '...';
}
return $label;
}