]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 528872 - "Attachments in attachments table should have CSS classes to help with...
authorreed%reedloden.com <>
Mon, 16 Nov 2009 16:33:10 +0000 (16:33 +0000)
committerreed%reedloden.com <>
Mon, 16 Nov 2009 16:33:10 +0000 (16:33 +0000)
Bugzilla/Util.pm
template/en/default/attachment/list.html.tmpl

index d1a52a5fc3522e5b74370095448f03484437eb4f..b5e99bf691dd711bb0bc9982eeeba01c29bebf17 100644 (file)
@@ -214,7 +214,7 @@ sub url_quote {
 
 sub css_class_quote {
     my ($toencode) = (@_);
-    $toencode =~ s/ /_/g;
+    $toencode =~ s#[ /]#_#g;
     $toencode =~ s/([^a-zA-Z0-9_\-.])/uc sprintf("&#x%x;",ord($1))/eg;
     return $toencode;
 }
@@ -733,7 +733,7 @@ Quotes characters so that they may be included as part of a url.
 =item C<css_class_quote($val)>
 
 Quotes characters so that they may be used as CSS class names. Spaces
-are replaced by underscores.
+and forward slashes are replaced by underscores.
 
 =item C<xml_quote($val)>
 
index bd597e48b58904fa661cc257f04321a54ac0044e..6453b4e685ac1aa741668c4aa3ac42a2ece93736 100644 (file)
@@ -65,7 +65,11 @@ function toggle_display(link) {
       [% IF attachment.isobsolete %]
         [% obsolete_attachments = obsolete_attachments + 1 %]
       [% END %]
-      <tr class="[% "bz_private" IF attachment.isprivate %]
+      <tr class="[% "bz_contenttype_" _ attachment.contenttype
+                     FILTER css_class_quote UNLESS attachment.isurl %]
+                 [% " bz_patch" IF attachment.ispatch %]
+                 [% " bz_url" IF attachment.isurl %]
+                 [% " bz_private" IF attachment.isprivate %]
                  [% " bz_tr_obsolete bz_default_hidden" 
                      IF attachment.isobsolete %]">
         <td valign="top">