/[A3C]/lib/A3C/Dispatcher.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Annotation of /lib/A3C/Dispatcher.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 208 - (hide annotations)
Thu Jun 19 21:24:26 2008 UTC (15 years, 9 months ago) by dpavlin
File size: 1314 byte(s)
another round of re-factoring

- re-organize LDAP-related pages under /ldap with new view A3C::View::LDAP
- move record multi-value support into A3C::Record
- document multi-value solution which started it all
1 dpavlin 50 package A3C::Dispatcher;
2    
3     use strict;
4     use warnings;
5    
6 dpavlin 134 =head1 NAME
7    
8     A3C::Displatcher
9    
10     =head1 DESCRIPTION
11    
12     Create top-level menu navigation
13    
14     =cut
15    
16 dpavlin 50 use Jifty::Dispatcher -base;
17    
18     use Data::Dump qw/dump/;
19    
20     before '*' => run {
21 dpavlin 67 warn "## ", Jifty->web->request->path;
22     Jifty->web->tangent(url => '/ldaplogin')
23     if ( ! Jifty->web->current_user->id && Jifty->web->request->path !~ m{^/(?:ldaplogin|__jifty)} );
24    
25 dpavlin 50 my $top = Jifty->web->navigation;
26     my $user = Jifty->web->current_user->user_object;
27    
28     # Jifty->log->debug("current_user = ", dump( $user ));
29    
30 dpavlin 127 $top->child( _('People') => url => '/people' );
31     my $o = $top->child( _('Organizations') => url => '/organizations' );
32     $o->child( _('New') => url => '/organizations/new' );
33 dpavlin 71
34 dpavlin 208 my $ldap = $top->child( _('LDAP'), url => '/ldap/sync' ); # FIXME some kind of top-level ldap page?
35     $ldap->child( _('Sync') => url => '/ldap/sync' );
36     $ldap->child( _('Dump') => url => '/ldap/dump' );
37    
38 dpavlin 153 my $strix = $top->child( _('Strix') => url => '/strix' );
39     $strix->child( _('Name differences') => url => '/strix/name_diff' );
40 dpavlin 161 $strix->child( _('SQL') => url => '/strix/sql' );
41 dpavlin 205 $strix->child( _('Navigation') => url => '/strix/navigation' );
42 dpavlin 174 $strix->child( _('Layout') => url => '/strix/layout' );
43 dpavlin 71
44 dpavlin 50 # $top->child( 'Prefs' => url => '/prefs' ) if Jifty->web->current_user->id;
45    
46     };
47    
48     1;

  ViewVC Help
Powered by ViewVC 1.1.26