[%# 1.0@bugzilla.org %]
[%# The contents of this file are subject to the Mozilla Public
  # License Version 1.1 (the "License"); you may not use this file
  # except in compliance with the License. You may obtain a copy of
  # the License at http://www.mozilla.org/MPL/
  #
  # Software distributed under the License is distributed on an "AS
  # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  # implied. See the License for the specific language governing
  # rights and limitations under the License.
  #
  # The Original Code is the Bugzilla Test Runner System.
  #
  # The Initial Developer of the Original Code is Maciej Maczynski.
  # Portions created by Maciej Maczynski are Copyright (C) 2001
  # Maciej Maczynski. All Rights Reserved.
  #
  # Contributor(s): Ed Fuentetaja <efuentetaja@acm.org>
  #                 Greg Hendricks <ghendricks@novell.com>
  #%]

[%# INTERFACE:
  # ...
  #%]

[% show_order = 0 %]
  
<script src="testopia/js/caserun.js" type="text/javascript"></script>

<p style="margin-top:0;margin-bottom:4px;">
<a href="javascript:coal()">Collapse All</a>
<a href="javascript:exal()">Expand All</a>
</p>
<div id="caserun_table">
[% DECORATIVE_BORDER_100_BEGIN %]

[%##### TABLE HEADER #####%]
  [% link = "${table.get_order_url}&order=" %]
<table width="100%">
  <tr class="bz_row_header">
    <th width="24" colspan="2">
        <a href="[% link %]case_id">Case&nbsp;ID</a></th>
    <th><a href="[% link %]sortkey">Index</a></th>
    <th><a href="[% link %]build">Build</a></th>
    <th><a href="[% link %]environment">Environment</a></th>
    <th><a href="[% link %]assignee">Assigned</a></th>
    <th><a href="[% link %]testedby">Tested by</a></th>
    <th><a href="[% link %]close_date">Close&nbsp;date</a></th>
    <th><a href="[% link %]case_run_status">Status</a></th>
    <th><a href="[% link %]priority">Priority</a></th>
    <th><a href="[% link %]category">Category</a></th>
    <th><a href="[% link %]component">Component</a></th>
    <th>Bugs</th>
  </tr>


[%##### Loop start #####%]
[% FOREACH caserun = table.list %]
  [% index = loop.count %]
  <!-- START HEADER FOR [% index %]: CASE [% caserun.case.id %] -->
  <tr class="[% loop.count % 2 == 0 ? "bz_row_odd" : "bz_row_even" %]">
    <td colspan="13"><div style="margin-left:13px;margin-right:29px;"><b><a href="[% link %]summary" style="text-decoration:none;">Summary</a>:</b>&nbsp;
        [% caserun.case.summary FILTER html %]</div></td></tr>
  <tr id="head_caserun_[% index %]" class="[% loop.count % 2 == 0 ? "bz_row_odd" : "bz_row_even" %]" dojoType="ContentPane">
    [% PROCESS "testopia/caserun/short-form-header.html.tmpl" %]
  </tr>
  <tr class="[% loop.count % 2 == 0 ? "bz_row_odd" : "bz_row_even" %]">
  <!-- ### START BODY FOR CASE [% caserun.case.id %] ### -->
  <tr id="body_caserun_[% index %]" class="[% loop.count % 2 == 0 ? "bz_row_odd" : "bz_row_even" %]">
    [% PROCESS "testopia/caserun/short-form.html.tmpl" %]
  </tr>
[% END %]

[% IF NOT table.viewall %]
  [% PROCESS navigation %]
[% END %]
</table>
  
[% DECORATIVE_BORDER_END %]
</div>
