/** * @param JOB $obj Retrieve the title from this job. * @return string * @access private */ protected function _text_for_list($obj) { $props = $obj->kind_properties(); $Result = $this->context->get_icon_with_text($props->icon, Sixteen_px, parent::_text_for_list($obj)); /** @var $branch_info JOB_BRANCH_INFO */ $branch_info = $obj->main_branch_info(); if ($branch_info->is_closed()) { return "<span class=\"locked\">{$Result}</span>"; } return $Result; }
/** * Outputs the object as HTML. * @param JOB $entry * @access private */ protected function _display_as_html($entry) { ?> <div> <table class="basic columns left-labels"> <tr> <th>Kind</th> <td> <?php $props = $entry->kind_properties(); echo $this->app->get_icon_with_text($props->icon, Sixteen_px, $entry->kind_as_text()); ?> </td> </tr> <?php if ($entry->component_id) { $comp = $entry->component(); ?> <tr> <th>Component</th> <td> <?php echo $this->app->get_icon_with_text($comp->icon_url, Sixteen_px, $comp->title_as_link()); ?> </td> </tr> <?php } if ($entry->time_needed->is_valid()) { ?> <tr> <th>Needed By</th> <td> <?php $f = $entry->time_needed->formatter(); $f->type = Date_time_format_date_only; echo $entry->time_needed->format($f); ?> </td> </tr> <?php } ?> <tr> <th>Assigned to</th> <td> <?php $assignee = $entry->assignee(); if ($assignee) { $text = $assignee->title_as_link(); $time_owned = $entry->assignee_age(); if (isset($time_owned)) { $text .= ' (' . $time_owned->format() . ')'; } } else { $text = '(None)'; } echo $this->app->get_icon_with_text($entry->get_assignee_icon_url(), Sixteen_px, $text); ?> </td> </tr> <?php $creator = $entry->creator(); $reporter = $entry->reporter(); if (!$reporter->equals($creator)) { ?> <tr> <th>Reported By</th> <td> <?php if ($reporter) { echo $reporter->title_as_link(); } else { echo '(None)'; } ?> </td> </tr> <?php } if (!$this->_hide_users) { ?> <tr> <th>Created</th> <td> <?php echo $entry->time_created->format(); ?> by <?php echo $creator->title_as_link(); ?> </td> </tr> <?php if (!$entry->time_created->equals($entry->time_modified)) { $modifier = $entry->modifier(); ?> <tr> <th>Modified</th> <td><?php echo $entry->time_modified->format(); ?> by <?php echo $modifier->title_as_link(); ?> </td> </tr> <?php } } ?> </table> <?php $this->_echo_branches_as_html($entry); ?> </div> <?php $this->_echo_html_description($entry); $this->_echo_html_extra_description($entry); }