changeset 3357:674a8fad3abc beta

show links to files on compare data at other and org refs
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 10 Feb 2013 17:13:25 +0100
parents 030103d57e30
children 321ca2e69004
files rhodecode/controllers/compare.py rhodecode/controllers/pullrequests.py rhodecode/templates/changeset/diff_block.html
diffstat 3 files changed, 7 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/rhodecode/controllers/compare.py	Sat Feb 09 22:37:45 2013 +0100
+++ b/rhodecode/controllers/compare.py	Sun Feb 10 17:13:25 2013 +0100
@@ -137,7 +137,9 @@
             return render('compare/compare_cs.html')
 
         c.org_ref = org_ref[1]
+        c.org_ref_type = org_ref[0]
         c.other_ref = other_ref[1]
+        c.other_ref_type = other_ref[0]
 
         if ancestor  and c.org_repo != c.other_repo:
             # case we want a simple diff without incoming changesets,
--- a/rhodecode/controllers/pullrequests.py	Sat Feb 09 22:37:45 2013 +0100
+++ b/rhodecode/controllers/pullrequests.py	Sun Feb 10 17:13:25 2013 +0100
@@ -283,7 +283,9 @@
         c.as_form = request.GET.get('as_form', False)
 
         c.org_ref = org_ref[1]
+        c.org_ref_type = org_ref[0]
         c.other_ref = other_ref[1]
+        c.other_ref_type = other_ref[0]
 
         diff_limit = self.cut_off_limit if not fulldiff else None
 
--- a/rhodecode/templates/changeset/diff_block.html	Sat Feb 09 22:37:45 2013 +0100
+++ b/rhodecode/templates/changeset/diff_block.html	Sun Feb 10 17:13:25 2013 +0100
@@ -48,7 +48,9 @@
       <div class="code-header">
           <div class="changeset_header">
               <div class="changeset_file">
-                  <a href="#">${h.safe_unicode(filenode_path)}</a>
+                  ${h.safe_unicode(filenode_path)} |
+                  <a class="spantag" href="${h.url('files_home', repo_name=c.repo_name, f_path=filenode_path, revision=c.org_ref)}">${c.org_ref_type}@${c.org_ref}</a> -&gt;
+                  <a class="spantag" href="${h.url('files_home', repo_name=c.repo_name, f_path=filenode_path, revision=c.other_ref)}">${c.other_ref_type}@${c.other_ref}</a>
               </div>
           </div>
       </div>