[%# 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 Testopia System.
  #
  # The Initial Developer of the Original Code is Greg Hendricks.
  # Portions created by Greg Hendricks are Copyright (C) 2006
  # Greg Hendricks. All Rights Reserved.
  #
  # Contributor(s): Greg Hendricks <ghendricks@novell.com>
  #%]
<style type="text/css">
#execution_report td {
    font-weight: bold;
    text-align: center;
}
#execution_report a {
    color: black;
}
#execution_report th {
    font-weight: bold;
    background-color: #DCDCDC;
    text-align: left;
}

.passed_cell{
    border: 1px solid black;
    background-color: #56e871;
    padding-left: 5px;
    padding-right: 5px;
}
.failed_cell{
    border: 1px solid black;
    background-color: #ed3f58;
    padding-left: 5px;
    padding-right: 5px;
}
.blocked_cell{
    border: 1px solid black;
    background-color: #e17a56;
    padding-left: 5px;
    padding-right: 5px;
}
.complete_cell{
    border: 1px solid black;
    background-color: #B8A0D2;
    padding-left: 5px;
    padding-right: 5px;
}

</style>
<div id="execution_report">
<h4>Execution Report for Run[% 's' IF runs.size > 1 %]: 
[% FOREACH r IN runs %]
 <a href="tr_show_run.cgi?run_id=[% r FILTER html %]">[% r FILTER html %]</a>&nbsp;
[% END %] 
[% IF plans %]
 <br>In Plans: 
 [% FOREACH r IN plans %]
   <a href="tr_show_plan.cgi?run_id=[% r FILTER html %]">[% r FILTER html %]</a>&nbsp;
 [% END %] 
[% END %]</h4>

<table style="border: 1px solid; margin-top: 15px;">
  <tr><th>Start Date:</th><td>[% closed_from_converted FILTER html %]</td></tr>
  <tr><th>Stop Date:</th><td>[% closed_to_converted FILTER html %]</td></tr>
</table>
<table style="margin-top: 15px;">
  <tr><th>PASSED</th><th>FAILED</th><th>BLOCKED</th><th>TOTAL</th><tr>
  <tr style="align: center">
    <td class="passed_cell"><a href="tr_list_caseruns.cgi?run_id=[% runs.join(',') FILTER uri %]&closed_from=[% closed_from FILTER uri %]&closed_to=[% closed_to FILTER uri %]&case_run_status=PASSED" target="_blank">[% passed FILTER html %]</a></td>
    <td class="failed_cell"><a href="tr_list_caseruns.cgi?run_id=[% runs.join(',') FILTER uri %]&closed_from=[% closed_from FILTER uri %]&closed_to=[% closed_to FILTER uri %]&case_run_status=FAILED" target="_blank">[% failed FILTER html %]</a></td>
    <td class="blocked_cell"><a href="tr_list_caseruns.cgi?run_id=[% runs.join(',') FILTER uri %]&closed_from=[% closed_from FILTER uri %]&closed_to=[% closed_to FILTER uri %]&case_run_status=BLOCKED" target="_blank">[% blocked FILTER html %]</a></td>
    <td class="complete_cell"><a href="tr_list_caseruns.cgi?run_id=[% runs.join(',') FILTER uri %]&closed_from=[% closed_from FILTER uri %]&closed_to=[% closed_to FILTER uri %]&case_run_status=PASSED&case_run_status=FAILED&case_run_status=BLOCKED" target="_blank">[% total FILTER html %]</a></td>
  <tr>
</table>
</div>
