##// END OF EJS Templates
admin: added basic admin page
marcink -
r3563:a4c028c7 new-ui
parent child Browse files
Show More
@@ -0,0 +1,49 b''
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.mako"/>
3
4 <%def name="title()">
5 ${_('Settings administration')}
6 %if c.rhodecode_name:
7 &middot; ${h.branding(c.rhodecode_name)}
8 %endif
9 </%def>
10
11 <%def name="breadcrumbs_links()">
12 ${h.link_to(_('Admin'),h.route_path('admin_home'))}
13 &raquo;
14 ${_('Settings')}
15 </%def>
16
17 <%def name="menu_bar_nav()">
18 ${self.menu_items(active='admin')}
19 </%def>
20
21 <%def name="side_bar_nav()">
22
23 </%def>
24
25 <%def name="main_content()">
26 Hello Admin
27 </%def>
28
29 <%def name="main()">
30 <div class="box">
31 <div class="title">
32 ${self.breadcrumbs()}
33 </div>
34
35 ##main
36 <div class='sidebar-col-wrapper'>
37 <div class="sidebar">
38 <ul class="nav nav-pills nav-stacked">
39 ${self.side_bar_nav()}
40 </ul>
41 </div>
42
43 <div class="main-content-auto-width">
44 ${self.main_content()}
45 </div>
46 </div>
47 </div>
48
49 </%def> No newline at end of file
@@ -33,14 +33,19 b' log = logging.getLogger(__name__)'
33
33
34
34
35 class AdminMainView(BaseAppView):
35 class AdminMainView(BaseAppView):
36 def load_default_context(self):
37 c = self._get_local_tmpl_context()
38 return c
36
39
37 @LoginRequired()
40 @LoginRequired()
38 @HasPermissionAllDecorator('hg.admin')
41 @HasPermissionAllDecorator('hg.admin')
39 @view_config(
42 @view_config(
40 route_name='admin_home', request_method='GET')
43 route_name='admin_home', request_method='GET',
44 renderer='rhodecode:templates/admin/main.mako')
41 def admin_main(self):
45 def admin_main(self):
42 # redirect _admin to audit logs...
46 c = self.load_default_context()
43 raise HTTPFound(h.route_path('admin_audit_logs'))
47 c.active = 'admin'
48 return self._get_template_context(c)
44
49
45 @LoginRequired()
50 @LoginRequired()
46 @view_config(route_name='pull_requests_global_0', request_method='GET')
51 @view_config(route_name='pull_requests_global_0', request_method='GET')
General Comments 0
You need to be logged in to leave comments. Login now