summaryrefslogtreecommitdiffstats
path: root/Bugzilla
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla')
-rw-r--r--Bugzilla/Template.pm31
1 files changed, 29 insertions, 2 deletions
diff --git a/Bugzilla/Template.pm b/Bugzilla/Template.pm
index 310a18161..cb6b54c90 100644
--- a/Bugzilla/Template.pm
+++ b/Bugzilla/Template.pm
@@ -195,8 +195,35 @@ sub create {
# built-in filter, please also add a stub filter to checksetup.pl
# and t/004template.t.
FILTERS => {
- # Render text in strike-through style.
- strike => sub { return "<strike>" . $_[0] . "</strike>" },
+
+ # Render text in required style.
+
+ inactive => [
+ sub {
+ my($context, $isinactive) = @_;
+ return sub {
+ return $isinactive ? '<span class="bz_inactive">'.$_[0].'</span>' : $_[0];
+ }
+ }, 1
+ ],
+
+ closed => [
+ sub {
+ my($context, $isclosed) = @_;
+ return sub {
+ return $isclosed ? '<span class="bz_closed">'.$_[0].'</span>' : $_[0];
+ }
+ }, 1
+ ],
+
+ obsolete => [
+ sub {
+ my($context, $isobsolete) = @_;
+ return sub {
+ return $isobsolete ? '<span class="bz_obsolete">'.$_[0].'</span>' : $_[0];
+ }
+ }, 1
+ ],
# Returns the text with backslashes, single/double quotes,
# and newlines/carriage returns escaped for use in JS strings.