]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 341924: When viewing several bugs at once using show_bug.cgi?format=multiple...
authorlpsolit%gmail.com <>
Mon, 19 Jun 2006 06:11:59 +0000 (06:11 +0000)
committerlpsolit%gmail.com <>
Mon, 19 Jun 2006 06:11:59 +0000 (06:11 +0000)
show_bug.cgi
skins/standard/show_multiple.css
template/en/default/bug/show-multiple.html.tmpl

index 36e32505776cb779574e23d1d69956e0099336f0..578b6a7a88040b406a1eed0d778a8640ee550bfd 100755 (executable)
@@ -78,8 +78,12 @@ if ($single) {
     }
 } else {
     foreach my $id ($cgi->param('id')) {
-        my $bug = new Bugzilla::Bug($id, Bugzilla->user->id);
-        push @bugs, $bug;
+        # Be kind enough and accept URLs of the form: id=1,2,3.
+        my @ids = split(/,/, $id);
+        foreach (@ids) {
+            my $bug = new Bugzilla::Bug($_, Bugzilla->user->id);
+            push(@bugs, $bug);
+        }
     }
 }
 
index 573a587b645b42be669ea02dcd1314592a6d83c9..50875382d7b2d51747fe3bf3ee3c8ec19e911ef3 100644 (file)
@@ -45,3 +45,8 @@ h1 {
 .bugfields table.timetracking th, .bugfields table.timetracking td {
   width: 10em;
 }
+
+.error {
+  color: red;
+  font-weight: bold;
+}
index 9244592d824ed8fd1de6f03389f0d1732c3d512d..023cb9573281fbd85175f87c8cfac7add27b493b 100644 (file)
   </h1>
 
   <table class="bugfields">
+  [% IF bug.error %]
+    <tr>
+      <td class="error">
+        [% IF bug.error == "InvalidBugId" %]
+          '[%+ bug.bug_id FILTER html %]' is not a valid [% terms.bug %] number
+          [%- IF Param("usebugaliases") %] nor a known [% terms.bug %] alias[% END %].
+        [% ELSIF bug.error == "NotPermitted" %]
+          You are not allowed to view this [% terms.bug %].
+        [% ELSIF bug.error == "NotFound" %]
+          This [% terms.bug %] cannot be found.
+        [% ELSE %]
+          [%+ bug.error FILTER html %]
+        [% END %]
+      </td>
+    </tr>
+  [% ELSE %]
     [%# The rightcell block (also called by the row block) automatically shows
       # the fields from rightcells %]
     [% rightcells = ['reporter', 'assigned_to'] %]
         </td>
       </tr>
     [% END %]
+  [% END %]
   </table>