##// END OF EJS Templates
admin fix
marcink -
r108:68e57490 default
parent child Browse files
Show More
@@ -1,66 +1,68
1 1 ## -*- coding: utf-8 -*-
2 2 <%inherit file="base/base.html"/>
3 3 <%def name="get_form_error(element)">
4 %if type(c.form_errors) == dict:
5 %if c.form_errors.get(element,False):
6 <span class="error-message">
7 ${c.form_errors.get(element,'')}
8 </span>
9 %endif
10 %endif
4 %if hasattr(c,'form_errors'):
5 %if type(c.form_errors) == dict:
6 %if c.form_errors.get(element,False):
7 <span class="error-message">
8 ${c.form_errors.get(element,'')}
9 </span>
10 %endif
11 %endif
12 %endif
11 13 </%def>
12 14 <%def name="title()">
13 15 ${_('Repository managment')}
14 16 </%def>
15 17 <%def name="breadcrumbs()">
16 18 ${h.link_to(u'Home',h.url('/'))}
17 19 /
18 20 ${h.link_to(u'Admin',h.url('admin_home'))}
19 21 </%def>
20 22 <%def name="page_nav()">
21 23 <li>${h.link_to(u'Home',h.url('/'))}</li>
22 24 <li class="current">${_('Admin')}</li>
23 25 </%def>
24 26 <%def name="main()">
25 27 %if c.admin_user:
26 28 <ul class="submenu">
27 29 <li>
28 30 ${h.link_to(u'Repos',h.url('repos'))}
29 31 </li>
30 32 <li>
31 33 ${h.link_to(u'Users',h.url('users'))}
32 34 </li>
33 35 </ul>
34 36 <br/>
35 37 <div>
36 38 <h2>Welcome ${c.admin_username}</h2>
37 39 <div id="user_log">
38 40 ${c.log_data}
39 41 </div>
40 42 </div>
41 43 %else:
42 44 <div>
43 45 <br />
44 46 <h2>${_('Login')}</h2>
45 47 ${h.form(h.url.current())}
46 48 <table>
47 49 <tr>
48 50 <td>${_('Username')}</td>
49 51 <td>${h.text('username')}</td>
50 52 <td>${get_form_error('username')} </td>
51 53 </tr>
52 54 <tr>
53 55 <td>${_('Password')}</td>
54 56 <td>${h.password('password')}</td>
55 57 <td>${get_form_error('password')}</td>
56 58 </tr>
57 59 <tr>
58 60 <td></td>
59 61 <td>${h.submit('login','login')}</td>
60 62 </tr>
61 63 </table>
62 64 ${h.end_form()}
63 65 </div>
64 66 %endif
65 67
66 68 </%def> No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now