Mercurial > kallithea
annotate pylons_app/templates/admin/admin.html @ 159:96285f905073
fixed bug in admin template
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 17 May 2010 03:06:12 +0200 |
parents | 20dc7a5eb748 |
children | fec7d0707e72 |
rev | line source |
---|---|
43 | 1 ## -*- coding: utf-8 -*- |
127
20dc7a5eb748
Html changes and cleanups, made folders for html templates, implemented tags and branches pages
Marcin Kuzminski <marcin@python-works.com>
parents:
108
diff
changeset
|
2 <%inherit file="/base/base.html"/> |
45 | 3 <%def name="get_form_error(element)"> |
108 | 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 | |
45 | 13 </%def> |
44 | 14 <%def name="title()"> |
15 ${_('Repository managment')} | |
16 </%def> | |
17 <%def name="breadcrumbs()"> | |
18 ${h.link_to(u'Home',h.url('/'))} | |
19 / | |
20 ${h.link_to(u'Admin',h.url('admin_home'))} | |
21 </%def> | |
22 <%def name="page_nav()"> | |
159
96285f905073
fixed bug in admin template
Marcin Kuzminski <marcin@python-works.com>
parents:
127
diff
changeset
|
23 <ul class="page-nav"> |
96285f905073
fixed bug in admin template
Marcin Kuzminski <marcin@python-works.com>
parents:
127
diff
changeset
|
24 <li>${h.link_to(u'Home',h.url('/'))}</li> |
96285f905073
fixed bug in admin template
Marcin Kuzminski <marcin@python-works.com>
parents:
127
diff
changeset
|
25 <li class="current">${_('Admin')}</li> |
96285f905073
fixed bug in admin template
Marcin Kuzminski <marcin@python-works.com>
parents:
127
diff
changeset
|
26 </ul> |
44 | 27 </%def> |
28 <%def name="main()"> | |
29 %if c.admin_user: | |
30 <ul class="submenu"> | |
31 <li> | |
47
f6ac79182600
Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
45
diff
changeset
|
32 ${h.link_to(u'Repos',h.url('repos'))} |
44 | 33 </li> |
34 <li> | |
47
f6ac79182600
Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
45
diff
changeset
|
35 ${h.link_to(u'Users',h.url('users'))} |
44 | 36 </li> |
37 </ul> | |
38 <br/> | |
39 <div> | |
62
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
40 <h2>Welcome ${c.admin_username}</h2> |
79
9fe23fdab9e9
Implemented AJAH paging
Marcin Kuzminski <marcin@python-blog.com>
parents:
78
diff
changeset
|
41 <div id="user_log"> |
9fe23fdab9e9
Implemented AJAH paging
Marcin Kuzminski <marcin@python-blog.com>
parents:
78
diff
changeset
|
42 ${c.log_data} |
9fe23fdab9e9
Implemented AJAH paging
Marcin Kuzminski <marcin@python-blog.com>
parents:
78
diff
changeset
|
43 </div> |
43 | 44 </div> |
44 | 45 %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> | |
45 | 54 <td>${get_form_error('username')} </td> |
44 | 55 </tr> |
56 <tr> | |
57 <td>${_('Password')}</td> | |
45 | 58 <td>${h.password('password')}</td> |
59 <td>${get_form_error('password')}</td> | |
44 | 60 </tr> |
61 <tr> | |
62 <td></td> | |
63 <td>${h.submit('login','login')}</td> | |
64 </tr> | |
65 </table> | |
66 ${h.end_form()} | |
67 </div> | |
68 %endif | |
69 | |
70 </%def> |