From 380b6e527cfb9cc98e6e40849915e2627fa2d0ae Mon Sep 17 00:00:00 2001 From: "kiko%async.com.br" <> Date: Wed, 17 Mar 2004 07:52:47 +0000 Subject: Fix for bug 232397: .bz_obsolete shouldn't specify "underline". Define specific bz_obsolete/closed/inactive classes (that don't specify underline, but line-through instead) and additional Template filters for conveniently applying them. Change occurences of to use new classes and clean up callsites. Patch by byron jones . r=myk, gerv. a=myk. --- Bugzilla/Template.pm | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) (limited to 'Bugzilla/Template.pm') 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 "" . $_[0] . "" }, + + # Render text in required style. + + inactive => [ + sub { + my($context, $isinactive) = @_; + return sub { + return $isinactive ? ''.$_[0].'' : $_[0]; + } + }, 1 + ], + + closed => [ + sub { + my($context, $isclosed) = @_; + return sub { + return $isclosed ? ''.$_[0].'' : $_[0]; + } + }, 1 + ], + + obsolete => [ + sub { + my($context, $isobsolete) = @_; + return sub { + return $isobsolete ? ''.$_[0].'' : $_[0]; + } + }, 1 + ], # Returns the text with backslashes, single/double quotes, # and newlines/carriage returns escaped for use in JS strings. -- cgit v1.2.3-24-g4f1b