[%# 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>
  #%]

[%##### BEGIN Hidden Pane #####%]

  <td colspan="11" style="margin:0px;padding:0px;">
  <div id="ra[% index %]" class="ae_dv">

  [%##### Action, Expected Results #####%]
    <table class="ae_tb">
      <tr>
        <td valign="top" width="50%" class="ae_s">
        <div style="overflow:auto" >
          <b>Action:</b><br/>[% caserun.case.text.action %]
        </div>
        </td>
        <td style="width:10px";/>
        <td valign="top" align="left" width="50%" class="ae_s">
        <div style="overflow:auto">
          <b>Expected Results:</b><br/>[% caserun.case.text.effect %]
        </div>
        </td>
      </tr>
      [% IF caserun.case.script OR caserun.case.arguments %]
      <tr>
        <td><b>Script:</b>[% caserun.case.script FILTER html %]</td>
        <td style="width:10px";/>
        <td><b>Arguments:</b>[% caserun.case.arguments FILTER html %]</td>
      </tr>
      [% END %]
    </table>
        
    <input id="no[% index %]" type="hidden" value=""/>
    <input id="en[% index %]" type="hidden" value="[% caserun.canedit %]"/>

    <div class="cc_xx">
  [%##### Status #####%]
    <table>
    <tr>
    <td>
      <div class="cc_i">
        <b>Status:</b>
      </div>
      [% FOREACH status = caserun.get_status_list %]
          <div class="cc_i">
          [% IF NOT caserun.canedit %]
            <a id="st1_[% index %]">
              <img id="im[% loop.count %]_[% index %]" src="testopia/img/[% status.name FILTER none %]_gray.gif" width="23" height="23" alt="[% status.name FILTER none %] (disabled)" title="[% status.name FILTER none %](disabled)" border="0" /></a>
          [% ELSE %]
            <a id="st1_[% index %]" href="javascript:chNote([% index %], [% caserun.id FILTER none %], document.getElementById('notes[% index %]').value); chStat([% index %], [% status.id FILTER none %], [% caserun.id FILTER none %]);">
              <img id="im1_[% index %]" src="testopia/img/[% status.name FILTER none %].gif" width="23" height="23" alt="[% status.name FILTER none %]" title="[% status.name FILTER none %]" border="0" /></a>
          [% END %]
          </div>
      [% END %]
    </td>

    <td rowspan="2">
    [%##### Notes #####%]
      <div style="float:left;font-weight:bold;">Notes: <a href="#" onclick="notesZoom([% index %],'[% caserun.case.id %]')"><img src="testopia/img/env_lookup.png" alt="Zoom" title="Zoom"/></a></div>
      <div class="cc_i">
        <div style="height:150px; width:400px; border:1px solid #000; background-color: #f8f8f8; overflow:auto;" id="old_notes[% index %]" ><pre>[% caserun.notes %]</pre></div>
      </div>
    </td>
    </tr>
    <tr>
      <td>
        <div style="font-weight:bold;">Add Note:</div>
        <textarea id="notes[% index %]" 
        [% IF caserun.canedit %]
          onkeypress="document.getElementById('no[% index %]').value=1;document.getElementById('bs[% index %]').disabled = false" 
        [% END %]
        style="height:100px; width:400px;" rows=""></textarea>
        <input id="bs[% index %]" type="button" disabled="true" onclick="chNote([% index %], [% caserun.id FILTER none %], document.getElementById('notes[% index %]').value);" value="Append Note">
      </td>
    </tr>  
  </table>

      <div style="float:left;margin-left:7px;">
      [% IF caserun.runningby != '' || caserun.canedit == 0 %]
        <a id="aw_[% index %]">
          <img id="awi_[% index %]" src="testopia/img/awg.gif" width="25" height="23" 
          [% IF caserun.canedit == 0 %]
            alt="Can't run it" title="Can't run it" 
          [% else %]
            alt="Already running" title="Already running" 
          [% END %]
          border="0" /></a>
      [% ELSE %]
        
      [% END %]
      </div>
    </div>

  [%##### Bugs #####%]
    <div class="cc_xx">
      <div style="float:left;">
        <div style="float:left;font-weight:bold;">[% terms.Bugs %] detected (all runs):</div>
        <div class="cc_i">
          [<span id="bgl[% index %]">
          [% FOREACH bug = caserun.case.bugs %]
            [% bug.bug_id FILTER bug_link(bug.bug_id) %]
          [% END %]
          </span>]
        </div>
        <div class="cc_i">
          <a href="enter_bug.cgi?product=[% caserun.run.plan.product.name FILTER url_quote %]&caserun_id=[% caserun.id FILTER none %]&version=[% caserun.run.plan.product_version FILTER url_quote %]&component=[% caserun.case.components.0.name FILTER url_quote %]&short_desc=Test%20Case%20[% caserun.case.id FILTER none %]%20-%20[% caserun.case.summary FILTER url_quote %]&comment=STATUS:%20[% caserun.status %]%0D%0ABUILD:%20[% caserun.build.name FILTER url_quote %]%0D%0AENVIRONMENT:%20[% caserun.environment.name FILTER url_quote %]%0D%0ANOTES:%20[% caserun.notes FILTER url_quote %]%0D%0A&assigned_to=[% caserun.case.components.0.default_assignee.login FILTER url_quote %]&qa_contact=[% caserun.case.components.0.default_qa_contact.login FILTER url_quote %]" target="_blank"><img src="testopia/img/snew.gif" alt="Log a New Bug" title="Log a New Bug" style="vertical-align:text-bottom;" /></a>&nbsp;
        </div>
        <div style="float:left;"><input type="text" size="6" value="" id="mbg[% index %]" [% enabled %]/></div>
        <div class="cc_i"><input type="button" value="Attach Bug" id="sk[% index %]" onclick="attch([% index %], [% caserun.id FILTER none %], document.getElementById('mbg[% index %]').value);"/></div>
  [%##### Assignee #####%]
        <div class="cc_i"><input value="[% user.login FILTER html %]" id="assignee_[% index %]" /><input type="button" value="Assign" onclick="chNote([% index %], [% caserun.id FILTER none %], document.getElementById('notes[% index %]').value); chOwn([% index %], [% caserun.id FILTER none %], document.getElementById('assignee_[% index %]').value)">
        <a href="javascript:userLookup('document.Create.assigned_to', document.Create.assigned_to.value);">
        <image src="images/users.png" border="0" alt="Lookup User" title="Lookup User"></a>
        <a id="aw_[% index %]" href="javascript:aws([% index %], [% caserun.id FILTER none %])">
      </div>
      <div style="float:right; margin-right:20px;">
        <a href="tr_show_caserun.cgi?caserun_id=[% caserun.id FILTER none %]">Classic interface...</a>
      [% IF caserun.candelete %]
        &nbsp;&nbsp;&nbsp;<a href="tr_show_caserun.cgi?action=delete&caserun_id=[% caserun.id FILTER none %]">Delete</a>
      [% END %]
      </div>
    </div>
    <div class="cc_xx" style="margin-bottom:10px;"><div id="pp[% index %]" class="floatMsg"></div></div>
    </div>
  </div>
  </td>

