[%# 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:
  # ...
  #%]
[% IF table.list_count > 0 %]
<script type="text/javascript">
dojo.require("dojo.widget.Tooltip");
</script>
  [% IF dotweak %]
Select:
<a href="javascript:sall()">All</a>,
<a href="javascript:snone()">None</a>
  [% END %]

  [% link = "${table.get_order_url}&order=" %]
  [% DECORATIVE_BORDER_100_BEGIN %]
<table width="100%">
<tr class="bz_row_header">
  [% IF dotweak %]<th></th>[% END %]
  <th align="left"><a href="[% link %]run_id[% paren %]">ID[% table.arrow IF table.last_sort == 'alias' %]</a></th>
  <th align="left"><a href="[% link %]summary[% paren %]">Summary[% table.arrow IF table.last_sort == 'alias' %]</a></th>
  <th align="left"><a href="[% link %]build[% paren %]">Build[% table.arrow IF table.last_sort == 'alias' %]</a></th>
  <th align="left"><a href="[% link %]manager[% paren %]">Manager[% table.arrow IF table.last_sort == 'alias' %]</a></th>
  <th align="left"><a href="[% link %]environment[% paren %]">Environment[% table.arrow IF table.last_sort == 'alias' %]</a></th>
  <th align="left"><a href="[% link %]start_date[% paren %]">Started[% table.arrow IF table.last_sort == 'alias' %]</a></th>
  <th align="left"><a href="[% link %]stop_date[% paren %]">Finished[% table.arrow IF table.last_sort == 'alias' %]</a></th>
  <th align="center">% Completed</th>
  <th align="center">Out of</th>
  [% IF NOT plan %]<th align="left"><a href="[% link %]plan_id[% paren %]">Plan[% table.arrow IF table.last_sort == 'alias' %]</a></th>[% END %]
</tr>

  [% FOREACH run = table.list %]

<TR class="[% loop.count % 2 == 1 ? "bz_row_even" : "bz_row_odd" %]">
  [% IF dotweak %]<td align="center"><input type="checkbox" id="r_[% run.id FILTER none %]" name="r_[% run.id FILTER none %]" /></td> [% END %]
  <td align="left"><a href="tr_show_run.cgi?run_id=[% run.id FILTER none %]">[% run.id FILTER html %]</a></td>  
  <td align="left">[% run.summary FILTER html %]</td>
  <td align="left">[% run.build.name FILTER html %]</td>
  <td align="left">[% run.manager.login FILTER html %]</td>
  <td align="left">[% run.environment.name FILTER html %]</td>
  <td align="left">[% run.start_date FILTER time %]</td>
  <td align="left">
      [% IF NOT run.stop_date %]
        Running
      [% ELSE %]
        [% run.stop_date FILTER time %]
      [% END %]
  </td>
  <td align="center">
    [% PROCESS testopia/percent_bar.html.tmpl %]
  </td>
  <td>[% run.case_count FILTER html %]</td>
  [% IF NOT plan %]<td align="left"><a href="tr_show_plan.cgi?plan_id=[% run.plan.id FILTER none %]">[% run.plan.id FILTER html %]</a></td>[% END %]
</tr>
  [% END %]
  [% IF NOT table.viewall %]
    [% PROCESS navigation %]
  [% END %]
</table>

  [% DECORATIVE_BORDER_END %]

[%# No else clause required here -- see list.html.tmpl just below
  # PROCESS testopia/run/table.html.tmpl
  #%]

[% END %]
