You are here

function theme_signup_user_schedule in Signup 5

Same name and namespace in other branches
  1. 5.2 theme/signup.theme \theme_signup_user_schedule()
  2. 6.2 theme/no_views.inc \theme_signup_user_schedule()

Format a user signup for display in a schedule list.

Parameters

node: The node which needs theming

1 theme call to theme_signup_user_schedule()
signup_user_schedule in ./signup.module
Prints a schedule of the given user's signups.

File

./signup.theme, line 10

Code

function theme_signup_user_schedule($node) {
  $output = '';
  $output .= '<div class="signup-user-schedule"><div class="' . $node->type . 'signup-title"><h4>' . l($node->title, "node/{$node->nid}") . '</h4></div></div>';

  // event-based data, only if it's an event node
  if (isset($node->event_start)) {
    $output .= '<div class="signup-user-schedule"><div class="' . $node->type . 'signup-start"><label>' . t('Start: ') . '</label>' . $node->start_format . '</div></div>';
    if ($node->event_start != $node->event_end) {
      $output .= '<div class="signup-user-schedule"><div class="' . $node->type . 'signup-end"><label>' . t('End: ') . '</label>' . $node->end_format . '</div></div>';
    }
    if (variable_get('configurable_timezones', 1)) {
      $zones = event_zonelist();
      $output .= '<div class="signup-user-schedule"><div class="' . $node->type . 'signup-tz"><label>' . t('Timezone: ') . '</label>' . $zones[$node->timezone] . '</div></div>';
    }
  }
  else {
    $output .= '<div class="signup-user-schedule"><div class="' . $node->type . 'signup-untimed">' . t('[Untimed]') . '</div></div>';
  }
  return $output;
}