# HG changeset patch # User Marcin Kuzminski # Date 1273609396 -7200 # Node ID d928d5f0a25182f13b4e557f52bb7ecb1bdfb31c # Parent 873fd2dc62c2e15d59d33fe0c6777103c748e511 Adde raw file to routes, and refactoring updated link to raw file at file source template diff -r 873fd2dc62c2 -r d928d5f0a251 pylons_app/config/routing.py --- 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 diff -r 873fd2dc62c2 -r d928d5f0a251 pylons_app/templates/files/files_source.html --- 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 @@
${_('Size')}
${h.filesizeformat(c.files_list.size)}
${_('Options')}
-
${h.link_to(_('annotate'),h.url('#'))} / ${h.link_to(_('raw'),h.url('#'))}
+
${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))}
${_('History')}
${h.form(h.url('files_diff_home',repo_name=c.repo_name,f_path=c.f_path),method='GET')} @@ -18,6 +18,7 @@
${c.files_list.name}@r${c.files_list.last_changeset.revision}:${c.files_list.last_changeset._short} + "${c.file_msg}"
${h.pygmentize(c.files_list.content,linenos=True,anchorlinenos=True,cssclass="code-highlight")}