/**
  * Show information for a branch's release.
  * @param JOB_BRANCH_INFO $branch_info
  * @access private
  */
 protected function _echo_plain_text_branch_release_info($branch_info)
 {
     if ($branch_info->is_closed()) {
         echo 'Next release';
     } else {
         echo 'Not scheduled for release';
     }
 }
示例#2
0
    /**
     * 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 {
                ?>
  &ndash; <?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 
    }