From: Christian Legnitto Date: Tue, 10 Aug 2010 03:33:22 +0000 (-0700) Subject: Bug 585490: Instead of hardcoding for UNCONFIRMED bug links, use X-Git-Tag: bugzilla-4.1.1~317 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aec17c9f7769c22173d9d722250628a6aa3ffd2a;p=thirdparty%2Fbugzilla.git Bug 585490: Instead of hardcoding for UNCONFIRMED bug links, use a CSS class. r=mkanat, a=mkanat --- diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm index c964dd0222..13ba227765 100644 --- a/Bugzilla/Template.pm +++ b/Bugzilla/Template.pm @@ -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 = ""; - $post = ""; - } + + push @css_classes, "bz_status_" . css_class_quote($bug->bug_status); + if ($bug->resolution) { - $pre .= ''; + push @css_classes, "bz_closed"; $title .= ' ' . get_text('get_resolution', { resolution => $bug->resolution }); - $post .= ''; } 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 = ''; + $post = ''; + return qq{$pre$link_text$post}; } diff --git a/skins/standard/global.css b/skins/standard/global.css index 4f2709e109..c794f62d02 100644 --- a/skins/standard/global.css +++ b/skins/standard/global.css @@ -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; }