diff rhodecode/templates/changelog/changelog.html @ 2363:745dda7817ed codereview

Rewrote url routes to make all validations and parsing for compare view + added compare fork button into forked repos
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 30 May 2012 23:12:16 +0200
parents 8fe7c1024719
children 9f37281195a2
line wrap: on
line diff
--- a/rhodecode/templates/changelog/changelog.html	Wed May 30 22:23:23 2012 +0200
+++ b/rhodecode/templates/changelog/changelog.html	Wed May 30 23:12:16 2012 +0200
@@ -32,7 +32,12 @@
 					<canvas id="graph_canvas"></canvas>
 				</div>
 				<div id="graph_content">
-                    <div class="info_box" style="clear: both;padding: 10px 6px;vertical-align: right;text-align: right;"><a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a></div>
+                    <div class="info_box" style="clear: both;padding: 10px 6px;vertical-align: right;text-align: right;">
+                    %if c.rhodecode_db_repo.fork:
+                        <a title="${_('compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.repo_name,org_ref_type='branch',org_ref='default',other_ref_type='branch',other_ref='default',repo=c.rhodecode_db_repo.fork.repo_name)}" class="ui-btn small">${_('Compare fork')}</a>
+                    %endif
+                    <a href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a>
+                    </div>
 					<div class="container_header">
 				        ${h.form(h.url.current(),method='get')}
 				        <div class="info_box" style="float:left">