summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Template.pm
diff options
context:
space:
mode:
authorChristian Legnitto <clegnitto@mozilla.com>2010-08-10 05:33:22 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-08-10 05:33:22 +0200
commitaec17c9f7769c22173d9d722250628a6aa3ffd2a (patch)
tree1cf822dca95cc54f8f0708ca1123e8e9eb7421e9 /Bugzilla/Template.pm
parentf88ae24fadcad542e9d72890a4bf67bcb28e7270 (diff)
downloadbugzilla-aec17c9f7769c22173d9d722250628a6aa3ffd2a.tar.gz
bugzilla-aec17c9f7769c22173d9d722250628a6aa3ffd2a.tar.xz
Bug 585490: Instead of hardcoding <i> for UNCONFIRMED bug links, use
a CSS class. r=mkanat, a=mkanat
Diffstat (limited to 'Bugzilla/Template.pm')
-rw-r--r--Bugzilla/Template.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index c964dd022..13ba22776 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 = "<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};
}