lib/Rapi/Blog/Module/NavTree.pm untested

filter: Statementstmt 0.0% 0 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 6 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 38 CC 1 SCAR 6.9
CC
1
Cov
0%
_rapi_blog_extra_navtree_nodes
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 package Rapi::Blog::Module::NavTree;
2 use strict;
3 use warnings;
4 use Moose;
5 extends 'Catalyst::Plugin::RapidApp::NavCore::NavTree';
6  
7 use RapidApp::Util qw(:all);
8 use Rapi::Blog::Util;
9  
10  
11 around 'TreeConfig' => sub {
12 my ($orig,$self,@args) = @_;
13
14 my $items = $self->$orig(@args);
15
16 return [@$items, @{$self->_rapi_blog_extra_navtree_nodes}]
17 };
18  
19  
20 sub _rapi_blog_extra_navtree_nodes {
21 my $self = shift;
22
23 my $items = [
24 {
25 text => 'Content',
26 iconCls => 'icon-folder-table',
27 expanded => \1,
28 children => [
29 {
30 text => 'Posts',
31 iconCls => 'icon-posts',
32 url => '/adm/main/db/db_post',
33 leaf => \1
34 },
35 {
36 text => 'Comments',
37 iconCls => 'icon-comments',
38 url => '/adm/main/db/db_comment',
39 leaf => \1
40 },
41 ]
42 },
43 {
44 text => 'Taxonomies',
45 iconCls => 'icon-fa-cogs',
46 cls => 'pad-top-4px',
47 expanded => \1,
48 children => [
49 {
50 text => 'Tags',
51 iconCls => 'icon-tags-blue',
52 url => '/adm/main/db/db_tag',
53 leaf => \1
54 },
55 {
56 text => 'Categories',
57 iconCls => 'icon-images',
58 url => '/adm/main/db/db_category',
59 leaf => \1
60 },
61 {
62 text => 'Sections (Tree)',
63 iconCls => 'icon-sitemap-color',
64 url => '/adm/sections',
65 leaf => \1
66 },
67 {
68 text => 'Sections (Grid)',
69 iconCls => 'icon-chart-organisation',
70 url => '/adm/main/db/db_section',
71 leaf => \1
72 },
73 ]
74 },
75 {
76 text => 'Index & tracking tables',
77 iconCls => 'icon-database-gear',
78 children => [
79 {
80 text => 'Post-Category Links',
81 iconCls => 'icon-logic-and',
82 url => '/adm/main/db/db_postcategory',
83 leaf => \1
84 },
85 {
86 text => 'Post-Tag Links',
87 iconCls => 'icon-logic-and-blue',
88 url => '/adm/main/db/db_posttag',
89 leaf => \1
90 },
91 {
92 text => 'Section-Post Links',
93 iconCls => 'icon-table-relationship',
94 url => '/adm/main/db/db_trksectionpost',
95 leaf => \1
96 },
97 {
98 text => 'Section-Subsection Links',
99 iconCls => 'icon-table-relationship',
100 url => '/adm/main/db/db_trksectionsection',
101 leaf => \1
102 },
103 ]
104 },
105 {
106 text => 'Stats & settings',
107 iconCls => 'icon-group-gear',
108 require_role => 'administrator',
109 expanded => \1,
110 children => [
111 {
112 text => 'Hits',
113 iconCls => 'icon-world-gos',
114 url => '/adm/main/db/db_hit',
115 leaf => \1
116 },
117 {
118 text => 'User Sessions',
119 iconCls => 'ra-icon-environment-network',
120 url => '/adm/main/db/rapidapp_coreschema_session',
121 leaf => \1
122 },
123 {
124 text => 'Pre Authorization tables',
125 iconCls => "icon-key1",
126 require_role => 'administrator',
127 expanded => \1,
128 children => [
129 {
130 text => "Pre Authorizations",
131 iconCls => "icon-preauth-actions",
132 url => '/adm/main/db/db_preauthaction',
133 leaf => \1
134 },
135 {
136 text => "Pre-Auth Events",
137 iconCls => "icon-preauth-event",
138 url => '/adm/main/db/db_preauthactionevent',
139 leaf => \1
140 },
141 {
142 text => "Pre-Auth Types",
143 iconCls => "icon-preauth-action-types",
144 url => '/adm/main/db/db_preauthactiontype',
145 leaf => \1
146 },
147 {
148 text => "Pre-Auth Event Types",
149 iconCls => "icon-preauth-event-types",
150 url => '/adm/main/db/db_preautheventtype',
151 leaf => \1
152 },
153 ]
154 },
155 {
156 text => 'User Saved Views',
157 iconCls => 'ra-icon-data-views',
158 url => '/adm/main/db/rapidapp_coreschema_savedstate',
159 leaf => \1
160 },
161
162 {
163 text => 'Default Views by Source',
164 iconCls => 'ra-icon-data-preferences',
165 url => '/adm/main/db/rapidapp_coreschema_defaultview',
166 leaf => \1
167 },
168 {
169 text => 'Roles',
170 iconCls => 'ra-icon-user-prefs',
171 url => '/adm/main/db/rapidapp_coreschema_role',
172 leaf => \1
173 },
174 ]
175 },
176 {
177 text => 'User Accounts',
178 iconCls => 'icon-users',
179 url => '/adm/main/db/db_user',
180 leaf => \1
181 },
182 ];
183  
184  
185 return $items;
186 }
187  
188  
189  
190  
191 1;