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

[% IF user.login AND user.settings.view_testopia.value == 'on' %]
</ul>
<div class="label">Testopia: </div>
<ul class="links testopia_links">
  <li><a href="tr_show_product.cgi">Product Dashboard</a></li>
[% IF user.in_group('Testers') %]
  <li><span class="separator">| </span><a href="tr_new_plan.cgi">New Plan</a></li>
[% END %]
  <li><span class="separator">| </span><a href="tr_new_case.cgi?plan_id=[% plan_id FILTER none %]">New Case</a></li>
  <li><span class="separator">| </span><a href="tr_new_run.cgi?plan_id=[% plan_id FILTER none %]&case_status_id=2">New Run</a></li>
  <li><span class="separator">| </span><a href="tr_query.cgi">Search</a></li>

[% IF user.in_group('admin') %]
  <li><span class="separator">| </span><a href="tr_admin.cgi">Admin</a></li>
[% END %]
  <li><span class="separator">| </span><a href="testopia/doc/Manual.pdf" target="_blank">Help</a></li>

  <li class="tr_saved_search">
  <select class="dropdown" onchange="if (this.selectedIndex != 0) {document.location=this.value}">
    <option>--Testopia--</option>
    <option value="tr_list_runs.cgi?current_tab=run&run_status=0&distinct=1">Current Runs</a></option>
    <option value="tr_list_plans.cgi?current_tab=plan&report_type=myplans">My Plans</a></option>
    <option value="tr_list_cases.cgi?current_tab=case&summary_type=allwordssubstr&summary=&tcaction_type=allwordssubstr&tcaction=&tceffect_type=allwordssubstr&tceffect=&script_type=allwordssubstr&script=&requirement_type=allwordssubstr&requirement=&tag_type=allwords&tags=&author_type=exact&author=&default_tester_type=substring&default_tester=[% user.login FILTER url_quote %]&case_id=&plan_id=&distinct=1">My Cases</a></option>
    <option value="tr_list_runs.cgi?current_tab=run&summary_type=allwordssubstr&summary=&notes_type=allwordssubstr&notes=&environment_type=allwordssubstr&environment=&tag_type=allwords&tag=&manager_type=substring&manager=[% user.login FILTER url_quote %]&run_id=&plan_id=&assignee_type=substr&assignee=[% user.login FILTER url_quote %]&distinct=1&order=run_id&dir=DESC">My Runs</a></option>
  [% FOREACH q = user.testopia_queries %]
    <option value="[% q.query %]">[% q.name FILTER html %]</option>
  [% END %]        
  </select>
  </li>
  <li class="form tr_find">
  <form action="tr_quicksearch.cgi">
    <input class="txt" type="text" name="searchstr" id="tr_quicksearch"  />
    <input class='btn testopia_btn' type='submit' value='Find'>
  </form>
  </li>
</ul>
[% END %]
<script type="text/javascript">
  DEFAULT_CASE_STATUS = '[% Param('default-test-case-status') %]';
</script>
