annotate rhodecode/templates/compare/compare_diff.html @ 3985:d46d9d93305a

diff: drop "confirm to show potentially huge diff" click-through It is obvious from the context that the diff was cut off to use resources efficiently. The user clicked "Show full diff" because he wanted the diff anyway. Asking twice is just annoying and serves no purpose.
author Mads Kiilerich <madski@unity3d.com>
date Wed, 12 Jun 2013 01:36:35 +0200
parents eacd33e0c5b3
children 072a37c44f58
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 ## -*- coding: utf-8 -*-
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2 <%inherit file="/base/base.html"/>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 <%def name="title()">
3582
1f334a68d057 improved title consistency
Marcin Kuzminski <marcin@python-works.com>
parents: 3392
diff changeset
5 ${_('%s Compare') % c.repo_name} - ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -&gt; ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} &middot; ${c.rhodecode_name}
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6 </%def>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
8 <%def name="breadcrumbs_links()">
3602
bb1eecda3172 clean-up of breadcrumbs on pages with repo context bar
Mads Kiilerich <madski@unity3d.com>
parents: 3601
diff changeset
9 ${_('Compare revisions')}
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
10 </%def>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
11
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12 <%def name="page_nav()">
3603
eacd33e0c5b3 use valid options for the top menu: repositories, journal, search and admin
Mads Kiilerich <madski@unity3d.com>
parents: 3602
diff changeset
13 ${self.menu('repositories')}
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14 </%def>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 <%def name="main()">
3601
51da0e019248 repository pages: cleanup of use of repository context menu
Mads Kiilerich <madski@unity3d.com>
parents: 3592
diff changeset
17 ${self.context_bar('changelog')}
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 <div class="box">
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19 <!-- box / title -->
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
20 <div class="title">
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
21 ${self.breadcrumbs()}
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
22 </div>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
23 <div class="table">
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
24 <div id="body" class="diffblock">
3601
51da0e019248 repository pages: cleanup of use of repository context menu
Mads Kiilerich <madski@unity3d.com>
parents: 3592
diff changeset
25 <div class="code-header">
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
26 <div>
3138
ed11764eb81a html templates: escape '>' as '&gt;'
Mads Kiilerich <madski@unity3d.com>
parents: 3029
diff changeset
27 ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -&gt; ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} <a href="${c.swap_url}">[swap]</a>
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
28 </div>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
29 </div>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
30 </div>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
31 <div id="changeset_compare_view_content">
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2393
diff changeset
32 ##CS
3015
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
33 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${ungettext('Showing %s commit','Showing %s commits', len(c.cs_ranges)) % len(c.cs_ranges)}</div>
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2393
diff changeset
34 <%include file="compare_cs.html" />
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2393
diff changeset
35
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2393
diff changeset
36 ## FILES
3015
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
37 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
3029
685ebc84c2e9 White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3015
diff changeset
38
3015
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
39 % if c.limited_diff:
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
40 ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)}
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
41 % else:
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
42 ${ungettext('%s file changed with %s insertions and %s deletions','%s files changed with %s insertions and %s deletions', len(c.files)) % (len(c.files),c.lines_added,c.lines_deleted)}:
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
43 %endif
3029
685ebc84c2e9 White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3015
diff changeset
44
3015
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
45 </div>
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
46 <div class="cs_files">
3015
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
47 %if not c.files:
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
48 <span class="empty_data">${_('No files')}</span>
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
49 %endif
2434
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
50 %for fid, change, f, stat in c.files:
2348
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2337
diff changeset
51 <div class="cs_${change}">
3316
3e071379fe60 fixed anchor links on compare view
Marcin Kuzminski <marcin@python-works.com>
parents: 3312
diff changeset
52 <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid, **request.GET.mixed()))}</div>
2348
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2337
diff changeset
53 <div class="changes">${h.fancy_file_stats(stat)}</div>
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2337
diff changeset
54 </div>
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
55 %endfor
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
56 </div>
3011
25d77aef2729 Optimized look of compare view of changesets.
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
57 % if c.limited_diff:
3985
d46d9d93305a diff: drop "confirm to show potentially huge diff" click-through
Mads Kiilerich <madski@unity3d.com>
parents: 3603
diff changeset
58 <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff')}</a></h5>
3029
685ebc84c2e9 White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3015
diff changeset
59 % endif
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
60 </div>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
61 </div>
2434
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
62
2348
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2337
diff changeset
63 ## diff block
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2337
diff changeset
64 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2337
diff changeset
65 %for fid, change, f, stat in c.files:
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2337
diff changeset
66 ${diff_block.diff_block_simple([c.changes[fid]])}
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2337
diff changeset
67 %endfor
3011
25d77aef2729 Optimized look of compare view of changesets.
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
68 % if c.limited_diff:
3985
d46d9d93305a diff: drop "confirm to show potentially huge diff" click-through
Mads Kiilerich <madski@unity3d.com>
parents: 3603
diff changeset
69 <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}">${_('Show full diff')}</a></h4>
3011
25d77aef2729 Optimized look of compare view of changesets.
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
70 % endif
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
71 <script type="text/javascript">
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
72
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
73 YUE.onDOMReady(function(){
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
74
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
75 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
76 var act = e.currentTarget.nextElementSibling;
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
77
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
78 if(YUD.hasClass(act,'active')){
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
79 YUD.removeClass(act,'active');
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
80 YUD.setStyle(act,'display','none');
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
81 }else{
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
82 YUD.addClass(act,'active');
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
83 YUD.setStyle(act,'display','');
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
84 }
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
85 });
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
86 })
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
87 </script>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
88 </div>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
89 </%def>