--- lib/A3C/Dispatcher.pm 2008/03/31 22:01:09 50 +++ lib/A3C/Dispatcher.pm 2008/05/30 20:04:43 134 @@ -3,17 +3,37 @@ use strict; use warnings; +=head1 NAME + +A3C::Displatcher + +=head1 DESCRIPTION + +Create top-level menu navigation + +=cut + use Jifty::Dispatcher -base; use Data::Dump qw/dump/; before '*' => run { + warn "## ", Jifty->web->request->path; + Jifty->web->tangent(url => '/ldaplogin') + if ( ! Jifty->web->current_user->id && Jifty->web->request->path !~ m{^/(?:ldaplogin|__jifty)} ); + my $top = Jifty->web->navigation; my $user = Jifty->web->current_user->user_object; # Jifty->log->debug("current_user = ", dump( $user )); - $top->child( _('Find People') => url => '/search-users' ); + $top->child( _('People') => url => '/people' ); + my $o = $top->child( _('Organizations') => url => '/organizations' ); + $o->child( _('New') => url => '/organizations/new' ); + + $top->child( _('Sync') => url => '/sync' ); + $top->child( _('LDAP') => url => '/ldap' ); + # $top->child( 'Prefs' => url => '/prefs' ) if Jifty->web->current_user->id; };