summaryrefslogtreecommitdiffstats
path: root/template
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2009-10-29 05:46:15 +0100
committermkanat%bugzilla.org <>2009-10-29 05:46:15 +0100
commit65d75763b90b9485b52f15e2938951ad0fbfaa21 (patch)
tree0bc0f5bfd15af4dd7640f4569fa49a710fc0f3f5 /template
parentc51e34ce8c15bc53672bd58083196e6b2f2c254f (diff)
downloadbugzilla-65d75763b90b9485b52f15e2938951ad0fbfaa21.tar.gz
bugzilla-65d75763b90b9485b52f15e2938951ad0fbfaa21.tar.xz
Bug 524234: When there are no search results, include helpful links
Patch by Max Kanat-Alexander <mkanat@bugzilla.org> r=dkl, a=mkanat
Diffstat (limited to 'template')
-rw-r--r--template/en/default/list/list.html.tmpl43
1 files changed, 34 insertions, 9 deletions
diff --git a/template/en/default/list/list.html.tmpl b/template/en/default/list/list.html.tmpl
index 7c372f1f4..a3e3a767a 100644
--- a/template/en/default/list/list.html.tmpl
+++ b/template/en/default/list/list.html.tmpl
@@ -142,7 +142,7 @@
<span class="bz_result_count">
[% IF bugs.size == 0 %]
- [% terms.zeroSearchResults %].
+ <span class="zero_results">[% terms.zeroSearchResults %].</span>
[% ELSIF bugs.size == 1 %]
One [% terms.bug %] found.
[% ELSE %]
@@ -150,6 +150,18 @@
[% END %]
</span>
+[% IF bugs.size == 0 %]
+ <ul class="zero_result_links">
+ <li>[% PROCESS enter_bug_link %]</li>
+ [% IF one_product.defined %]
+ <li><a href="enter_bug.cgi">File a new [% terms.bug %] in a
+ different product</a></li>
+ [% END %]
+ <li><a href="[% PROCESS edit_search_url %]">Edit this search</a></li>
+ <li><a href="query.cgi">Start a new search</a></li>
+ </ul>
+[% END %]
+
<br>
[%############################################################################%]
@@ -226,11 +238,7 @@
[% END %]
<td valign="middle" class="bz_query_edit">
- [% editqueryname = searchname OR defaultsavename OR '' %]
- <a href="query.cgi?[% urlquerypart FILTER html %]
- [% IF editqueryname != '' %]&amp;known_name=
- [% editqueryname FILTER url_quote %]
- [% END %]">Edit&nbsp;Search</a>
+ <a href="[% PROCESS edit_search_url %]">Edit&nbsp;Search</a>
</td>
[% IF searchtype == "saved" %]
@@ -259,10 +267,9 @@
</tr>
</table>
-[% IF cgi.param('product').size == 1 && cgi.param('product') != "" %]
+[% IF one_product.defined %]
<p class="bz_query_single_product">
- <a href="enter_bug.cgi?product=[% cgi.param('product') FILTER url_quote %]">File
- a new [% terms.bug %] in the "[% cgi.param('product') FILTER html %]" product</a>
+ [% PROCESS enter_bug_link %]
</p>
[% END %]
@@ -271,3 +278,21 @@
[%############################################################################%]
[% PROCESS global/footer.html.tmpl %]
+
+[% BLOCK edit_search_url %]
+ [% editqueryname = searchname OR defaultsavename OR '' %]
+ query.cgi?[% urlquerypart FILTER html %]
+ [%- IF editqueryname != '' %]&amp;known_name=
+ [%- editqueryname FILTER url_quote %]
+ [% END %]
+[% END %]
+
+[% BLOCK enter_bug_link %]
+ <a href="enter_bug.cgi
+ [%- IF one_product.defined %]?product=
+ [%- one_product.name FILTER url_quote %][% END %]">File
+ a new [% terms.bug %]
+ [% IF one_product.defined %]
+ in the "[% one_product.name FILTER html %]" product
+ [% END %]</a>
+[% END %]