[%# 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 Novell.
  # All Rights Reserved.
  #
  # Contributor(s): Greg Hendricks <ghendricks@novell.com>
  #%]
<div id="caserun-filter-div" style="visibility:hidden">
<form method="GET" action="tr_list_caseruns.cgi" id="caserun_filter_form">
<input type="hidden" name="run_id" value="[% run.id FILTER none %]" />
<input type="hidden" name="current_tab" value="case_run" />
[% query = table.get_query_part %]
<table>
  <tr class="bz_row_header">
    <th>Status</th>
    <th>Category</th>
    <th>Build</th>
    <th>Environment</th>
    <th>Priority</th>
    <th>Component</th>
    <th>Automatic</th>
    <td rowspan="2">
      <table>
        <tr>
          <th align="right">Assignee Contains</th>
          <td><input type="hidden" name="assignee_type" value="substring" />
              <input name="assignee">
          </td>
        </tr>
        <tr>
          <th align="right">Tested By Contains</th>
          <td><input type="hidden" name="testedby_type" value="substring" />
              <input name="testedby">
          </td>
        </tr>
        <tr>
          <th align="right">Summary Contains</th>
          <td><input type="hidden" name="case_summary_type" value="allwordssubstr" />
              <input name="case_summary">
          </td>
        </tr>
        <tr>
          <th align="right">Requirement</th>
          <td><input type="hidden" name="requirement_type" value="substring" />
              <input name="requirement">
          </td>
        </tr>
        <tr>
          <th align="right">Case Tags</th>
          <td><input type="hidden" name="tags_type" value="anyexact" />
              <input id="tags" name="tags"
                     dojoType="combobox" 
                     dataUrl="tr_quicksearch.cgi?action=gettag&product_id=[% run.plan.product_id FILTER none %]&search=${searchString}" 
                     mode="remote"
                     searchDelay="1000"
                     maxListLength="10">
          </td>
        </tr>
      </table>
    </td>
  </tr>
  <tr>
    <td valign="top">
      [% PROCESS select sel = { name => "case_run_status",
                                byname => 1,    
                                list => caserun.get_status_list,
                                elements => 5,
                                mult => 1, }
      %]
    </td>
    <td valign="top">
      [% PROCESS select sel = { name => "category", 
                                list => run.filter_case_categories,
                                byname => 1,
                                elements => 5,
                                mult => 1, }
      
      %]
    </td>
    <td valign="top">
      [% PROCESS select sel = { name => "build", 
                                list => run.filter_builds,
                                byname => 1,
                                elements => 5,
                                mult => 1, }
      %]
    </td>
    <td valign="top">
      [% PROCESS select sel = { name => "environment", 
                                list => run.filter_environments,
                                byname => 1,
                                elements => 5,
                                mult => 1, }
      %]
    </td>
    <td valign="top">
      [% PROCESS select sel = { name => "priority_id", 
                                list => case.get_priority_list,
                                elements => 5,
                                mult => 1, }
      %]
    </td>
    <td valign="top">
      [% PROCESS select sel = { name => "component", 
                                list => run.filter_components,
                                byname => 1,
                                elements => 5,
                                mult => 1, }
      %]
    </td>
    <td valign="top">
    [% PROCESS select sel = { name  => 'isautomated',
                  accesskey => 'a', 
                  list      => 
                    [   { id => "0", name => "Manual" },
                        { id => "1", name => "Automatic" }  ]
                  elements  => 5,
                  mult      => 1 } %]
    </td>
  </tr>
</table>
</form>
</div>