Exemplo n.º 1
0
 function closing_location_link_by_id($location_id)
 {
     if (isset($location_id)) {
         return location_get_link_by_id($location_id);
     } else {
         return lang('lockdown');
     }
 }
Exemplo n.º 2
0
 /**
  * Generates HTML Output for the calender tooltip
  * @param Participation $participation ID
  * @param Participant $participant
  * @param Experiment $experiment
  */
 private function generate_tooltip($participation, $participant, $experiment)
 {
     $exp_link = lang('experiment') . ': ';
     $exp_link .= experiment_get_link($experiment);
     $exp_link .= br();
     $part_link = lang('participant') . ': ';
     $part_link .= participant_get_link($participant);
     $part_link .= br();
     $loc_link = lang('location') . ': ';
     $loc_link .= location_get_link_by_id($experiment->location_id);
     $loc_link .= br();
     $user_link = '';
     if ($participation->user_id_leader) {
         $user_link .= lang('leader') . ': ';
         $user_link .= user_get_link_by_id($participation->user_id_leader);
         $user_link .= br();
     }
     $comment = '';
     if ($participation->calendar_comment) {
         $comment .= lang('comment') . ': ';
         $comment .= $participation->calendar_comment;
         $comment .= br();
     }
     // Show actions only if user the leader of this participation (or if user is admin/caller)
     $current_user_is_leader = is_leader() && $participation->user_id_leader != current_user_id();
     $participation_actions = $current_user_is_leader ? '' : '<center>' . participation_actions($participation->id) . '</center>';
     return addslashes($exp_link . $part_link . $loc_link . $user_link . $comment . $participation_actions);
 }