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