Mercurial > kallithea
annotate pylons_app/templates/admin.html @ 77:e2600310e0b2
bugfix fot admin template
author | Marcin Kuzminski <marcin@python-blog.com> |
---|---|
date | Wed, 14 Apr 2010 00:51:23 +0200 |
parents | 99afa4d28e2b |
children | 6f524697f79d |
rev | line source |
---|---|
43 | 1 ## -*- coding: utf-8 -*- |
44 | 2 <%inherit file="base/base.html"/> |
45 | 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 | |
11 </%def> | |
44 | 12 <%def name="title()"> |
13 ${_('Repository managment')} | |
14 </%def> | |
15 <%def name="breadcrumbs()"> | |
16 ${h.link_to(u'Home',h.url('/'))} | |
17 / | |
18 ${h.link_to(u'Admin',h.url('admin_home'))} | |
19 </%def> | |
20 <%def name="page_nav()"> | |
21 <li>${h.link_to(u'Home',h.url('/'))}</li> | |
22 <li class="current">${_('Admin')}</li> | |
23 </%def> | |
24 <%def name="main()"> | |
25 %if c.admin_user: | |
26 <ul class="submenu"> | |
27 <li> | |
47
f6ac79182600
Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
45
diff
changeset
|
28 ${h.link_to(u'Repos',h.url('repos'))} |
44 | 29 </li> |
30 <li> | |
47
f6ac79182600
Added rest controllers for repos and users,
Marcin Kuzminski <marcin@python-blog.com>
parents:
45
diff
changeset
|
31 ${h.link_to(u'Users',h.url('users'))} |
44 | 32 </li> |
33 </ul> | |
34 <br/> | |
35 <div> | |
62
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
36 <h2>Welcome ${c.admin_username}</h2> |
77
e2600310e0b2
bugfix fot admin template
Marcin Kuzminski <marcin@python-blog.com>
parents:
75
diff
changeset
|
37 <div>${_('Last 10 user actions')}</div> |
62
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
38 %if c.users_log: |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
39 <table> |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
40 <tr> |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
41 <td>${_('Username')}</td> |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
42 <td>${_('Repository')}</td> |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
43 <td>${_('Action')}</td> |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
44 <td>${_('Date')}</td> |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
45 </tr> |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
46 %for cnt,l in enumerate(c.users_log): |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
47 <tr class="parity${cnt%2}"> |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
48 <td>${l.user.username}</td> |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
49 <td>${l.repository}</td> |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
50 <td>${l.action}</td> |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
51 <td>${l.action_date}</td> |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
52 </tr> |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
53 %endfor |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
54 </table> |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
55 %else: |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
56 ${_('No actions yet')} |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
57 %endif |
4df4c0eac619
Updated admin to show last 5 actions + updated db model
Marcin Kuzminski <marcin@python-blog.com>
parents:
47
diff
changeset
|
58 |
43 | 59 </div> |
44 | 60 %else: |
61 <div> | |
62 <br /> | |
63 <h2>${_('Login')}</h2> | |
64 ${h.form(h.url.current())} | |
65 <table> | |
66 <tr> | |
67 <td>${_('Username')}</td> | |
68 <td>${h.text('username')}</td> | |
45 | 69 <td>${get_form_error('username')} </td> |
44 | 70 </tr> |
71 <tr> | |
72 <td>${_('Password')}</td> | |
45 | 73 <td>${h.password('password')}</td> |
74 <td>${get_form_error('password')}</td> | |
44 | 75 </tr> |
76 <tr> | |
77 <td></td> | |
78 <td>${h.submit('login','login')}</td> | |
79 </tr> | |
80 </table> | |
81 ${h.end_form()} | |
82 </div> | |
83 %endif | |
84 | |
85 </%def> |