[Jifty-commit] r1171 - in jifty/trunk: lib/Jifty/Web
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Mon Jun 5 19:47:26 EDT 2006
Author: trs
Date: Mon Jun 5 19:47:25 2006
New Revision: 1171
Modified:
jifty/trunk/ (props changed)
jifty/trunk/lib/Jifty/Web/Menu.pm
Log:
r12706 at zot: tom | 2006-06-05 19:47:02 -0400
Allow setting escape_label when creating the child so you don't have to create a new link object just to specify an unescaped label
Modified: jifty/trunk/lib/Jifty/Web/Menu.pm
==============================================================================
--- jifty/trunk/lib/Jifty/Web/Menu.pm (original)
+++ jifty/trunk/lib/Jifty/Web/Menu.pm Mon Jun 5 19:47:25 2006
@@ -3,7 +3,7 @@
use base qw/Class::Accessor::Fast/;
use URI;
-__PACKAGE__->mk_accessors(qw(label parent sort_order link));
+__PACKAGE__->mk_accessors(qw(label parent sort_order link escape_label));
=head2 new PARAMHASH
@@ -98,6 +98,7 @@
sort_order => ($self->{children}{$key}{sort_order}
|| scalar values %{$self->{children}}),
label => $key,
+ escape_label => 1,
@_
});
# Activate it
@@ -260,7 +261,9 @@
if ( defined (my $str = $self->link) ) {
return $str;
} elsif ( $self->url ) {
- return Jifty->web->link( label => _( $self->label ), url => $self->url );
+ return Jifty->web->link( label => _( $self->label ),
+ url => $self->url,
+ escape_label => $self->escape_label );
} else {
return _( $self->label );
}
More information about the Jifty-commit
mailing list