33 |
|
|
34 |
$top->child( _('Sync') => url => '/sync' ); |
$top->child( _('Sync') => url => '/sync' ); |
35 |
$top->child( _('LDAP') => url => '/ldap' ); |
$top->child( _('LDAP') => url => '/ldap' ); |
36 |
$top->child( _('Strix') => url => '/strix' ); |
my $strix = $top->child( _('Strix') => url => '/strix' ); |
37 |
|
$strix->child( _('Name differences') => url => '/strix/name_diff' ); |
38 |
|
$strix->child( _('SQL') => url => '/strix/sql' ); |
39 |
|
$strix->child( _('Sitemap') => url => '/strix/sitemap' ); |
40 |
|
$strix->child( _('Layout') => url => '/strix/layout' ); |
41 |
|
|
42 |
# $top->child( 'Prefs' => url => '/prefs' ) if Jifty->web->current_user->id; |
# $top->child( 'Prefs' => url => '/prefs' ) if Jifty->web->current_user->id; |
43 |
|
|
44 |
}; |
}; |
45 |
|
|
46 |
|
sub first_instance { |
47 |
|
my $selection = A3C::Model::StrixInstanceSelectionCollection->new; |
48 |
|
$selection->unlimit; |
49 |
|
my $instance = $selection->first->instance->instance; |
50 |
|
warn "# using default instance $instance"; |
51 |
|
return $instance; |
52 |
|
} |
53 |
|
|
54 |
|
before '/strix/' => run { |
55 |
|
|
56 |
|
if ( ! get('instance') ) { |
57 |
|
set 'instance' => first_instance; |
58 |
|
} |
59 |
|
|
60 |
|
}; |
61 |
|
|
62 |
1; |
1; |