You are here

function theme_event_nodeapi in Event 5.2

Same name and namespace in other branches
  1. 5 event.theme \theme_event_nodeapi()

Format an date value for a nodeapi insert

Parameters

node: The node which needs it's dates formatted

1 theme call to theme_event_nodeapi()
event_nodeapi in ./event.module
hook_nodeapi implementation

File

./event.theme, line 389

Code

function theme_event_nodeapi($node) {
  $output = '<div class="event-nodeapi">
    <div class="' . $node->type . '-start dtstart" title="' . event_format_date($node->event['start'], 'custom', "Y-m-d\\TH:i:s\\Z") . '"><label>' . t('Start: ') . '</label>' . $node->event['start_format'] . '</div></div>' . "\n";
  if ($node->event['start'] != $node->event['end']) {
    $output .= '<div class="event-nodeapi">
    <div class="' . $node->type . '-end dtend" title="' . event_format_date($node->event['end'], 'custom', "Y-m-d\\TH:i:s\\Z") . '"><label>' . t('End: ') . '</label>' . $node->event['end_format'] . '</div></div>' . "\n";
  }
  if (variable_get('configurable_timezones', 1)) {
    $zone = event_zonelist_by_id($node->event['timezone']);
    $output .= '<div class="event-nodeapi">
    <div class="' . $node->type . '-tz"><label>' . t('Timezone: ') . '</label>' . t($zone['name']) . '</div></div>' . "\n";
  }
  return $output;
}