You are here

function theme_calendar_node_day in Calendar 5.2

Same name and namespace in other branches
  1. 5 calendar.theme \theme_calendar_node_day()

Format an calendar node for display in an expanded calendar, like a calendar page

Parameters

node: The node being displayed

File

./calendar.theme, line 525

Code

function theme_calendar_node_day($node, $view) {
  $output = '<div class="calendar dayview" id="' . $node->date_id . '">' . "\n";
  $output .= theme('calendar_stripe_stripe', $node);
  $fields = _views_get_fields();
  $item = '';
  foreach ($view->field as $field) {
    if ($fields[$field['id']]['visible'] !== FALSE) {
      $value = theme('calendar_views_field', $field['queryname'], $fields, $field, $node, $view, $type);
      if (!empty($value)) {
        if ($field['label']) {
          $item .= "<div class='view-label " . views_css_safe('view-label-' . $field['queryname']) . "'>" . $field['label'] . "</div>";
        }
        $item .= "<div class='view-field " . views_css_safe('view-data-' . $field['queryname']) . "'>";
        $item .= $value . "</div>";
      }
    }
  }

  // Remote items may have a teaser to show.
  if ($node->remote && $node->teaser) {
    $item .= '<div class="content">' . $node->teaser . "</div>\n";
  }
  $output .= "<div class='view-item " . views_css_safe('view-item-' . $view->name) . "'>{$item}</div>\n";
  $output .= "</div>\n";
  return $output;
}