function theme_event_node_month in Event 5
Same name and namespace in other branches
- 5.2 event.theme \theme_event_node_month()
Format an event node for display in an expanded calendar, like a calendar page
Parameters
node: The node being displayed
File
- ./
event.theme, line 149
Code
function theme_event_node_month($node) {
static $stripe, $stripe_map;
if (!$stripe_map[$node->nid]) {
if ($stripe >= 10) {
$stripe = 1;
}
else {
$stripe++;
}
$stripe_map[$node->nid] = $stripe;
}
$output .= '<div class="event monthview">' . "\n";
$output .= '<div class="stripe-' . $stripe_map[$node->nid] . '"></div>' . "\n";
switch ($node->event_state) {
case 'singleday':
$times = '<div class="start">' . t('Start: ') . $node->start_time_format . '</div>' . "\n";
if ($node->event_start != $node->event_end) {
$times .= '<div class="end">' . t('End: ') . $node->end_time_format . '</div>' . "\n";
}
break;
case 'start':
$times = '<div class="start">' . t('Start: ') . $node->start_time_format . '</div>' . "\n";
break;
case 'end':
$times = '<div class="end">' . t('End: ') . $node->end_time_format . '</div>' . "\n";
break;
case 'ongoing':
$times = '<div class="ongoing">' . t('all day') . '</div>' . "\n";
break;
}
if (variable_get('event_type_control', 'all') != 'never') {
if (count(event_get_types('all')) + count(event_get_types('solo')) > 1) {
$output .= '<div class="type">' . l('(' . $node->event_node_title . ')', 'event/' . gmdate('Y/m/d', $node->event_current_date) . '/month/' . $node->type, array(
'title' => t('limit view to events of this type'),
)) . '</div>' . "\n";
}
}
$output .= '<div class="title">' . l($node->title, "node/{$node->nid}", array(
'title' => t('view this event'),
)) . '</div>' . "\n";
$output .= $times;
$output .= '<div class="links">' . theme('links', $node->event_links) . "\n</div>";
$output .= '</div>' . "\n";
return $output;
}