]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 487106: Add explanation when a whining is empty
authorEdmund Wong <ewong@pw-wspx.org>
Wed, 19 May 2010 18:05:38 +0000 (20:05 +0200)
committerFrédéric Buclin <LpSolit@gmail.com>
Wed, 19 May 2010 18:05:38 +0000 (20:05 +0200)
r=Callek r=LpSolit a=LpSolit

template/en/default/whine/mail.html.tmpl
template/en/default/whine/mail.txt.tmpl

index a4f0edeefef86b0138c80b505dcf19174b3a5aa5..ae4f00cfc4332d7b7d946a649d91efccd227a430 100644 (file)
       [% END %]
     </p>
 
+[% IF queries.size %]
+  [% FOREACH query=queries %]
 
-[% FOREACH query=queries %]
+    <h2>[%+ query.title FILTER html %]</h2>
 
-  <h2>[%+ query.title FILTER html %]</h2>
-
-  <table width="100%">
-    <tr>
-      <th align="left">ID</th>
-      <th align="left">Sev</th>
-      <th align="left">Pri</th>
-      <th align="left">Plt</th>
-      <th align="left">Assignee</th>
-      <th align="left">Status</th>
-      <th align="left">Resolution</th>
-      <th align="left">Summary</th>
-    </tr>
-
-    [% FOREACH bug=query.bugs %]
+    <table width="100%">
       <tr>
-        <td align="left"><a href="[%+ urlbase FILTER html %]show_bug.cgi?id=
-            [%- bug.bug_id %]">[% bug.bug_id %]</a></td>
-        <td align="left">[% display_value("bug_severity", bug.bug_severity) FILTER html %]</td>
-        <td align="left">[% display_value("priority", bug.priority) FILTER html %]</td>
-        <td align="left">[% display_value("rep_platform", bug.rep_platform) FILTER html %]</td>
-        <td align="left">[% bug.assigned_to FILTER html %]</td>
-        <td align="left">[% display_value("bug_status", bug.bug_status) FILTER html %]</td>
-        <td align="left">[% display_value("resolution", bug.resolution) FILTER html %]</td>
-        <td align="left">[% bug.short_desc FILTER html %]</td>
+        <th align="left">ID</th>
+        <th align="left">Sev</th>
+        <th align="left">Pri</th> 
+        <th align="left">Plt</th>
+        <th align="left">Assignee</th>
+        <th align="left">Status</th>
+        <th align="left">Resolution</th>
+        <th align="left">Summary</th>
       </tr>
-    [% END %]
-  </table>
-[% END %]
 
+      [% FOREACH bug=query.bugs %]
+        <tr>
+          <td align="left"><a href="[%+ urlbase FILTER html %]show_bug.cgi?id=
+              [%- bug.bug_id %]">[% bug.bug_id %]</a></td>
+          <td align="left">[% display_value("bug_severity", bug.bug_severity) FILTER html %]</td>
+          <td align="left">[% display_value("priority", bug.priority) FILTER html %]</td>
+          <td align="left">[% display_value("rep_platform", bug.rep_platform) FILTER html %]</td>
+          <td align="left">[% bug.assigned_to FILTER html %]</td>
+          <td align="left">[% display_value("bug_status", bug.bug_status) FILTER html %]</td>
+          <td align="left">[% display_value("resolution", bug.resolution) FILTER html %]</td>
+          <td align="left">[% bug.short_desc FILTER html %]</td>
+        </tr>
+      [% END %]
+    </table>
+  [% END %]
+[% ELSE %]
+
+  <h3>No [% terms.bugs %] were found that matched the search criteria.</h3>
+[% END %]
   </body>
 </html>
 
index 862ae26711bd9f6fa7fd17e6a75b20267d2c6774..13216d895e8ccb96184128304e956d2090b52ac0 100644 (file)
   This search was scheduled by [% author.login %].
 [% END %]
 
-
-[% FOREACH query=queries %]
+[% IF queries.size %]
+  [% FOREACH query=queries %]
 
 [%+ query.title +%]
 [%+ "-" FILTER repeat(query.title.length) %]
 
- [% FOREACH bug=query.bugs %]
 [% FOREACH bug=query.bugs %]
   [% terms.Bug +%] [%+ bug.bug_id %]:
   [%+ urlbase %]show_bug.cgi?id=[% bug.bug_id +%]
   Priority: [%+ display_value("priority", bug.priority) -%]
   Assignee: [%+ bug.assigned_to %]
     Status: [%+ display_value("bug_status", bug.bug_status) %]
             [%- IF bug.resolution -%] Resolution: [% display_value("resolution", bug.resolution) -%]
-                                [%- END %]
+            [%- END %]
    Summary: [% bug.short_desc %]
 
- [% END %]
  [% END %]
 
-[% END %]
+  [% END %]
+[% ELSE %]
 
+  No [% terms.bugs %] were found that matched the search criteria.
+[% END %]