##// END OF EJS Templates
ui: navigation, fixed wrapping of new admin navigation items
marcink -
r3566:007450ec new-ui
parent child Browse files
Show More
@@ -22,13 +22,12 b''
22 ${self.menu_items(active='admin')}
22 ${self.menu_items(active='admin')}
23 </%def>
23 </%def>
24
24
25 <%def name="menu_bar_subnav()">
26 ${self.admin_menu(active='audit_logs')}
27 </%def>
28
25 <%def name="main()">
29 <%def name="main()">
26 <div class="box">
30 <div class="box">
27 <!-- box / title -->
28 <div class="title">
29 ${self.admin_menu()}
30 </div>
31 <!-- end box / title -->
32 <div class="table">
31 <div class="table">
33 <div id="user_log">
32 <div id="user_log">
34 <%include file="/admin/admin_log_base.mako" />
33 <%include file="/admin/admin_log_base.mako" />
@@ -18,12 +18,13 b''
18 ${self.menu_items(active='admin')}
18 ${self.menu_items(active='admin')}
19 </%def>
19 </%def>
20
20
21 <%def name="menu_bar_subnav()">
22 ${self.admin_menu(active='authentication')}
23 </%def>
24
21 <%def name="main()">
25 <%def name="main()">
22
26
23 <div class="box">
27 <div class="box">
24 <div class="title">
25 ${self.admin_menu()}
26 </div>
27
28
28 <div class='sidebar-col-wrapper'>
29 <div class='sidebar-col-wrapper'>
29
30
@@ -18,11 +18,12 b''
18 ${self.menu_items(active='admin')}
18 ${self.menu_items(active='admin')}
19 </%def>
19 </%def>
20
20
21 <%def name="menu_bar_subnav()">
22 ${self.admin_menu(active='defaults')}
23 </%def>
24
21 <%def name="main()">
25 <%def name="main()">
22 <div class="box">
26 <div class="box">
23 <div class="title">
24 ${self.admin_menu()}
25 </div>
26
27
27 ##main
28 ##main
28 <div class="sidebar-col-wrapper">
29 <div class="sidebar-col-wrapper">
@@ -31,12 +31,6 b''
31 %endif
31 %endif
32 </%def>
32 </%def>
33
33
34 <%def name="menu_bar_subnav()">
35 %if c.repo:
36 ${self.repo_menu(active='options')}
37 %endif
38 </%def>
39
40 <%def name="main_content()">
34 <%def name="main_content()">
41 ${next.body()}
35 ${next.body()}
42 </%def>
36 </%def>
@@ -2,7 +2,7 b''
2 <%inherit file="/base/base.mako"/>
2 <%inherit file="/base/base.mako"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
5 ${_('Settings administration')}
5 ${_('Integrations administration')}
6 %if c.rhodecode_name:
6 %if c.rhodecode_name:
7 &middot; ${h.branding(c.rhodecode_name)}
7 &middot; ${h.branding(c.rhodecode_name)}
8 %endif
8 %endif
@@ -18,6 +18,10 b''
18 ${self.menu_items(active='admin')}
18 ${self.menu_items(active='admin')}
19 </%def>
19 </%def>
20
20
21 <%def name="menu_bar_subnav()">
22 ${self.admin_menu(active='integrations')}
23 </%def>
24
21 <%def name="side_bar_nav()">
25 <%def name="side_bar_nav()">
22 <li class="active">
26 <li class="active">
23 <a href="${h.route_path('global_integrations_home')}">Global</a>
27 <a href="${h.route_path('global_integrations_home')}">Global</a>
@@ -30,9 +34,6 b''
30
34
31 <%def name="main()">
35 <%def name="main()">
32 <div class="box">
36 <div class="box">
33 <div class="title">
34 ${self.admin_menu()}
35 </div>
36
37
37 ##main
38 ##main
38 <div class='sidebar-col-wrapper'>
39 <div class='sidebar-col-wrapper'>
@@ -18,6 +18,10 b''
18 ${self.menu_items(active='admin')}
18 ${self.menu_items(active='admin')}
19 </%def>
19 </%def>
20
20
21 <%def name="menu_bar_subnav()">
22 ${self.admin_menu()}
23 </%def>
24
21 <%def name="side_bar_nav()">
25 <%def name="side_bar_nav()">
22
26
23 </%def>
27 </%def>
@@ -28,9 +32,6 b''
28
32
29 <%def name="main()">
33 <%def name="main()">
30 <div class="box">
34 <div class="box">
31 <div class="title">
32 ${self.admin_menu()}
33 </div>
34
35
35 ##main
36 ##main
36 <div class='sidebar-col-wrapper'>
37 <div class='sidebar-col-wrapper'>
@@ -18,12 +18,12 b''
18 ${self.menu_items(active='admin')}
18 ${self.menu_items(active='admin')}
19 </%def>
19 </%def>
20
20
21 <%def name="menu_bar_subnav()">
22 ${self.admin_menu(active='permissions')}
23 </%def>
21
24
22 <%def name="main()">
25 <%def name="main()">
23 <div class="box">
26 <div class="box">
24 <div class="title">
25 ${self.admin_menu()}
26 </div>
27
27
28 <div class="sidebar-col-wrapper scw-small">
28 <div class="sidebar-col-wrapper scw-small">
29 ##main
29 ##main
@@ -17,10 +17,14 b''
17 ${self.menu_items(active='admin')}
17 ${self.menu_items(active='admin')}
18 </%def>
18 </%def>
19
19
20 <%def name="menu_bar_subnav()">
21 ${self.admin_menu(active='repository_groups')}
22 </%def>
23
20 <%def name="main()">
24 <%def name="main()">
21 <div class="box">
25 <div class="box">
22 <div class="title">
26 <div class="title">
23 ${self.admin_menu()}
27
24 <ul class="links">
28 <ul class="links">
25 %if h.HasPermissionAny('hg.admin','hg.repogroup.create.true')():
29 %if h.HasPermissionAny('hg.admin','hg.repogroup.create.true')():
26 <li>
30 <li>
@@ -17,10 +17,13 b''
17 ${self.menu_items(active='admin')}
17 ${self.menu_items(active='admin')}
18 </%def>
18 </%def>
19
19
20 <%def name="menu_bar_subnav()">
21 ${self.admin_menu(active='repositories')}
22 </%def>
23
20 <%def name="main()">
24 <%def name="main()">
21 <div class="box">
25 <div class="box">
22 <div class="title">
26 <div class="title">
23 ${self.admin_menu()}
24 <ul class="links">
27 <ul class="links">
25 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
28 %if h.HasPermissionAny('hg.admin','hg.create.repository')():
26 <li>
29 <li>
@@ -13,11 +13,15 b''
13 &raquo;
13 &raquo;
14 ${_('Settings')}
14 ${_('Settings')}
15 </%def>
15 </%def>
16
16 ##
17 <%def name="menu_bar_nav()">
17 <%def name="menu_bar_nav()">
18 ${self.menu_items(active='admin')}
18 ${self.menu_items(active='admin')}
19 </%def>
19 </%def>
20
20
21 <%def name="menu_bar_subnav()">
22 ${self.admin_menu(active='settings')}
23 </%def>
24
21 <%def name="side_bar_nav()">
25 <%def name="side_bar_nav()">
22 % for navitem in c.navlist:
26 % for navitem in c.navlist:
23 <li class="${'active' if c.active in navitem.active_list else ''}">
27 <li class="${'active' if c.active in navitem.active_list else ''}">
@@ -32,9 +36,6 b''
32
36
33 <%def name="main()">
37 <%def name="main()">
34 <div class="box">
38 <div class="box">
35 <div class="title">
36 ${self.admin_menu()}
37 </div>
38
39
39 ##main
40 ##main
40 <div class='sidebar-col-wrapper'>
41 <div class='sidebar-col-wrapper'>
@@ -17,11 +17,14 b''
17 ${self.menu_items(active='admin')}
17 ${self.menu_items(active='admin')}
18 </%def>
18 </%def>
19
19
20 <%def name="menu_bar_subnav()">
21 ${self.admin_menu(active='user_groups')}
22 </%def>
23
20 <%def name="main()">
24 <%def name="main()">
21 <div class="box">
25 <div class="box">
22
26
23 <div class="title">
27 <div class="title">
24 ${self.admin_menu()}
25 <ul class="links">
28 <ul class="links">
26 %if h.HasPermissionAny('hg.admin', 'hg.usergroup.create.true')():
29 %if h.HasPermissionAny('hg.admin', 'hg.usergroup.create.true')():
27 <li>
30 <li>
@@ -17,12 +17,15 b''
17 ${self.menu_items(active='admin')}
17 ${self.menu_items(active='admin')}
18 </%def>
18 </%def>
19
19
20 <%def name="menu_bar_subnav()">
21 ${self.admin_menu(active='users')}
22 </%def>
23
20 <%def name="main()">
24 <%def name="main()">
21
25
22 <div class="box">
26 <div class="box">
23
27
24 <div class="title">
28 <div class="title">
25 ${self.admin_menu()}
26 <ul class="links">
29 <ul class="links">
27 <li>
30 <li>
28 <a href="${h.route_path('users_new')}" class="btn btn-small btn-success">${_(u'Add User')}</a>
31 <a href="${h.route_path('users_new')}" class="btn btn-small btn-success">${_(u'Add User')}</a>
@@ -74,41 +74,48 b''
74 </div>
74 </div>
75 </%def>
75 </%def>
76
76
77 <%def name="admin_menu()">
77 <%def name="admin_menu(active=None)">
78
78 <div id="context-bar">
79 <ul id="context-pages" class="navigation horizontal-list">
79 <div class="wrapper">
80 <ul id="context-pages" class="navigation horizontal-list">
80 <%
81 <%
81 repositories=c.rhodecode_user.repositories_admin
82 repositories=c.rhodecode_user.repositories_admin
82 repository_groups=c.rhodecode_user.repository_groups_admin
83 repository_groups=c.rhodecode_user.repository_groups_admin
83 user_groups=c.rhodecode_user.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')()
84 user_groups=c.rhodecode_user.user_groups_admin or h.HasPermissionAny('hg.usergroup.create.true')()
85 def is_active(selected):
86 if selected == active:
87 return "active"
84 %>
88 %>
85 ## super admin case
89 ## super admin case
86 % if c.rhodecode_user.is_admin:
90 % if c.rhodecode_user.is_admin:
87 <li><a href="${h.route_path('admin_audit_logs')}">${_('Admin audit logs')}</a></li>
91 <li class="${is_active('audit_logs')}"><a href="${h.route_path('admin_audit_logs')}">${_('Admin audit logs')}</a></li>
88 <li><a href="${h.route_path('repos')}">${_('Repositories')}</a></li>
92 <li class="${is_active('repositories')}"><a href="${h.route_path('repos')}">${_('Repositories')}</a></li>
89 <li><a href="${h.route_path('repo_groups')}">${_('Repository groups')}</a></li>
93 <li class="${is_active('repository_groups')}"><a href="${h.route_path('repo_groups')}">${_('Repository groups')}</a></li>
90 <li><a href="${h.route_path('users')}">${_('Users')}</a></li>
94 <li class="${is_active('users')}"><a href="${h.route_path('users')}">${_('Users')}</a></li>
91 <li><a href="${h.route_path('user_groups')}">${_('User groups')}</a></li>
95 <li class="${is_active('user_groups')}"><a href="${h.route_path('user_groups')}">${_('User groups')}</a></li>
92 <li><a href="${h.route_path('admin_permissions_application')}">${_('Permissions')}</a></li>
96 <li class="${is_active('permissions')}"><a href="${h.route_path('admin_permissions_application')}">${_('Permissions')}</a></li>
93 <li><a href="${h.route_path('auth_home', traverse='')}">${_('Authentication')}</a></li>
97 <li class="${is_active('authentication')}"><a href="${h.route_path('auth_home', traverse='')}">${_('Authentication')}</a></li>
94 <li><a href="${h.route_path('global_integrations_home')}">${_('Integrations')}</a></li>
98 <li class="${is_active('integrations')}"><a href="${h.route_path('global_integrations_home')}">${_('Integrations')}</a></li>
95 <li><a href="${h.route_path('admin_defaults_repositories')}">${_('Defaults')}</a></li>
99 <li class="${is_active('defaults')}"><a href="${h.route_path('admin_defaults_repositories')}">${_('Defaults')}</a></li>
96 <li><a href="${h.route_path('admin_settings')}">${_('Settings')}</a></li>
100 <li class="${is_active('settings')}"><a href="${h.route_path('admin_settings')}">${_('Settings')}</a></li>
97
101
98 ## delegated admin
102 ## delegated admin
99 % elif repositories or repository_groups or user_groups:
103 % elif repositories or repository_groups or user_groups:
100
104
101 %if repositories:
105 %if repositories:
102 <li class="local-admin-repos"><a href="${h.route_path('repos')}">${_('Repositories')}</a></li>
106 <li class="${is_active('repositories')} local-admin-repos"><a href="${h.route_path('repos')}">${_('Repositories')}</a></li>
103 %endif
107 %endif
104 %if repository_groups:
108 %if repository_groups:
105 <li class="local-admin-repo-groups"><a href="${h.route_path('repo_groups')}">${_('Repository groups')}</a></li>
109 <li class="${is_active('repository_groups')} local-admin-repo-groups"><a href="${h.route_path('repo_groups')}">${_('Repository groups')}</a></li>
106 %endif
110 %endif
107 %if user_groups:
111 %if user_groups:
108 <li class="local-admin-user-groups"><a href="${h.route_path('user_groups')}">${_('User groups')}</a></li>
112 <li class="${is_active('user_groups')} local-admin-user-groups"><a href="${h.route_path('user_groups')}">${_('User groups')}</a></li>
109 %endif
113 %endif
110 % endif
114 % endif
111 </ul>
115 </ul>
116 </div>
117 <div class="clear"></div>
118 </div>
112 </%def>
119 </%def>
113
120
114
121
@@ -232,7 +239,7 b''
232 return "active"
239 return "active"
233 %>
240 %>
234
241
235 <!--- CONTEXT BAR -->
242 <!--- REPO CONTEXT BAR -->
236 <div id="context-bar">
243 <div id="context-bar">
237 <div class="wrapper">
244 <div class="wrapper">
238
245
@@ -306,7 +313,7 b''
306 <strong>${_('This repository has been archived. It is now read-only.')}</strong>
313 <strong>${_('This repository has been archived. It is now read-only.')}</strong>
307 </div>
314 </div>
308 % endif
315 % endif
309 <!--- END CONTEXT BAR -->
316 <!--- REPO END CONTEXT BAR -->
310
317
311 </%def>
318 </%def>
312
319
@@ -344,7 +351,7 b''
344
351
345 %>
352 %>
346
353
347 <!--- CONTEXT BAR -->
354 <!--- REPO GROUP CONTEXT BAR -->
348 <div id="context-bar">
355 <div id="context-bar">
349 <div class="wrapper">
356 <div class="wrapper">
350 <ul id="context-pages" class="navigation horizontal-list">
357 <ul id="context-pages" class="navigation horizontal-list">
@@ -371,7 +378,7 b''
371 <div class="clear"></div>
378 <div class="clear"></div>
372 </div>
379 </div>
373
380
374 <!--- END CONTEXT BAR -->
381 <!--- REPO GROUP CONTEXT BAR -->
375
382
376 </%def>
383 </%def>
377
384
General Comments 0
You need to be logged in to leave comments. Login now