function availability_calendars_key in Availability Calendars 6
Creates a key for our calendars.
Return value
string
2 calls to availability_calendars_key()
- availability_calendars_block in ./
availability_calendars.module - Implementation of hook_block(). Generates block for the legend to be shown in when on availability calendar nodes
- theme_availability_calendars_node in ./
availability_calendars.module - Themed output to display a list of node dates.
File
- ./
availability_calendars.module, line 472 - Availability Calendars Module.
Code
function availability_calendars_key() {
//use all the same classes for cells and table, so it styles the same as the calendars
$keytitle = '<div class="month_title key_title">' . t('Key') . '</div>';
$headers = array(
t('Color'),
t('Availability'),
);
$rows = array(
// keystatus class used to allow better styling of the status column
array(
array(
'data' => ' ',
'class' => 'calavailable',
),
array(
'data' => t('Available'),
'class' => 'keystatus',
),
),
array(
array(
'data' => ' ',
'class' => 'calnotavailable',
),
array(
'data' => t('Fully booked'),
'class' => 'keystatus',
),
),
array(
array(
'data' => ' ',
'class' => 'calnotavailableprov',
),
array(
'data' => t('Provisionally booked'),
'class' => 'keystatus',
),
),
array(
array(
'data' => ' ',
'class' => 'caltoday',
),
array(
'data' => t('Current Day'),
'class' => 'keystatus',
),
),
);
$key = theme_table($headers, $rows, array(
'class' => 'cal',
));
return '<div class="calmonth-wrapper key-wrapper">' . $keytitle . $key . '</div>';
}