Mercurial > public > src > rhodecode
changeset 148:d928d5f0a251
Adde raw file to routes, and refactoring
updated link to raw file at file source template
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Tue, 11 May 2010 22:23:16 +0200 |
parents | 873fd2dc62c2 |
children | b3c93efd1c97 |
files | pylons_app/config/routing.py pylons_app/templates/files/files_source.html |
diffstat | 2 files changed, 20 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/pylons_app/config/routing.py Tue May 11 22:07:43 2010 +0200 +++ b/pylons_app/config/routing.py Tue May 11 22:23:16 2010 +0200 @@ -32,13 +32,22 @@ m.connect('admin_add_repo', '/add_repo/{new_repo:[a-z0-9\. _-]*}', action='add_repo') - map.connect('changeset_home', '/{repo_name}/changeset/{revision}', controller='changeset', revision='tip') - map.connect('summary_home', '/{repo_name}/summary', controller='summary') - map.connect('shortlog_home', '/{repo_name}/shortlog/{revision}', controller='shortlog', revision='tip') - map.connect('branches_home', '/{repo_name}/branches', controller='branches') - map.connect('tags_home', '/{repo_name}/tags', controller='tags') - map.connect('changelog_home', '/{repo_name}/changelog/{revision}', controller='changelog', revision='tip') - map.connect('files_home', '/{repo_name}/files/{revision}/{f_path:.*}', controller='files', revision='tip', f_path='') - map.connect('files_diff_home', '/{repo_name}/diff/{f_path:.*}', controller='files', action='diff', revision='tip', f_path='') - + map.connect('changeset_home', '/{repo_name}/changeset/{revision}', + controller='changeset', revision='tip') + map.connect('summary_home', '/{repo_name}/summary', + controller='summary') + map.connect('shortlog_home', '/{repo_name}/shortlog/{revision}', + controller='shortlog', revision='tip') + map.connect('branches_home', '/{repo_name}/branches', + controller='branches') + map.connect('tags_home', '/{repo_name}/tags', + controller='tags') + map.connect('changelog_home', '/{repo_name}/changelog/{revision}', + controller='changelog', revision='tip') + map.connect('files_home', '/{repo_name}/files/{revision}/{f_path:.*}', + controller='files', revision='tip', f_path='') + map.connect('files_diff_home', '/{repo_name}/diff/{f_path:.*}', + controller='files', action='diff', revision='tip', f_path='') + map.connect('files_raw_home', '/{repo_name}/rawfile/{revision}/{f_path:.*}', + controller='files', action='rawfile', revision='tip', f_path='') return map
--- a/pylons_app/templates/files/files_source.html Tue May 11 22:07:43 2010 +0200 +++ b/pylons_app/templates/files/files_source.html Tue May 11 22:23:16 2010 +0200 @@ -4,7 +4,7 @@ <dt>${_('Size')}</dt> <dd>${h.filesizeformat(c.files_list.size)}</dd> <dt>${_('Options')}</dt> - <dd>${h.link_to(_('annotate'),h.url('#'))} / ${h.link_to(_('raw'),h.url('#'))}</dd> + <dd>${h.link_to(_('annotate'),h.url('#'))} / ${h.link_to(_('raw'),h.url('files_raw_home',repo_name=c.repo_name,revision=c.cur_rev,f_path=c.f_path))}</dd> <dt>${_('History')}</dt> <dd> ${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='GET')} @@ -18,6 +18,7 @@ <div id="body" class="codeblock"> <div class="code-header"> <span>${c.files_list.name}@r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset._short}</span> + <span style="font-size:70%">"${c.file_msg}"</span> </div> <div class="code-body"> ${h.pygmentize(c.files_list.content,linenos=True,anchorlinenos=True,cssclass="code-highlight")}