annotate pylons_app/templates/index.html @ 318:fdf9f6ee5217

Implemented permissions into hg app, secured admin controllers, templates and repository specific controllers
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 29 Jun 2010 20:45:03 +0200
parents 42f5c36820ef
children 9c390ca19deb
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
55
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
1 ## -*- coding: utf-8 -*-
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
2 <%inherit file="base/base.html"/>
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
3 <%def name="title()">
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
4 ${c.repos_prefix} Mercurial Repositories
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
5 </%def>
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
6 <%def name="breadcrumbs()">
57
e96bc5a01490 Implemented main page sorting
Marcin Kuzminski <marcin@python-blog.com>
parents: 56
diff changeset
7 ${c.repos_prefix} Mercurial Repositories
55
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
8 </%def>
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
9 <%def name="page_nav()">
186
556473ba0399 fixed menu in home page, and added login html with forms that validates username and password.
Marcin Kuzminski <marcin@python-works.com>
parents: 157
diff changeset
10 ${self.menu('home')}
0
564e40829f80 initial commit.
Marcin Kuzminski
parents:
diff changeset
11 </%def>
55
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
12 <%def name="main()">
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
13 <%def name="get_sort(name)">
57
e96bc5a01490 Implemented main page sorting
Marcin Kuzminski <marcin@python-blog.com>
parents: 56
diff changeset
14 <%name_slug = name.lower().replace(' ','_') %>
e96bc5a01490 Implemented main page sorting
Marcin Kuzminski <marcin@python-blog.com>
parents: 56
diff changeset
15 %if name_slug == c.cs_slug:
268
bd70107ef256 main html update
Marcin Kuzminski <marcin@python-works.com>
parents: 260
diff changeset
16 <span style="font-weight: bold;text-decoration: underline;">${name}</span>
57
e96bc5a01490 Implemented main page sorting
Marcin Kuzminski <marcin@python-blog.com>
parents: 56
diff changeset
17 %else:
e96bc5a01490 Implemented main page sorting
Marcin Kuzminski <marcin@python-blog.com>
parents: 56
diff changeset
18 <span style="font-weight: bold">${name}</span>
56
bf1b64046c79 Added last change translation to 'time ago', added generation of enabled zip archives
Marcin Kuzminski <marcin@python-blog.com>
parents: 55
diff changeset
19 %endif
268
bd70107ef256 main html update
Marcin Kuzminski <marcin@python-works.com>
parents: 260
diff changeset
20 <a style="color:#FFF" href="?sort=${name_slug}">&darr;</a>
bd70107ef256 main html update
Marcin Kuzminski <marcin@python-works.com>
parents: 260
diff changeset
21 <a style="color:#FFF" href="?sort=-${name_slug}">&uarr;</a>
55
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
22 </%def>
268
bd70107ef256 main html update
Marcin Kuzminski <marcin@python-works.com>
parents: 260
diff changeset
23 <table class="table_disp">
bd70107ef256 main html update
Marcin Kuzminski <marcin@python-works.com>
parents: 260
diff changeset
24 <tr class="header">
55
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
25 <td>${get_sort(_('Name'))}</td>
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
26 <td>${get_sort(_('Description'))}</td>
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
27 <td>${get_sort(_('Last change'))}</td>
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
28 <td>${get_sort(_('Tip'))}</td>
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
29 <td>${get_sort(_('Contact'))}</td>
268
bd70107ef256 main html update
Marcin Kuzminski <marcin@python-works.com>
parents: 260
diff changeset
30 <td>${_('RSS')}</td>
bd70107ef256 main html update
Marcin Kuzminski <marcin@python-works.com>
parents: 260
diff changeset
31 <td>${_('Atom')}</td>
55
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
32 </tr>
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
33 %for cnt,repo in enumerate(c.repos_list):
318
fdf9f6ee5217 Implemented permissions into hg app, secured admin controllers, templates and repository specific controllers
Marcin Kuzminski <marcin@python-works.com>
parents: 285
diff changeset
34 %if h.HasRepoPermissionAny('repository.write','repository.read','repository.admin')(repo['name'],'main page check'):
55
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
35 <tr class="parity${cnt%2}">
281
cd2ee462fc2c implemented yui tooltip, and added it into annotation and main page.
Marcin Kuzminski <marcin@python-works.com>
parents: 268
diff changeset
36 <td>${h.link_to(repo['name'],
cd2ee462fc2c implemented yui tooltip, and added it into annotation and main page.
Marcin Kuzminski <marcin@python-works.com>
parents: 268
diff changeset
37 h.url('summary_home',repo_name=repo['name']))}</td>
260
6ada8c223374 made global funcion to clean repo names, and remove all special chars from the name.
Marcin Kuzminski <marcin@python-works.com>
parents: 259
diff changeset
38 <td title="${repo['description']}">${h.truncate(repo['description'],60)}</td>
282
237470e64bb8 switched filters into webhelpers for easy of usage.
Marcin Kuzminski <marcin@python-works.com>
parents: 281
diff changeset
39 <td>${h.age(repo['last_change'])}</td>
285
42f5c36820ef few validation bugfixes/ new repo changesets, first commit changesets
Marcin Kuzminski <marcin@python-works.com>
parents: 282
diff changeset
40 <td>${h.link_to_if(repo['rev']>=0,'r%s:%s' % (repo['rev'],repo['tip']),
281
cd2ee462fc2c implemented yui tooltip, and added it into annotation and main page.
Marcin Kuzminski <marcin@python-works.com>
parents: 268
diff changeset
41 h.url('changeset_home',repo_name=repo['name'],revision=repo['tip']),
cd2ee462fc2c implemented yui tooltip, and added it into annotation and main page.
Marcin Kuzminski <marcin@python-works.com>
parents: 268
diff changeset
42 class_="tooltip",
cd2ee462fc2c implemented yui tooltip, and added it into annotation and main page.
Marcin Kuzminski <marcin@python-works.com>
parents: 268
diff changeset
43 tooltip_title=h.tooltip(repo['last_msg']))}</td>
282
237470e64bb8 switched filters into webhelpers for easy of usage.
Marcin Kuzminski <marcin@python-works.com>
parents: 281
diff changeset
44 <td title="${repo['contact']}">${h.person(repo['contact'])}</td>
55
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
45 <td>
268
bd70107ef256 main html update
Marcin Kuzminski <marcin@python-works.com>
parents: 260
diff changeset
46 <a title="${_('Subscribe to %s rss feed')%repo['name']}" class="rss_logo" href="${h.url('rss_feed_home',repo_name=repo['name'])}"></a>
55
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
47 </td>
102
2dc0c8e4f384 Updated tempaltes, added file browser breadcrumbs, and feed icons
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
48 <td>
268
bd70107ef256 main html update
Marcin Kuzminski <marcin@python-works.com>
parents: 260
diff changeset
49 <a title="${_('Subscribe to %s atom feed')%repo['name']}" class="atom_logo" href="${h.url('atom_feed_home',repo_name=repo['name'])}"></a>
102
2dc0c8e4f384 Updated tempaltes, added file browser breadcrumbs, and feed icons
Marcin Kuzminski <marcin@python-works.com>
parents: 83
diff changeset
50 </td>
55
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
51 </tr>
318
fdf9f6ee5217 Implemented permissions into hg app, secured admin controllers, templates and repository specific controllers
Marcin Kuzminski <marcin@python-works.com>
parents: 285
diff changeset
52 %endif
55
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
53 %endfor
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
54 </table>
e00dccb6f211 Implemented index page using vcs
Marcin Kuzminski <marcin@python-blog.com>
parents: 0
diff changeset
55 </%def>