[Jifty-commit] r2476 - in jifty/branches/template-declare: .
jifty-commit at lists.jifty.org
jifty-commit at lists.jifty.org
Sun Jan 7 16:12:37 EST 2007
Author: jesse
Date: Sun Jan 7 16:12:36 2007
New Revision: 2476
Modified:
jifty/branches/template-declare/ (props changed)
jifty/branches/template-declare/lib/Jifty/View/Declare/Base.pm
Log:
r46830 at pinglin: jesse | 2007-01-07 16:09:59 -0500
* render_menu was a bad mason port of something better we already had in core.
Modified: jifty/branches/template-declare/lib/Jifty/View/Declare/Base.pm
==============================================================================
--- jifty/branches/template-declare/lib/Jifty/View/Declare/Base.pm (original)
+++ jifty/branches/template-declare/lib/Jifty/View/Declare/Base.pm Sun Jan 7 16:12:36 2007
@@ -161,36 +161,10 @@
}
};
with( id => "navigation" ), div {
- my $menu = Jifty->web->navigation;
- my @children = $menu->children;
- if (@children) {
- with( class => "menu" ), ul {
- render_menu($_) for @children;
- }
- }
+ Jifty->web->navigation->render_as_menu;
};
};
-sub render_menu {
- my $item = shift;
- my @kids = $item->children;
- my @params;
- if ( $item->active ) {
- push @params, class => "active";
- }
-
- with(@params), li {
-
- outs_raw( $item->as_link );
-
- if (@kids) {
- with( class => "submenu" ), ul {
- render_menu($_) for @kids;
- }
- }
- }
-}
-
template '_elements/header' => sub {
my ($title) = get_current_attr(qw(title));
Jifty->handler->apache->content_type('text/html; charset=utf-8');
More information about the Jifty-commit
mailing list