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