You are here

function theme_calendar_stripe_stripe in Calendar 7

Same name in this branch
  1. 7 theme/theme.inc \theme_calendar_stripe_stripe()
  2. 7 calendar_multiday/theme/theme.inc \theme_calendar_stripe_stripe()
Same name and namespace in other branches
  1. 5.2 calendar.theme \theme_calendar_stripe_stripe()
  2. 5 calendar.theme \theme_calendar_stripe_stripe()
  3. 6.2 theme/theme.inc \theme_calendar_stripe_stripe()
  4. 6.2 calendar_multiday/theme/theme.inc \theme_calendar_stripe_stripe()
  5. 7.3 theme/theme.inc \theme_calendar_stripe_stripe()
  6. 7.2 theme/theme.inc \theme_calendar_stripe_stripe()
  7. 7.2 calendar_multiday/theme/theme.inc \theme_calendar_stripe_stripe()

Format node stripes

10 theme calls to theme_calendar_stripe_stripe()
calendar-day-node.tpl.php in theme/calendar-day-node.tpl.php
Template to display a view item as a calendar day node.
calendar-day-node.tpl.php in calendar_multiday/theme/calendar-day-node.tpl.php
calendar-month-multiple-node.tpl.php in theme/calendar-month-multiple-node.tpl.php
Template to display a summary of the days items as a calendar month node.
calendar-month-multiple-node.tpl.php in calendar_multiday/theme/calendar-month-multiple-node.tpl.php
Template to display a summary of the days items as a calendar month node.
calendar-month-node.tpl.php in theme/calendar-month-node.tpl.php
Template to display a view item as a calendar month node.

... See full list

File

theme/theme.inc, line 782
Theme functions for the Calendar module.

Code

function theme_calendar_stripe_stripe($vars) {
  $node = $vars['node'];
  if (empty($node->stripe) || !count($node->stripe)) {
    return;
  }
  $output = '';
  if (is_array($node->stripe_label)) {
    foreach ($node->stripe_label as $k => $stripe_label) {
      if (!empty($node->stripe[$k]) && !empty($stripe_label)) {
        $GLOBALS['calendar_stripes'][$stripe_label] = $node->stripe[$k];
        $output .= '<div style="background-color:' . $node->stripe[$k] . ';color:' . $node->stripe[$k] . '" class="stripe" title="Key: ' . $node->stripe_label[$k] . '">&nbsp;</div>' . "\n";
      }
    }
  }
  return $output;
}