gecko-dev/webtools/litmus/templates/en/default/show/search_for_testcases.tmpl

95 строки
4.4 KiB
Cheetah
Executable File

[%# ***** BEGIN LICENSE BLOCK *****
# Version: MPL 1.1
#
# 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 Litmus.
#
# The Initial Developer of the Original Code is
# The Mozilla Corporation.
# Portions created by the Initial Developer are Copyright (C) 2006
# the Initial Developer. All Rights Reserved.
#
# Contributor(s):
# Chris Cooper <ccooper@deadsquid.com>
# Zach Lipton <zach@zachlipton.com>
#
# ***** END LICENSE BLOCK *****
#%]
[%# INTERFACE:
# no interface for this template
#%]
[% title="View Testcase" %]
[% INCLUDE global/html_header.tmpl js_files=['js/Help.js'] %]
[% INCLUDE global/litmus_header.tmpl %]
<script type="text/javascript">
function init()
{
FormInit(document.forms['testcase_search_by_id'], document.location.search);
FormInit(document.forms['testcase_fulltext_search'], document.location.search);
FormInit(document.forms['testcase_search_recent'], document.location.search);
}
var relevanceHelpTitle = 'What is relevance?';
var relevanceHelpText = '<p>Relevance values are non-negative floating-point numbers. Zero relevance means no similarity. Relevance is computed based on the number of words in the row, the number of unique words in that row, the total number of words in the collection, and the number of documents (rows) that contain a particular word.</p><p><a target="external_link" href="http://dev.mysql.com/doc/refman/5.0/en/fulltext-search.html">More information on full-text searching can be found here.</a></p>';
</script>
<div id="page">
[% INCLUDE sidebar/sidebar.tmpl %]
<div id="content">
<h1 class="firstHeading">[% title | html %]</h1>
<div class="section-full">
<table class="testcase-search">
<tr>
<th>By Testcase ID#</th>
<th>By Full-text Search</th>
<th>By Recently Added/Changed</th>
</tr>
<tr>
<td valign="top" width="33%"><div class="testcase-search">Testcase ID#:<br/><form action="show_test.cgi" method="get" name="testcase_search_by_id" id="testcase_search_by_id"><input type="text" id="id" name="id" size="25" /><br/><input class="button" type="submit" value="Search By ID"></form></td></div></td>
<td valign="top" width="33%"><div class="testcase-search">String to match:<br/><form action="show_test.cgi" method="get" name="testcase_fulltext_search" id="testcase_fulltext_search"><input type="text" id="text_snippet" name="text_snippet" size="25" /><br/>Minimum Relevance Score:<br/><input type="text" name="relevance_threshold" id="relevance_threshold" value="[% default_relevance_threshold %]" size="5" />&nbsp;&lArr;&nbsp;<a name="relevance_help" onclick="toggleHelp(relevanceHelpTitle,relevanceHelpText);">What is relevance?</a><br/># of Matches:<br/><input type="text" name="match_limit" id="match_limit" value="[% default_match_limit %]" size="5" /><br/><input class="button" type="submit" value="Fulltext Search"></form>
</div></td>
<td valign="top"><div class="testcase-search"><form action="show_test.cgi" method="get" name="testcase_search_recent" id="testcase_search_recent"><input type="radio" id="recently" name="recently" value="added" checked/>&nbsp;Added<br/><input type="radio" id="recently" name="recently" value="changed" />&nbsp;Changed<br/>Within the last <input type="text" name="num_days" value="[% default_num_days %]" size="3"> days<br/># of Matches:<br/><input type="text" name="match_limit" id="match_limit" value="[% default_match_limit %]" size="5" /><br/><input class="button" type="submit" value="Search Recent"></div></td>
</tr>
</table>
</div>
[% IF testcases %]
<h1 class="firstHeading">Matching Testcases[% IF search_string_for_display %] - [% search_string_for_display | html %][% END %]</h1>
<div class="section-full">
<div class="section-content">
[% INCLUDE show/testcase_list.tmpl %]
</div>
</div>
[% END %]
</div> <!--END content-->
</div> <!--END page-->
[% INCLUDE global/litmus_footer.tmpl %]
[% INCLUDE global/html_footer.tmpl %]