]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 219555: 'Format for Printing' page is a mess - Patch by Olav Vitters <bugzilla...
authorlpsolit%gmail.com <>
Wed, 22 Feb 2006 00:58:06 +0000 (00:58 +0000)
committerlpsolit%gmail.com <>
Wed, 22 Feb 2006 00:58:06 +0000 (00:58 +0000)
skins/standard/show_multiple.css
template/en/default/bug/show-multiple.html.tmpl
template/en/default/filterexceptions.pl

index fd418a82e5653fab0a05e10d322148ba6779abeb..573a587b645b42be669ea02dcd1314592a6d83c9 100644 (file)
@@ -1,3 +1,47 @@
 hr {margin: 20px auto 40px}
 
 .bz_private { color:darkred }
+
+h1 {
+  font-size: 2em;
+  margin-bottom: 10px;
+}
+
+/* bugfields is table of all fields and values */
+.bugfields {
+  font-size: small;
+  background: #eee;
+  padding: 5px;
+  border: 1px solid silver;
+  width: 100%;
+}
+
+.bugfields tr {
+  vertical-align: top;
+}
+
+.bugfields th {
+  width: 10em;
+  text-align: left;
+  font-weight: normal;
+  line-height: 150%;
+}
+
+.bugfields td {
+  font-weight: bold;
+  line-height: 150%;
+}
+
+.bugfields .rightcell {
+  padding-left: 10px;
+}
+
+/* set line-height to normal for nested tables of bugfields table */
+.bugfields table th, .bugfields table td {
+  line-height: 100%;
+  width: auto;
+}
+
+.bugfields table.timetracking th, .bugfields table.timetracking td {
+  width: 10em;
+}
index c1eb27c75b84cc305597e2bc11fdfdc09f0153a0..9244592d824ed8fd1de6f03389f0d1732c3d512d 100644 (file)
   #
   # Contributor(s): Terry Weissman <terry@mozilla.org>
   #                 Gervase Markham <gerv@gerv.net>
+  #                 Toms Baugis <toms@myrealbox.com>
+  #                 Olav Vitters <olav@bkor.dhs.org>
   #%]
 
 [% PROCESS "global/field-descs.none.tmpl" %]
 
 [% PROCESS global/header.html.tmpl
   title = "Full Text $terms.Bug Listing"
-  style_urls = [ "skins/standard/show_multiple.css" ]
+  h1 = ""
+  style_urls = ["skins/standard/show_multiple.css",
+                "skins/standard/buglist.css"]
 %]
 [% PROCESS bug/time.html.tmpl %]
 [% IF bugs.first %]
 [%###########################################################################%]
 
 [% BLOCK bug_display %]
-  <div align="center">
-    <b>
-      <font size="+3">[% terms.Bug %] [%+ bug.bug_id %] - [% bug.short_desc FILTER html %]</font>
-    </b>
-  </div>
+  <h1>
+    [% terms.Bug %] 
+    <a href="show_bug.cgi?id=[% bug.bug_id %]">[% bug.bug_id %]</a>
+    [% IF Param("usebugaliases") AND bug.alias %]
+      ([% bug.alias FILTER html %])
+    [% END %]
+  </h1>
+
+  <table class="bugfields">
+    [%# The rightcell block (also called by the row block) automatically shows
+      # the fields from rightcells %]
+    [% rightcells = ['reporter', 'assigned_to'] %]
+    [% IF Param('useqacontact') %]
+      [% rightcells.push('qa_contact') %]
+    [% END %]
+    [% rightcells.push('') %]
+    [% IF bug.cc %]
+      [% rightcells.push('cc') %]
+    [% END %]
+    [% IF bug.keywords %]
+      [% rightcells.push('keywords') %]
+    [% END %]
+
+    [%# Determine if the bug has a flag %]
+    [% FOREACH type = bug.flag_types %]
+      [% IF type.flags.size %]
+        [% rightcells.push('flags') %]
+        [% LAST %]
+      [% END %]
+    [% END %]
+
+    [% PROCESS row cell = "short_desc" fullrow = 1 %]
 
-  <table width="100%">
     <tr>
+      <th>[% field_descs.product FILTER html %]:</th>
       <td>
-        <b>[% terms.Bug %]#:</b>
-        <a href="show_bug.cgi?id=[% bug.bug_id %]">[% bug.bug_id %]</a>
-        [% IF Param("usebugaliases") AND bug.alias %]  
-          ([% bug.alias FILTER html %])
-        [% END %]
-      </td>
-      <td>
-        <b> Product: </b>&nbsp;
         [% IF Param("useclassification") %]
           [[% bug.classification FILTER html %]]&nbsp;
         [% END %]
         [% bug.product FILTER html %]
       </td>
 
-      [% PROCESS cell attr = { description => "Version",
-                               name => "version" } %]
-      [% PROCESS cell attr = { description => "Platform",
-                               name => "rep_platform" } %]
+      [% PROCESS rightcell %]
     </tr>
 
+    [% PROCESS row cell = "component" %]
+
     <tr>
-      [% PROCESS cell attr = { description => "OS/Version",
-                               name => "op_sys" } %]
+      <th>[% field_descs.bug_status  FILTER html %]:</th>
       <td>
-        <b>Status:</b>&nbsp;
         [% status_descs.${bug.bug_status} FILTER html %]
+        [%+ resolution_descs.${bug.resolution} FILTER html %]
       </td>
-      [% PROCESS cell attr = { description => "Severity",
-                               name => "bug_severity" } %]
-      [% PROCESS cell attr = { description => "Priority",
-                               name => "priority" } %]
-    </tr>
 
-    <tr>
-      <td>
-        <b>Resolution:</b>&nbsp;
-        [% resolution_descs.${bug.resolution} FILTER html %]
-      </td>
-      <td>
-        <b>Assigned To:</b>&nbsp;
-        [% bug.assigned_to.login FILTER html %]
-      </td>
-      <td>
-        <b>Reported By:</b>&nbsp;
-        [% bug.reporter.login FILTER html %]
-      </td>
-      [% IF Param('useqacontact') %]
-        <td>
-          <b>QA Contact:</b>&nbsp;
-          [% bug.qa_contact.login FILTER html %]
-        </td>
-      [% END %]
+      [% PROCESS rightcell %]
     </tr>
 
     <tr>
-      <td colspan="2">
-        <b>Component:</b>&nbsp;
-        [% bug.component FILTER html %]
+      <th>[% field_descs.bug_severity FILTER html %]:</th>
+      <td class="bz_[% bug.bug_severity FILTER css_class_quote -%]">
+        [% bug.bug_severity FILTER html %]
       </td>
 
-      <td colspan="2">
-      [% IF Param('usetargetmilestone') %]
-          <b>Target Milestone:</b>&nbsp;
-          [% bug.target_milestone FILTER html %]
-      [% END %]
-      </td>
-    </tr>
-
-    <tr>
-      <td colspan="4">
-        <b>URL:</b>&nbsp;
-        [% IF bug.bug_file_loc 
-           AND NOT bug.bug_file_loc.match("^(javascript|data)") %]
-          <a href="[% bug.bug_file_loc FILTER html %]">
-                   [% bug.bug_file_loc FILTER html %]</a>
-        [% ELSE %]
-          [% bug.bug_file_loc FILTER html %]
-        [% END %]
+      [% PROCESS rightcell %]
     </tr>
 
     <tr>
-      <td colspan="4">
-        <b>Summary:</b>&nbsp;[% bug.short_desc FILTER html %]
+      <th>[% field_descs.priority FILTER html %]:</th>
+      <td class="bz_[% bug.priority FILTER css_class_quote -%]">
+        [% bug.priority FILTER html %]
       </td>
+
+      [% PROCESS rightcell %]
     </tr>
 
-    [% IF use_keywords %]
+    [% PROCESS row cell = "version" %]
+    [% PROCESS row cell = "target_milestone"  IF Param('usetargetmilestone') %]
+    [% PROCESS row cell = "rep_platform" %]
+    [% PROCESS row cell = "op_sys"  %]
+
+    [% IF bug.bug_file_loc %]
       <tr>
-        <td colspan="4">
-          <b>Keywords: </b>&nbsp;[% bug.keywords FILTER html %]
+        <th>[% field_descs.bug_file_loc FILTER html %]:</th>
+        <td colspan="3">
+          [% IF bug.bug_file_loc.match("^(javascript|data)") %]
+            [% bug.bug_file_loc FILTER html %]
+          [% ELSE %]
+            <a href="[% bug.bug_file_loc FILTER html %]">
+                     [% bug.bug_file_loc FILTER html %]</a>
+          [% END %]
         </td>
       </tr>
     [% END %]
 
     [% IF Param("usestatuswhiteboard") %]
+      [% PROCESS row cell = "status_whiteboard" fullrow = 1 %]
+    [% END %]
+
+    [% IF (bug.dependson.size || bug.blocked.size) %]
+      [% PROCESS dependencies name = "dependson" %]
+      [% PROCESS dependencies name = "blocked"  %]
+    [% END %]
+
+    [% IF UserInGroup(Param("timetrackinggroup")) %]
       <tr>
-        <td colspan="4">
-          <b>Status Whiteboard:</b>&nbsp;
-          [% bug.status_whiteboard FILTER html %]
+        <th>Time tracking:</th>
+        <td colspan="3">
+          <table class="timetracking">
+            <tr>
+              <th>[% field_descs.estimated_time FILTER html %]</th>
+              <th>[% field_descs.actual_time FILTER html %]</th>
+              <th>[% field_descs.work_time FILTER html %]</th>
+              <th>[% field_descs.remaining_time FILTER html %]</th>
+              <th>[% field_descs.percentage_complete FILTER html %]</th>
+              <th>Gain</th>
+            </tr>
+            <tr>
+              <td>
+                [% PROCESS formattimeunit time_unit = bug.estimated_time %]
+              </td>
+              <td>
+                [% PROCESS formattimeunit
+                           time_unit=(bug.remaining_time + bug.actual_time) %]
+              </td>
+              <td>[% PROCESS formattimeunit time_unit = bug.actual_time %]</td>
+              <td>
+                [% PROCESS formattimeunit time_unit = bug.remaining_time %]
+              </td>
+              <td>
+                [% PROCESS calculatepercentage act = bug.actual_time
+                                               rem = bug.remaining_time %]
+              </td>
+              <td>
+                [% PROCESS formattimeunit
+                     time_unit=bug.estimated_time - 
+                               (bug.actual_time + bug.remaining_time) %]
+              </td>
+            </tr>
+          </table>
         </td>
       </tr>
+      [% PROCESS row cell="deadline" %]
     [% END %]
 
-    [% IF UserInGroup(Param("timetrackinggroup")) %]
+    [% IF bug.attachments.size %]
       <tr>
-        <td colspan="4">
-          <b>Orig. Est.:</b>&nbsp;
-          [% PROCESS formattimeunit time_unit=bug.estimated_time %]
-          &nbsp;
-          <b>Current Est.:</b>&nbsp;
-          [% PROCESS formattimeunit
-                     time_unit=(bug.remaining_time + bug.actual_time) %]
-          &nbsp;
-          <b>Hours Worked:</b>&nbsp;
-          [% PROCESS formattimeunit time_unit=bug.actual_time %]&nbsp;
-          <b>Hours Left:</b>&nbsp;
-          [% PROCESS formattimeunit time_unit=bug.remaining_time %]
-          &nbsp;
-          <b>Percentage Complete:</b>&nbsp;
-          [% PROCESS calculatepercentage act=bug.actual_time
-                                         rem=bug.remaining_time %]&nbsp;
-          <b>Gain</b>&nbsp;
-          [% PROCESS formattimeunit
-                     time_unit=bug.estimated_time - (bug.actual_time + bug.remaining_time) %]
-          &nbsp;
-          <b>Deadline:</b>&nbsp;
-          [% bug.deadline %]
+        <th>Attachments:</th>
+        <td colspan="3">
+          [% IF bug.show_attachment_flags %]
+            <table>
+              <tr>
+                <th>Description</th>
+                <th>Flags</th>
+              </tr>
+              [% FOREACH attachment = bug.attachments %]
+                <tr>
+                  <td>
+                    <a href="attachment.cgi?id=[% attachment.id %]">
+                      [% attachment.description FILTER html %]
+                    </a>[% "<br>" IF not loop.last() %]
+                  </td>
+                  <td>
+                    [% IF attachment.flags.size == 0 %]
+                      <i>none</i>
+                    [% ELSE %]
+                      [% FOREACH flag = attachment.flags %]
+                        [% flag.setter.nick FILTER html %]:
+                        [%+ flag.type.name FILTER html FILTER no_break %][% flag.status %]
+                        [% IF flag.status == "?" && flag.requestee %]
+                          ([% flag.requestee.nick FILTER html %])
+                        [% END %][% ", " IF not loop.last() %]
+                      [% END %]
+                    [% END %]
+                  </td>
+                </tr>
+              [% END %]
+            </table>
+          [% ELSE %]
+            [% FOREACH attachment = bug.attachments %]
+              <a href="attachment.cgi?id=[% attachment.id %]">
+                [% attachment.description FILTER html %]
+              </a>[% "<br>" IF not loop.last() %]
+            [% END %]
+          [% END %]
         </td>
       </tr>
     [% END %]
-
-    <tr>
-      <td colspan="4">
-        <b>Opened:</b>&nbsp;
-        [% bug.creation_ts FILTER time %]
-      </td>
-    </tr>
   </table>
 
+
+  <br>
+
   [% PROCESS bug/comments.html.tmpl
      comments = bug.longdescs %]
 
 
 
 [%###########################################################################%]
-[%# Block for standard table cells                                          #%]
+[%# Block for standard table rows                                           #%]
 [%###########################################################################%]
 
-[% BLOCK cell %]
-  <td>
-    <b>[% attr.description FILTER html %]:</b>&nbsp;
-    [% bug.${attr.name} FILTER html %]
-  </td>
+[% BLOCK row %]
+  <tr>
+    <th>[% field_descs.${cell} FILTER html %]:</th>
+    <td[% " colspan=3" IF fullrow %]>[% bug.${cell} FILTER html %]</td>
+    [% PROCESS rightcell IF !fullrow %]
+  </tr>
+  [% fullrow = 0 %]
+[% END %]
+
+
+[%############################################################################%]
+[%# Block for dependencies                                                   #%]
+[%############################################################################%]
+
+[% BLOCK dependencies %]
+  <tr>
+    <th>[% terms.Bug %] [%+ field_descs.${name} FILTER html %]:</th>
+    <td>
+      [% FOREACH depbug = bug.${name} %]
+        [% depbug FILTER bug_link(depbug) %][% ", " IF not loop.last() %]
+      [% END %]
+    </td>
+
+    [% PROCESS rightcell %]
+  </tr>
+[% END %]
+
+[%############################################################################%]
+[%# Block for cells shown right of the table                                 #%]
+[%############################################################################%]
+
+[% BLOCK rightcell %]
+  [% IF rightcells %]
+    [% name = rightcells.shift %]
+    [% IF name == "cc" %]
+      <th class="rightcell">[% field_descs.cc FILTER html %]:</th>
+      <td>
+        [% FOREACH c = bug.cc %]
+          [% c FILTER html %][% ", " IF not loop.last() %]
+        [% END %]
+    [% ELSIF name == "reporter" || name == "assigned_to" 
+             || name == "qa_contact" %]
+      <th class="rightcell">[% field_descs.${name} FILTER html %]:</th>
+      <td>[% bug.${name}.identity FILTER html %]</td>
+    [% ELSIF name == "flags" %]
+        <th class="rightcell">Flags:</th>
+        <td>
+          [% FOREACH type = bug.flag_types %]
+            [% FOREACH flag = type.flags %]
+                [% flag.setter.nick FILTER html %]:
+                [%+ flag.type.name FILTER html FILTER no_break %][% flag.status %]
+                [%+ IF flag.status == "?" && flag.requestee %]
+                  ([% flag.requestee.nick FILTER html %])
+                [% END %]<br>
+            [% END %]
+          [% END %]
+        </td>
+    [% ELSIF name != "" %]
+      <th class="rightcell">[% field_descs.${name} FILTER html %]:</th>
+      <td>[% bug.${name} FILTER html %]</td>
+    [% ELSE %]
+      <td>&nbsp;</td>
+      <td>&nbsp;</td>
+    [% END %]
+  [% END %]
 [% END %]
index cc4503bb77a5a1e3d530b40e6bdeb6df04df4493..57a323e7ff9376f0bf6214e7e2189e73d38ddd5f 100644 (file)
 
 'bug/show-multiple.html.tmpl' => [
   'bug.bug_id', 
-  'bug.deadline',
+  'depbug FILTER bug_link(depbug)',
+  'attachment.id', 
+  'flag.status',
 ],
 
 'bug/show.html.tmpl' => [