Jifty/Plugin/AdminUI/Dispatcher.pm untested

filter: Statementstmt 0.0% 0 / 14 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 19 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 use warnings;
2 use strict;
3  
4 package Jifty::Plugin::AdminUI::Dispatcher;
5  
6 =head1 NAME
7  
8 Jifty::Plugin::AdminUI::Dispatcher - dispatcher of the AdminUI plugin
9  
10 =head1 DESCRIPTION
11  
12 Adds dispatching rules required for the AdminUI plugin.
13  
14 =cut
15  
16 use Jifty::Dispatcher -base;
17  
18 =head1 RULES
19  
20 =head2 on '**'
21  
22 Adds 'Administration' item to the top navigation if AdminMode is activated in the config.
23  
24 =cut
25  
26 on '**' => run {
27 my $top = Jifty->web->navigation;
28 # for now leave check here, but we want AdminUI to be
29 # real plugin someday
30 if (Jifty->admin_mode) {
31 $top->child(
32 Administration =>
33 url => "/__jifty/admin/",
34 label => _('Administration'),
35 sort_order => 998,
36 );
37 }
38 return ();
39 };
40  
41 1;