'. $output ."
\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 .= '"; $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"; $output .= '
'."\n"; switch ($node->event_state) { case 'singleday': $times = '
'. t('Start: ') . $node->start_time_format .'
'."\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 .= '"; $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 .= '
'."\n"; $output .= '
'."\n"; switch ($node->event_state) { case 'singleday': $times = '
'. t('Start: ') . $node->start_time_format .'
'."\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 .= '"; $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_table($node) { static $stripe, $stripe_map, $link_count; drupal_add_js(drupal_get_path('module', 'event') .'/event.js'); $link_count++; if (!$stripe_map[$node->nid]) { if ($stripe >= 10) { $stripe = 1; } else { $stripe++; } $stripe_map[$node->nid] = $stripe; } $output .= '
'."\n"; $output .= '
'."\n"; if (variable_get('event_type_control', 'all') != 'never') { if (!$module && (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).'/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"; $links = $node->event_links; $links['more_info'] = array( 'title' => t('more info'), 'href' => 'node/'.$node->nid, 'attributes' => array('onclick' => "popupnotes('info_". $link_count ."'); return false;", 'title' => t('Show detailed information for this event.')), ); $output .= '"; $output .= '
'."\n"; return $output; } function theme_event_node_list($node, $module = NULL) { static $stripe, $stripe_map, $link_count; drupal_add_js(drupal_get_path('module', 'event') .'/event.js'); $link_count++; if (!$stripe_map[$node->nid]) { if ($stripe >= 10) { $stripe = 1; } else { $stripe++; } $stripe_map[$node->nid] = $stripe; } $output = '
'."\n"; $output .= '
'."\n"; if (variable_get('event_type_control', 'all') != 'never') { if (!$module && (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).'/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"; $links = $node->event_links; $links['more_info'] = array( 'title' => t('more info'), 'href' => 'node/'.$node->nid, 'attributes' => array('onclick' => "popupnotes('info_". $link_count ."'); return false;", 'title' => t('Show detailed information for this event.')), ); $output .= '"; $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 = '
'. t('%month / %day', array('%month' => $month, '%day' => $day)) .'
'."\n"; break; case 'list': $stamp = _event_mktime(0, 0, 0, $month, $day, $year); $output = '
'. t('%weekday %month %day, %year', array('%weekday' => t(format_date($stamp, 'custom', 'l')), '%month' => t(format_date($stamp, 'custom', 'F')), '%day' => $day, '%year' => $year)) .'
'."\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 = '
'. t('%month / %day', array('%month' => $month, '%day' => $day)) .'
'."\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 .= '
'. $node->end_format .'
'."\n"; } if (variable_get('configurable_timezones', 1)) { include_once(EVENT_PATH .'/event_timezones.inc'); $zones = event_zonelist(); $output .= '
'. $zones[$node->timezone] .'
'."\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 ''; } /** * 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 ''; } /** * Format an individual upcoming event block item * * @param node * The node to render as an upcoming event */ function theme_event_upcoming_item($node) { $output = l($node->title, "node/$node->nid", array('title' => $node->title)); if ((count(event_get_types('all')) + count(event_get_types('solo'))) > 1) { $output .= ''. t("($node->typename)") .''; } $output .= '('. $node->timeleft .')'; return $output; } /** * Format the upcoming event block for event calendars * * @param items * An array of themed upcoming events */ function theme_event_upcoming_block($items) { $output = theme("item_list", $items); return $output; } /** @} End of addtogroup themeable */