annotate rhodecode/templates/compare/compare_diff.html @ 3592:549c73bfc206 beta

changelog / compare: adjust titles Clarify what shows changesets and what more see changesets as revisions that specify snapshots that are compared.
author Mads Kiilerich <madski@unity3d.com>
date Fri, 08 Mar 2013 00:50:49 +0100
parents 1f334a68d057
children 51da0e019248
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()">
2492
79818f546538 i18n 'Home' in breadcrumbs
Takumi IINO <trot.thunder@gmail.com>
parents: 2434
diff changeset
9 ${h.link_to(_(u'Home'),h.url('/'))}
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
10 &raquo;
3392
f74be3359044 unified breadcrumbs display
Marcin Kuzminski <marcin@python-works.com>
parents: 3316
diff changeset
11 ${h.repo_link(c.rhodecode_db_repo.groups_and_repo)}
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12 &raquo;
3392
f74be3359044 unified breadcrumbs display
Marcin Kuzminski <marcin@python-works.com>
parents: 3316
diff changeset
13 ${_('compare')}
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="page_nav()">
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17 ${self.menu('changelog')}
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 </%def>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
20 <%def name="main()">
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
21 <div class="box">
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
22 <!-- box / title -->
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
23 <div class="title">
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
24 ${self.breadcrumbs()}
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
25 </div>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
26 <div class="table">
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27 <div id="body" class="diffblock">
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
28 <div class="code-header cv">
3592
549c73bfc206 changelog / compare: adjust titles
Mads Kiilerich <madski@unity3d.com>
parents: 3582
diff changeset
29 <h3 class="code-header-title">${_('Compare revisions')}</h3>
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
30 <div>
3138
ed11764eb81a html templates: escape '>' as '&gt;'
Mads Kiilerich <madski@unity3d.com>
parents: 3029
diff changeset
31 ${'%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
32 </div>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
33 </div>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
34 </div>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
35 <div id="changeset_compare_view_content">
2395
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2393
diff changeset
36 ##CS
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">${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
38 <%include file="compare_cs.html" />
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2393
diff changeset
39
b262e349a7a5 created pull-request overview
Marcin Kuzminski <marcin@python-works.com>
parents: 2393
diff changeset
40 ## FILES
3015
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
41 <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
42
3015
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
43 % if c.limited_diff:
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
44 ${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
45 % else:
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
46 ${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
47 %endif
3029
685ebc84c2e9 White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3015
diff changeset
48
3015
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
49 </div>
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
50 <div class="cs_files">
3015
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
51 %if not c.files:
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
52 <span class="empty_data">${_('No files')}</span>
16af24982e30 Multiple changes for compare system
Marcin Kuzminski <marcin@python-works.com>
parents: 3011
diff changeset
53 %endif
2434
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
54 %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
55 <div class="cs_${change}">
3316
3e071379fe60 fixed anchor links on compare view
Marcin Kuzminski <marcin@python-works.com>
parents: 3312
diff changeset
56 <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
57 <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
58 </div>
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
59 %endfor
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
60 </div>
3011
25d77aef2729 Optimized look of compare view of changesets.
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
61 % if c.limited_diff:
3312
1af36014d96f show full diff option should preserve current GET params
Marcin Kuzminski <marcin@python-works.com>
parents: 3266
diff changeset
62 <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>
3029
685ebc84c2e9 White space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 3015
diff changeset
63 % endif
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
64 </div>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
65 </div>
2434
f29469677319 Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents: 2395
diff changeset
66
2348
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2337
diff changeset
67 ## diff block
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2337
diff changeset
68 <%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
69 %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
70 ${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
71 %endfor
3011
25d77aef2729 Optimized look of compare view of changesets.
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
72 % if c.limited_diff:
3312
1af36014d96f show full diff option should preserve current GET params
Marcin Kuzminski <marcin@python-works.com>
parents: 3266
diff changeset
73 <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>
3011
25d77aef2729 Optimized look of compare view of changesets.
Marcin Kuzminski <marcin@python-works.com>
parents: 2492
diff changeset
74 % endif
2337
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
75 <script type="text/javascript">
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
76
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
77 YUE.onDOMReady(function(){
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
78
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
79 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
80 var act = e.currentTarget.nextElementSibling;
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
81
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
82 if(YUD.hasClass(act,'active')){
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
83 YUD.removeClass(act,'active');
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
84 YUD.setStyle(act,'display','none');
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
85 }else{
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
86 YUD.addClass(act,'active');
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
87 YUD.setStyle(act,'display','');
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
88 }
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
89 });
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
90 })
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
91 </script>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
92 </div>
f8c953c6b040 Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
93 </%def>