changeset 274:5db466f19b8d

added proposal from mercurial mailing list, to display options for raw diffs, and diffs directly from within changesets view
author Marcin Kuzminski <marcin@python-works.com>
date Tue, 08 Jun 2010 23:52:01 +0200
parents cad478edb1c7
children 2d61aa00e855
files pylons_app/templates/changeset/changeset.html
diffstat 1 files changed, 10 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/pylons_app/templates/changeset/changeset.html	Tue Jun 08 23:48:41 2010 +0200
+++ b/pylons_app/templates/changeset/changeset.html	Tue Jun 08 23:52:01 2010 +0200
@@ -56,12 +56,12 @@
     
     <div style="clear:both;height:10px"></div>
     <div class="cs_files">
-			%for change,filenode,diff in c.changes:
+			%for change,filenode,diff,cs1,cs2 in c.changes:
 				<div class="cs_${change}">${h.link_to(filenode.path,h.url.current(anchor='CHANGE-%s'%filenode.path))}</div>
 			%endfor
 	</div>
 	
-	%for change,filenode,diff in c.changes:
+	%for change,filenode,diff,cs1,cs2 in c.changes:
 		%if change !='removed':
 		<div style="clear:both;height:10px"></div>
 		<div id="body" class="diffblock">
@@ -71,13 +71,14 @@
 						${h.link_to_if(change!='removed',filenode.path,h.url('files_home',repo_name=c.repo_name,
 						revision=filenode.changeset.raw_id,f_path=filenode.path))}
 					</span>
-					
-					##&raquo; <span style="font-size:77%">${h.link_to(_('diff'),
-					##h.url.current(diff2=c.diff2,diff1=c.diff1,diff='diff'))}</span>
-					##&raquo; <span style="font-size:77%">${h.link_to(_('raw diff'),
-					##h.url.current(diff2=c.diff2,diff1=c.diff1.split(':')[-1],diff='raw'))}</span>
-					##&raquo; <span style="font-size:77%">${h.link_to(_('download diff'),
-					##h.url.current(diff2=c.diff2,diff1=c.diff1,diff='download'))}</span>
+					%if 1:
+					&raquo; <span style="font-size:77%">${h.link_to(_('diff'),
+					h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path,diff2=cs2,diff1=cs1,diff='diff'))}</span>
+					&raquo; <span style="font-size:77%">${h.link_to(_('raw diff'),
+					h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path,diff2=cs2,diff1=cs1,diff='raw'))}</span>
+					&raquo; <span style="font-size:77%">${h.link_to(_('download diff'),
+					h.url('files_diff_home',repo_name=c.repo_name,f_path=filenode.path,diff2=cs2,diff1=cs1,diff='download'))}</span>
+					%endif
 				</div>
 			</div>
 			<div class="code-body">