]> git.ipfire.org Git - thirdparty/bugzilla.git/commitdiff
Bug 585490: Instead of hardcoding <i> for UNCONFIRMED bug links, use
authorChristian Legnitto <clegnitto@mozilla.com>
Tue, 10 Aug 2010 03:33:22 +0000 (20:33 -0700)
committerMax Kanat-Alexander <mkanat@bugzilla.org>
Tue, 10 Aug 2010 03:33:22 +0000 (20:33 -0700)
a CSS class.
r=mkanat, a=mkanat

Bugzilla/Template.pm
skins/standard/global.css

index c964dd0222aca06958d95b8fd7cd02cd24156478..13ba227765cc3add23d4b84e1b7a2edd8dc247fc 100644 (file)
@@ -329,17 +329,16 @@ sub get_bug_link {
     # Initialize these variables to be "" so that we don't get warnings
     # if we don't change them below (which is highly likely).
     my ($pre, $title, $post) = ("", "", "");
+    my @css_classes = ("bz_bug_link");
 
     $title = get_text('get_status', { status => $bug->bug_status });
-    if ($bug->bug_status eq 'UNCONFIRMED') {
-        $pre = "<i>";
-        $post = "</i>";
-    }
+
+    push @css_classes, "bz_status_" . css_class_quote($bug->bug_status);
+
     if ($bug->resolution) {
-        $pre .= '<span class="bz_closed">';
+        push @css_classes, "bz_closed";
         $title .= ' ' . get_text('get_resolution',
                                  { resolution => $bug->resolution });
-        $post .= '</span>';
     }
     if (Bugzilla->user->can_see_bug($bug)) {
         $title .= " - " . $bug->short_desc;
@@ -354,6 +353,10 @@ sub get_bug_link {
     if (defined $options->{comment_num}) {
         $linkval .= "#c" . $options->{comment_num};
     }
+
+    $pre  = '<span class="' . join(" ", @css_classes) . '">';
+    $post = '</span>';
+
     return qq{$pre<a href="$linkval" title="$title">$link_text</a>$post};
 }
 
index 4f2709e109ccd2a4ecc7b4386c316754421e53cd..c794f62d0213e29054e576f7d8d2b806fdbac92a 100644 (file)
@@ -251,6 +251,18 @@ div#docslinks {
     margin: 0;
 }
 
+/**************************/
+/* Bug links and statuses */
+/**************************/
+
+.bz_bug_link {
+    /* Catch-all if you want common styles for all bug links */
+}
+
+.bz_bug_link .bz_status_UNCONFIRMED {
+    font-style: italic;
+}
+
 .bz_obsolete {
     text-decoration: line-through;
 }