/** * Outputs the object as plain text. * @param JOB $entry * @access private */ protected function _display_as_plain_text($entry) { echo $this->line('[Kind]: ' . $entry->kind_as_text()); $assignee = $entry->assignee(); if ($assignee) { $assignee_text = '[Assigned to]: ' . $assignee->title_as_plain_text(); $time_owned = $entry->assignee_age(); if (isset($time_owned)) { $assignee_text .= ' (' . $time_owned->format() . ')'; } echo $this->line($assignee_text); } else { echo $this->line('[Assigned to]: Nobody'); } $creator = $entry->creator(); $reporter = $entry->reporter(); if (!$reporter->equals($creator)) { echo $this->line('[Reported By]: ' . $reporter->title_as_plain_text()); } if ($entry->time_needed->is_valid()) { echo $this->line('[Needed by]: ' . $this->time($entry->time_needed, Date_time_format_short_date)); } $this->_echo_plain_text_user_information($entry); $this->_echo_branches_as_plain_text($entry); $this->_echo_plain_text_description($entry); $this->_echo_plain_text_extra_description($entry); }
/** * Draw user-specific information for the given release. * @param JOB $obj * @param JOB_BRANCH_INFO $branch_info */ protected function _draw_user_details($obj, $branch_info) { $is_closed = $branch_info->is_closed(); $time_open = $branch_info->age(); $time_in_status = $branch_info->status_age(); if (!$is_closed) { $needed_by = $branch_info->needed_by_as_html(); if ($needed_by) { ?> <div> <?php echo $needed_by; ?> </div> <?php } } ?> <div> <span class="field"><?php $status_props = $branch_info->status_properties(); echo $this->app->get_icon_with_text($status_props->icon, Sixteen_px, $status_props->title); ?> </span> <?php if ($is_closed) { $closer = $branch_info->closer(); ?> (<?php echo $branch_info->time_closed->format(); ?> by <?php echo $closer->title_as_link(); ?> after <?php echo $time_open->format(); ?> ) <?php } else { if ($time_open->equals($time_in_status)) { ?> (<?php echo $time_open->format(); ?> ) <?php } else { ?> – <?php echo $time_in_status->format(); ?> (open for <?php echo $time_open->format(); ?> ) <?php } } ?> </div> <?php if (!$is_closed) { ?> <div> <?php $priority_props = $branch_info->priority_properties(); echo $this->app->get_icon_with_text($priority_props->icon, Sixteen_px, $priority_props->title); ?> </div> <?php } ?> <div> <div> <?php if (!$is_closed) { $assignee = $obj->assignee(); if ($assignee) { $text = 'Assigned to ' . $assignee->title_as_link(); $time_owned = $obj->assignee_age(); if (isset($time_owned)) { $text .= ' (' . $time_owned->format() . ')'; } } else { $text = 'Not assigned'; } echo $this->app->get_icon_with_text($obj->get_assignee_icon_url(), Sixteen_px, $text); } ?> </div> <div class="clear-both"></div> </div> <?php }