##// END OF EJS Templates
bugfix fot admin template
Marcin Kuzminski -
r77:e2600310 default
parent child Browse files
Show More
@@ -1,85 +1,85 b''
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="base/base.html"/>
2 <%inherit file="base/base.html"/>
3 <%def name="get_form_error(element)">
3 <%def name="get_form_error(element)">
4 %if type(c.form_errors) == dict:
4 %if type(c.form_errors) == dict:
5 %if c.form_errors.get(element,False):
5 %if c.form_errors.get(element,False):
6 <span class="error-message">
6 <span class="error-message">
7 ${c.form_errors.get(element,'')}
7 ${c.form_errors.get(element,'')}
8 </span>
8 </span>
9 %endif
9 %endif
10 %endif
10 %endif
11 </%def>
11 </%def>
12 <%def name="title()">
12 <%def name="title()">
13 ${_('Repository managment')}
13 ${_('Repository managment')}
14 </%def>
14 </%def>
15 <%def name="breadcrumbs()">
15 <%def name="breadcrumbs()">
16 ${h.link_to(u'Home',h.url('/'))}
16 ${h.link_to(u'Home',h.url('/'))}
17 /
17 /
18 ${h.link_to(u'Admin',h.url('admin_home'))}
18 ${h.link_to(u'Admin',h.url('admin_home'))}
19 </%def>
19 </%def>
20 <%def name="page_nav()">
20 <%def name="page_nav()">
21 <li>${h.link_to(u'Home',h.url('/'))}</li>
21 <li>${h.link_to(u'Home',h.url('/'))}</li>
22 <li class="current">${_('Admin')}</li>
22 <li class="current">${_('Admin')}</li>
23 </%def>
23 </%def>
24 <%def name="main()">
24 <%def name="main()">
25 %if c.admin_user:
25 %if c.admin_user:
26 <ul class="submenu">
26 <ul class="submenu">
27 <li>
27 <li>
28 ${h.link_to(u'Repos',h.url('repos'))}
28 ${h.link_to(u'Repos',h.url('repos'))}
29 </li>
29 </li>
30 <li>
30 <li>
31 ${h.link_to(u'Users',h.url('users'))}
31 ${h.link_to(u'Users',h.url('users'))}
32 </li>
32 </li>
33 </ul>
33 </ul>
34 <br/>
34 <br/>
35 <div>
35 <div>
36 <h2>Welcome ${c.admin_username}</h2>
36 <h2>Welcome ${c.admin_username}</h2>
37 <div>${_('Last 10 user actions')</div>
37 <div>${_('Last 10 user actions')}</div>
38 %if c.users_log:
38 %if c.users_log:
39 <table>
39 <table>
40 <tr>
40 <tr>
41 <td>${_('Username')}</td>
41 <td>${_('Username')}</td>
42 <td>${_('Repository')}</td>
42 <td>${_('Repository')}</td>
43 <td>${_('Action')}</td>
43 <td>${_('Action')}</td>
44 <td>${_('Date')}</td>
44 <td>${_('Date')}</td>
45 </tr>
45 </tr>
46 %for cnt,l in enumerate(c.users_log):
46 %for cnt,l in enumerate(c.users_log):
47 <tr class="parity${cnt%2}">
47 <tr class="parity${cnt%2}">
48 <td>${l.user.username}</td>
48 <td>${l.user.username}</td>
49 <td>${l.repository}</td>
49 <td>${l.repository}</td>
50 <td>${l.action}</td>
50 <td>${l.action}</td>
51 <td>${l.action_date}</td>
51 <td>${l.action_date}</td>
52 </tr>
52 </tr>
53 %endfor
53 %endfor
54 </table>
54 </table>
55 %else:
55 %else:
56 ${_('No actions yet')}
56 ${_('No actions yet')}
57 %endif
57 %endif
58
58
59 </div>
59 </div>
60 %else:
60 %else:
61 <div>
61 <div>
62 <br />
62 <br />
63 <h2>${_('Login')}</h2>
63 <h2>${_('Login')}</h2>
64 ${h.form(h.url.current())}
64 ${h.form(h.url.current())}
65 <table>
65 <table>
66 <tr>
66 <tr>
67 <td>${_('Username')}</td>
67 <td>${_('Username')}</td>
68 <td>${h.text('username')}</td>
68 <td>${h.text('username')}</td>
69 <td>${get_form_error('username')} </td>
69 <td>${get_form_error('username')} </td>
70 </tr>
70 </tr>
71 <tr>
71 <tr>
72 <td>${_('Password')}</td>
72 <td>${_('Password')}</td>
73 <td>${h.password('password')}</td>
73 <td>${h.password('password')}</td>
74 <td>${get_form_error('password')}</td>
74 <td>${get_form_error('password')}</td>
75 </tr>
75 </tr>
76 <tr>
76 <tr>
77 <td></td>
77 <td></td>
78 <td>${h.submit('login','login')}</td>
78 <td>${h.submit('login','login')}</td>
79 </tr>
79 </tr>
80 </table>
80 </table>
81 ${h.end_form()}
81 ${h.end_form()}
82 </div>
82 </div>
83 %endif
83 %endif
84
84
85 </%def> No newline at end of file
85 </%def>
General Comments 0
You need to be logged in to leave comments. Login now