36 |
my $strix = $top->child( _('Strix') => url => '/strix' ); |
my $strix = $top->child( _('Strix') => url => '/strix' ); |
37 |
$strix->child( _('Name differences') => url => '/strix/name_diff' ); |
$strix->child( _('Name differences') => url => '/strix/name_diff' ); |
38 |
$strix->child( _('SQL') => url => '/strix/sql' ); |
$strix->child( _('SQL') => url => '/strix/sql' ); |
39 |
$strix->child( _('Navigation') => url => '/strix/site-navigation' ); |
$strix->child( _('Navigation') => url => '/strix/navigation' ); |
40 |
$strix->child( _('Layout') => url => '/strix/layout' ); |
$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 |
|
|
|
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; |
|
|
} |
|
|
|
|
|
}; |
|
|
|
|
46 |
1; |
1; |