\n";
}
/**
* Format a calendar view
*
* @param day
* The day to display.
*/
function theme_event_calendar_week($op, $header, $rows, $attributes = array(), $caption = NULL) {
$output = theme("table", $header, $rows, $attributes, $caption);
return '
'. $output ."
\n";
}
/**
* Format a calendar view
*
* @param day
* The day to display.
*/
function theme_event_calendar_day($op, $header, $rows, $attributes = array(), $caption = NULL) {
$output = theme("table", $header, $rows, $attributes, $caption);
return '
'. $output ."
\n";
}
/**
* Format a calendar view
*
* @param day
* The day to display.
*/
function theme_event_calendar_table($op, $header, $rows, $attributes = array(), $caption = NULL) {
$output = theme("table", $header, $rows, $attributes, $caption);
return '
'. $output ."
\n";
}
/**
* Format a calendar view
*
* @param day
* The day to display.
*/
function theme_event_calendar_list($op, $header, $rows) {
return '
'. $rows ."
\n";
}
/**
* Format an event node for display in an expanded calendar, like a calendar page
*
* @param node
* The node being displayed
*/
function theme_event_node_day($node) {
static $zebra;
$output .= '
'."\n";
if (variable_get('event_type_control', 'all') != 'never') {
if ((count(event_get_types('all')) + count(event_get_types('solo'))) > 1) {
$output .= '
'. l('('. $node->event_node_title .')', 'event/'.gmdate('Y/m/d', $node->event_start).'/day/'.$node->type, array('title' => t('limit view to events of this type'))).'
'."\n";
}
}
$output .= '
'. l($node->title, "node/$node->nid", array('title' => t('view this event'))) .'
'."\n";
$output .= '
'. t('Start: ') . $node->start_time_format .'
'."\n";
if ($node->event_start != $node->event_end) {
$output .= '
'. t('End: ') . $node->end_time_format .'
'."\n";
}
$output .= '
'. check_markup($node->teaser) ."
\n";
$output .= '
'. theme('links', $node->event_links) ."\n
";
$output .= "
\n";
return $output;
}
/**
* Format an event node for display in an expanded calendar, like a calendar page
*
* @param node
* The node being displayed
*/
function theme_event_node_week($node) {
static $stripe, $stripe_map;
if(!$stripe_map[$node->nid]) {
if($stripe >= 10) {
$stripe = 1;
}
else {
$stripe++;
}
$stripe_map[$node->nid] = $stripe;
}
$output .= '
'."\n";
if ($node->event_start != $node->event_end) {
$times .= '
'. t('End: ') . $node->end_time_format .'
'."\n";
}
break;
case 'start':
$times = '
'. t('Start: ') . $node->start_time_format .'
'."\n";
break;
case 'end':
$times = '
'. t('End: ') . $node->end_time_format .'
'."\n";
break;
case 'ongoing':
$times = '
'. t('all day') .'
'."\n";
break;
}
if (variable_get('event_type_control', 'all') != 'never') {
if ((count(event_get_types('all')) + count(event_get_types('solo'))) > 1) {
$output .= '
'. 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'))).'
'."\n";
}
}
$output .= '
'. l($node->title, "node/$node->nid", array('title' => t('view this event'))) .'
'."\n";
$output .= $times;
$output .= '
'. theme('links', $node->event_links) ."\n
";
$output .= '
' . "\n";
return $output;
}
/**
* Format an event node for display in an expanded calendar, like a calendar page
*
* @param node
* The node being displayed
*/
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 .= '
'. l('('. $node->event_node_title .')', 'event/'.gmdate('Y/m/d', $node->event_start).'/table/'.$node->type, array('title' => t('limit view to events of this type'))).'
'."\n";
}
}
$output .= '
'. l($node->title, "node/$node->nid", array('title' => t('view this event'))) .'
'."\n";
switch ($node->event_state) {
case 'singleday':
$output .= '
'. t('Start: ') . $node->start_time_format ."
\n";
if ($node->event_start != $node->event_end) {
$output .= '
'. t('End: ') . $node->end_time_format ."
\n";
}
break;
case 'start':
$output .= '
'. t('Start: ') . $node->start_time_format ."
\n";
break;
case 'end':
$output .= '
'. t('End: ') . $node->end_time_format ."
\n";
break;
case 'ongoing':
$output .= '
('. t('all day') .')
'."\n";
break;
}
$output .= '
'."\n";
if ($node->event_state != 'singleday') {
$output .= '
'. t('Start: ') . $node->start_format .'
'."\n";
if ($node->event_start != $node->event_end) {
$output .= '
'. l('('. $node->event_node_title .')', 'event/'.gmdate('Y/m/d', $node->event_start).'/table/'.$node->type, array('title' => t('limit view to events of this type'))).'
'."\n";
}
}
$output .= '
'. l($node->title, "node/$node->nid", array('title' => t('view this event'))) .'
'."\n";
switch ($node->event_state) {
case 'singleday':
$output .= '
'. t('Start') .': '. $node->start_time_format ."
\n";
if ($node->event_start != $node->event_end) {
$output .= '
'. t('End') .': '. $node->end_time_format ."
\n";
}
break;
case 'start':
$output .= '
'. t('Start') .': '. $node->start_time_format ."
\n";
break;
case 'end':
$output .= '
'. t('End') .': '. $node->end_time_format ."
\n";
break;
case 'ongoing':
$output .= '
('. t('all day') .')
'."\n";
break;
}
$output .= '
'."\n";
if ($node->event_state != 'singleday') {
$output .= '
'. t('Start') .': '. $node->start_format .'
'."\n";
if ($node->event_start != $node->event_end) {
$output .= '
'."\n";
return $output;
}
/**
* Format an date's day box in a calendar
*
* @param day
* The day to display.
*/
function theme_event_calendar_date_box($year, $month, $day, $view) {
switch ($view) {
case 'table':
$output = '
'."\n";
break;
case 'day':
break;
default:
$output = '
'. $day .'
'."\n";
break;
}
return $output;
}
/**
* Format an empty day on a calendar
*
* @param day
* The day to display.
*/
function theme_event_empty_day($year, $month, $day, $view) {
switch ($view) {
case 'table':
$output = '
'."\n";
$output .= ''."\n";
break;
case 'day':
case 'list':
break;
default:
$output = '
'. $day .'
'."\n";
$output .= ''."\n";
break;
}
return $output;
}
/**
* Format an date value for a nodeapi insert
*
* @param node
* The node which needs it's dates formatted
*/
function theme_event_nodeapi($node) {
$output = '
'. $node->start_format .'
'."\n";
if ($node->event_start != $node->event_end) {
$output .= '
'."\n";
}
return $output;
}
/**
* Format the event filter control dropdown
*
* @param form
* The form containing the taxonomy controls
*/
function theme_event_filter_control($form) {
return '
'. $form .'
';
}
/**
* Format the 'next' navigation controls for event calendars
*
* @param link
* The url for the navigation
*/
function theme_event_nav_next($url, $attributes = array()) {
return ''. l('»', $url, $attributes) .'';
}
/**
* Format the 'previous' navigation controls for event calendars
*
* @param link
* The url for the navigation
*/
function theme_event_nav_prev($url, $attributes = array()) {
return ''. l('«', $url, $attributes) .'';
}
/**
* Format the links for event calendars
*
* @param links
* An array of links to render
* @param view
* The current view being rendered
*/
function theme_event_links($links, $view) {
return theme('links', $links);
}
/**
* Format the ical link
*
* @param path
* The url for the ical feed
*/
function theme_event_ical_link($path) {
return '
'. l('', $path, array('title' => t('Add this calendar to your iCalendar')), NULL, NULL, TRUE, TRUE) .'
';
}
/**
* Format the 'read more' link for events
*
* @param path
* The url to use for the read more link
*/
function theme_event_more_link($path) {
return '