##// END OF EJS Templates
diff: drop "confirm to show potentially huge diff" click-through...
Mads Kiilerich -
r3985:d46d9d93 default
parent child Browse files
Show More
@@ -1,89 +1,89
1 ## -*- coding: utf-8 -*-
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
2 <%inherit file="/base/base.html"/>
3
3
4 <%def name="title()">
4 <%def name="title()">
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}
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}
6 </%def>
6 </%def>
7
7
8 <%def name="breadcrumbs_links()">
8 <%def name="breadcrumbs_links()">
9 ${_('Compare revisions')}
9 ${_('Compare revisions')}
10 </%def>
10 </%def>
11
11
12 <%def name="page_nav()">
12 <%def name="page_nav()">
13 ${self.menu('repositories')}
13 ${self.menu('repositories')}
14 </%def>
14 </%def>
15
15
16 <%def name="main()">
16 <%def name="main()">
17 ${self.context_bar('changelog')}
17 ${self.context_bar('changelog')}
18 <div class="box">
18 <div class="box">
19 <!-- box / title -->
19 <!-- box / title -->
20 <div class="title">
20 <div class="title">
21 ${self.breadcrumbs()}
21 ${self.breadcrumbs()}
22 </div>
22 </div>
23 <div class="table">
23 <div class="table">
24 <div id="body" class="diffblock">
24 <div id="body" class="diffblock">
25 <div class="code-header">
25 <div class="code-header">
26 <div>
26 <div>
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>
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>
28 </div>
28 </div>
29 </div>
29 </div>
30 </div>
30 </div>
31 <div id="changeset_compare_view_content">
31 <div id="changeset_compare_view_content">
32 ##CS
32 ##CS
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>
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>
34 <%include file="compare_cs.html" />
34 <%include file="compare_cs.html" />
35
35
36 ## FILES
36 ## FILES
37 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
37 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">
38
38
39 % if c.limited_diff:
39 % if c.limited_diff:
40 ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)}
40 ${ungettext('%s file changed', '%s files changed', len(c.files)) % len(c.files)}
41 % else:
41 % else:
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)}:
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)}:
43 %endif
43 %endif
44
44
45 </div>
45 </div>
46 <div class="cs_files">
46 <div class="cs_files">
47 %if not c.files:
47 %if not c.files:
48 <span class="empty_data">${_('No files')}</span>
48 <span class="empty_data">${_('No files')}</span>
49 %endif
49 %endif
50 %for fid, change, f, stat in c.files:
50 %for fid, change, f, stat in c.files:
51 <div class="cs_${change}">
51 <div class="cs_${change}">
52 <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid, **request.GET.mixed()))}</div>
52 <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid, **request.GET.mixed()))}</div>
53 <div class="changes">${h.fancy_file_stats(stat)}</div>
53 <div class="changes">${h.fancy_file_stats(stat)}</div>
54 </div>
54 </div>
55 %endfor
55 %endfor
56 </div>
56 </div>
57 % if c.limited_diff:
57 % if c.limited_diff:
58 <h5>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h5>
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>
59 % endif
59 % endif
60 </div>
60 </div>
61 </div>
61 </div>
62
62
63 ## diff block
63 ## diff block
64 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
64 <%namespace name="diff_block" file="/changeset/diff_block.html"/>
65 %for fid, change, f, stat in c.files:
65 %for fid, change, f, stat in c.files:
66 ${diff_block.diff_block_simple([c.changes[fid]])}
66 ${diff_block.diff_block_simple([c.changes[fid]])}
67 %endfor
67 %endfor
68 % if c.limited_diff:
68 % if c.limited_diff:
69 <h4>${_('Changeset was too big and was cut off...')} <a href="${h.url.current(fulldiff=1, **request.GET.mixed())}" onclick="return confirm('${_("confirm to show potentially huge diff")}')">${_('Show full diff')}</a></h4>
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>
70 % endif
70 % endif
71 <script type="text/javascript">
71 <script type="text/javascript">
72
72
73 YUE.onDOMReady(function(){
73 YUE.onDOMReady(function(){
74
74
75 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
75 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
76 var act = e.currentTarget.nextElementSibling;
76 var act = e.currentTarget.nextElementSibling;
77
77
78 if(YUD.hasClass(act,'active')){
78 if(YUD.hasClass(act,'active')){
79 YUD.removeClass(act,'active');
79 YUD.removeClass(act,'active');
80 YUD.setStyle(act,'display','none');
80 YUD.setStyle(act,'display','none');
81 }else{
81 }else{
82 YUD.addClass(act,'active');
82 YUD.addClass(act,'active');
83 YUD.setStyle(act,'display','');
83 YUD.setStyle(act,'display','');
84 }
84 }
85 });
85 });
86 })
86 })
87 </script>
87 </script>
88 </div>
88 </div>
89 </%def>
89 </%def>
General Comments 0
You need to be logged in to leave comments. Login now