31 |
my $o = $top->child( _('Organizations') => url => '/organizations' ); |
my $o = $top->child( _('Organizations') => url => '/organizations' ); |
32 |
$o->child( _('New') => url => '/organizations/new' ); |
$o->child( _('New') => url => '/organizations/new' ); |
33 |
|
|
34 |
$top->child( _('Sync') => url => '/sync' ); |
my $ldap = $top->child( _('LDAP'), url => '/ldap/sync' ); # FIXME some kind of top-level ldap page? |
35 |
$top->child( _('LDAP') => url => '/ldap' ); |
$ldap->child( _('Sync') => url => '/ldap/sync' ); |
36 |
|
$ldap->child( _('Dump') => url => '/ldap/dump' ); |
37 |
|
|
38 |
my $strix = $top->child( _('Strix') => url => '/strix' ); |
my $strix = $top->child( _('Strix') => url => '/strix' ); |
39 |
$strix->child( _('Name differences') => url => '/strix/name_diff' ); |
$strix->child( _('Name differences') => url => '/strix/name_diff' ); |
40 |
$strix->child( _('SQL') => url => '/strix/sql' ); |
$strix->child( _('SQL') => url => '/strix/sql' ); |
41 |
$strix->child( _('Navigation') => url => '/strix/site-navigation' ); |
$strix->child( _('Navigation') => url => '/strix/navigation' ); |
|
$strix->child( _('Layout') => url => '/strix/layout' ); |
|
42 |
|
|
43 |
# $top->child( 'Prefs' => url => '/prefs' ) if Jifty->web->current_user->id; |
# $top->child( 'Prefs' => url => '/prefs' ) if Jifty->web->current_user->id; |
44 |
|
|
45 |
}; |
}; |
46 |
|
|
|
sub first_instance { |
|
|
my $selection = A3C::Model::StrixInstanceSelectionCollection->new; |
|
|
$selection->unlimit; |
|
|
my $instance = $selection->first->instance->instance; |
|
|
warn "# using default instance $instance"; |
|
|
return $instance; |
|
|
} |
|
|
|
|
|
before '/strix/' => run { |
|
|
|
|
|
if ( ! get('instance') ) { |
|
|
set 'instance' => first_instance; |
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
47 |
1; |
1; |