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