minor tweaks to token
This commit is contained in:
@@ -1651,13 +1651,19 @@ function _booking_readinggroup_email_listing($node) {
|
||||
}
|
||||
}
|
||||
|
||||
// Don't show an empty header row if there was no-one in the group
|
||||
if (count($rows) < 1) {
|
||||
return implode("\n", $rows);
|
||||
}
|
||||
|
||||
// Use Drupal's table theming function to build the table if HTML email is enabled
|
||||
if(variable_get('booking_enable_html_mail', 0) == 1) {
|
||||
$table = theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => $attributes));
|
||||
watchdog('booking_debug', "<pre>Reading group table\n@info</pre>", array('@info' => print_r($table, true)));
|
||||
return $table;
|
||||
}
|
||||
else {
|
||||
return "";
|
||||
return implode("\n", $rows);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -496,8 +496,12 @@ function booking_token_info() {
|
||||
);
|
||||
$info['tokens']['booking']['leaderhelper-pair'] = array(
|
||||
'name' => t('Registration Study Group Leader-Helper Pair'),
|
||||
'description' => t('List out the leader and helper pairs, with intro text.')
|
||||
'description' => t('List out the leader and helper pairs.')
|
||||
);
|
||||
$info['tokens']['booking']['readinggroup-listing'] = array(
|
||||
'name' => t('Reading Group Membership'),
|
||||
'description' => t('Lists all the people in a Reading Group, but only for the leader.')
|
||||
);
|
||||
$info['tokens']['booking']['room-allocation'] = array(
|
||||
'name' => t('Room Allocation'),
|
||||
'description' => t('Details of room allocated to attendee.')
|
||||
|
Reference in New Issue
Block a user