diff rhodecode/templates/changelog/changelog.html @ 3465:df05806e8a2d beta

changelog: "compare fork with parent" should only be shown when no changesets selected It do not use the selected changeset - showing the option is confusing. Greying out would perhaps be better ... but the button is already grey.
author Mads Kiilerich <madski@unity3d.com>
date Tue, 05 Mar 2013 17:12:30 +0100
parents d253f1b530c8
children b19b1723ff10
line wrap: on
line diff
--- a/rhodecode/templates/changelog/changelog.html	Mon Mar 04 18:56:02 2013 +0100
+++ b/rhodecode/templates/changelog/changelog.html	Tue Mar 05 17:12:30 2013 +0100
@@ -37,7 +37,7 @@
                     <a href="#" class="ui-btn small" id="rev_range_clear" style="display:none">${_('Clear selection')}</a>
 
                     %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.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default')}" class="ui-btn small">${_('Compare fork with parent')}</a>
+                        <a id="compare_fork" title="${_('Compare fork with %s' % c.rhodecode_db_repo.fork.repo_name)}" href="${h.url('compare_url',repo_name=c.rhodecode_db_repo.fork.repo_name,org_ref_type='branch',org_ref='default',other_repo=c.repo_name,other_ref_type='branch',other_ref=request.GET.get('branch') or 'default')}" class="ui-btn small">${_('Compare fork with parent')}</a>
                     %endif
                     %if h.is_hg(c.rhodecode_repo):
                     <a id="open_new_pr" href="${h.url('pullrequest_home',repo_name=c.repo_name)}" class="ui-btn small">${_('Open new pull request')}</a>
@@ -186,11 +186,12 @@
                             YUD.setStyle('rev_range_clear','display','');
 
                             YUD.get('open_new_pr').href = pr_tmpl + '?rev_start={0}&rev_end={1}'.format(rev_start,rev_end);
-
+                            YUD.setStyle('compare_fork','display','none');
                         }
                         else{
                             YUD.setStyle('rev_range_container','display','none');
                             YUD.setStyle('rev_range_clear','display','none');
+                            YUD.setStyle('compare_fork','display','');
                         }
                     };
                     YUE.onDOMReady(checkbox_checker);