]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 367679 - "Usability changes to new attachment table" [p=reed r=LpSolit a=LpSolit]
authorreed%reedloden.com <>
Wed, 24 Jan 2007 03:04:27 +0000 (03:04 +0000)
committerreed%reedloden.com <>
Wed, 24 Jan 2007 03:04:27 +0000 (03:04 +0000)
template/en/default/attachment/list.html.tmpl
template/en/default/filterexceptions.pl

index 275e92df27ea649a6f1a08ba849e04ddcaaa0de8..99f51064dc0f6fef256a33d0a151e50fcdc3b2ae 100644 (file)
   </tr>
 
   [% count = 0 %]
-  [% has_obsolete_attachments = 0 %]
+  [% obsolete_attachments = 0 %]
 
   [% FOREACH attachment = attachments %]
     [% count = count + 1 %]
     [% IF !attachment.isprivate || user.is_insider || attachment.attacher.id == user.id %]
-      [% SET has_obsolete_attachments = 1 IF attachment.isobsolete %]
+      [% IF attachment.isobsolete %]
+        [% obsolete_attachments = obsolete_attachments + 1 %]
+      [% END %]
       <tr class="[% "bz_private" IF attachment.isprivate %][%-%]
                  [%+ "bz_tr_obsolete" IF attachment.isobsolete %]">
         <td valign="top">
             <a name="a[% count %]" href="attachment.cgi?id=[% attachment.id %]"
                title="View the content of the attachment">
           [% END %]
-          [% attachment.description FILTER html FILTER obsolete(attachment.isobsolete) %]
+          <b>[% attachment.description FILTER html FILTER obsolete(attachment.isobsolete) %]</b>
           [% "</a>" IF attachment.datasize %]
 
           <span class="bz_attach_extra_info">
             [% IF attachment.datasize %]
               ([% attachment.datasize FILTER unitconvert %],
               [% IF attachment.ispatch %]
-                <i>patch</i>)
+                patch)
               [% ELSIF attachment.isurl %]
-                <i>url</i>)
+                url)
               [% ELSE %]
                 [%+ attachment.contenttype FILTER html %])
               [% END %]
         [% IF show_attachment_flags %]
           <td class="bz_attach_flags" valign="top">
             [% IF attachment.flags.size == 0 %]
-              <i>no flag</i>
+              <i>no flags</i>
             [% ELSE %]
               [% FOREACH flag = attachment.flags %]
                 [% flag.setter.nick FILTER html %]:
     <td colspan="[% show_attachment_flags ? 3 : 2 %]">
       [% IF attachments.size %]
         <span class="bz_attach_view_hide">
-          [% IF has_obsolete_attachments %]
-            <a href="#a0" onClick="return toggle_display(this);">Hide Obsolete</a> |
+          [% IF obsolete_attachments %]
+            <a href="#a0" onClick="return toggle_display(this);">Hide Obsolete</a> ([% obsolete_attachments %]) |
           [% END %]
           <a href="attachment.cgi?bugid=[% bugid %]&amp;action=viewall">View All</a>
         </span>
index fe19b42d8a423ce621a927acd281b20de3389b40..9a20608707cd872ceb96d35ea02b1102ceca2207 100644 (file)
   'attachment.id', 
   'flag.status',
   'bugid',
+  'obsolete_attachments',
 ],
 
 'attachment/show-multiple.html.tmpl' => [