Mercurial > public > src > rhodecode
changeset 126:cfddee9d3693
Updated summary page
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 03 May 2010 18:31:00 +0200 |
parents | 2811259dc12d |
children | 20dc7a5eb748 |
files | pylons_app/config/routing.py pylons_app/controllers/summary.py pylons_app/templates/summary.html |
diffstat | 3 files changed, 34 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/pylons_app/config/routing.py Thu Apr 29 01:26:20 2010 +0200 +++ b/pylons_app/config/routing.py Mon May 03 18:31:00 2010 +0200 @@ -34,7 +34,7 @@ map.connect('changeset_home', '/{repo_name}/changeset/{revision}', controller='changeset', revision='tip') map.connect('summary_home', '/{repo_name}/summary', controller='summary') - map.connect('changelog_home', '/{repo_name}/changelog', controller='changelog') + map.connect('changelog_home', '/{repo_name}/changelog/{revision}', controller='changelog', revision='tip') map.connect('branches_home', '/{repo_name}/branches', controller='branches') map.connect('tags_home', '/{repo_name}/tags', controller='tags') map.connect('graph_home', '/{repo_name}/graph/{revision}', controller='graph', revision='tip')
--- a/pylons_app/controllers/summary.py Thu Apr 29 01:26:20 2010 +0200 +++ b/pylons_app/controllers/summary.py Mon May 03 18:31:00 2010 +0200 @@ -27,6 +27,6 @@ 'repo_name':c.repo_name, } c.clone_repo_url = url(uri) - c.repo_tags = []#c.repo_info.get_tags(limit=10) - c.repo_branches = []#c.repo_info.get_branches(limit=10) + c.repo_tags = c.repo_info.tags[:10] + c.repo_branches = c.repo_info.branches[:10] return render('/summary.html')
--- a/pylons_app/templates/summary.html Thu Apr 29 01:26:20 2010 +0200 +++ b/pylons_app/templates/summary.html Mon May 03 18:31:00 2010 +0200 @@ -35,7 +35,7 @@ <dt>${_('last change')}</dt> <dd>${c.repo_info.last_change|n,filters.rfc822date} - ${c.repo_info.last_change|n,filters.age}</dd> <dt>${_('url')}</dt> - <dd><pre>$ hg clone <a href="${c.clone_repo_url}">${c.clone_repo_url}</a></pre></dd> + <dd><pre>hg clone <a href="${c.clone_repo_url}">${c.clone_repo_url}</a></pre></dd> <dt>${_('Download')}</dt> <dd> %for archive in c.repo_info._get_archives(): @@ -74,15 +74,41 @@ <h2>${h.link_to(_('Tags'),h.url('tags_home',repo_name=c.repo_name))}</h2> <table> - %for tag in c.repo_tags: - ${tag} + %for cnt,tag in enumerate(c.repo_tags): + <tr class="parity${cnt%2}"> + <td>${tag._ctx.date()|n,filters.age}</td> + <td></td> + <td> + <span class="logtags"> + <span class="tagtag">${h.link_to(tag.tags[-1],h.url('changeset_home',repo_name=c.repo_name,revision=tag._short))}</span> + </span> + </td> + <td class="nowrap"> + ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=tag._short))} + | + ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=tag._short))} + </td> + </tr> %endfor </table> <h2>${h.link_to(_('Branches'),h.url('branches_home',repo_name=c.repo_name))}</h2> <table> - %for branch in c.repo_branches: - ${branch} + %for cnt,branch in enumerate(c.repo_branches): + <tr class="parity${cnt%2}"> + <td>${branch._ctx.date()|n,filters.age}</td> + <td></td> + <td> + <span class="logtags"> + <span class="branchtag">${h.link_to(branch.branch,h.url('changeset_home',repo_name=c.repo_name,revision=branch._short))}</span> + </span> + </td> + <td class="nowrap"> + ${h.link_to(_('changeset'),h.url('changeset_home',repo_name=c.repo_name,revision=branch._short))} + | + ${h.link_to(_('files'),h.url('files_home',repo_name=c.repo_name,revision=branch._short))} + </td> + </tr> %endfor </table>