Changeset - df05806e8a2d
[Not reviewed]
beta
0 1 0
Mads Kiilerich - 13 years ago 2013-03-05 17:12:30
madski@unity3d.com
Grafted from: 7381bb008185
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.
1 file changed with 3 insertions and 2 deletions:
0 comments (0 inline, 0 general)
rhodecode/templates/changelog/changelog.html
Show inline comments
 
@@ -34,13 +34,13 @@ ${_('%s Changelog') % c.repo_name} - ${c
 
                <div id="graph_content">
 
                    <div class="info_box" style="clear: both;padding: 10px 6px;text-align: right;">
 
                    <a href="#" class="ui-btn small" id="rev_range_container" style="display:none"></a>
 
                    <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>
 
                    %endif
 
                    </div>
 
                    <div class="container_header">
 
@@ -183,17 +183,18 @@ ${_('%s Changelog') % c.repo_name} - ${c
 
                            YUD.get('rev_range_container').href = url;
 
                            YUD.get('rev_range_container').innerHTML = link;
 
                            YUD.setStyle('rev_range_container','display','');
 
                            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);
 
                    YUE.on(checkboxes,'click', checkbox_checker);
 

	
 
                    YUE.on('rev_range_clear','click',function(e){
0 comments (0 inline, 0 general)