annotate rhodecode/templates/changeset/diff_block.html @ 4043:a1bc4af25ec5

Implemented issue #387 side-by-side diffs view
author Marcin Kuzminski <marcin@python-works.com>
date Wed, 26 Jun 2013 19:07:32 +0200
parents ce4b7023a492
children ffd45b185016
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1787
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 ## -*- coding: utf-8 -*-
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2 ##usage:
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3 ## <%namespace name="diff_block" file="/changeset/diff_block.html"/>
2348
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
4 ## ${diff_block.diff_block(change)}
1787
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5 ##
2348
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
6 <%def name="diff_block(change)">
3419
efc00d363d1e collapsable diff container in changeset, makes quick review easier
Marcin Kuzminski <marcin@python-works.com>
parents: 3400
diff changeset
7 <div class="diff-collapse">
3654
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3517
diff changeset
8 <span target="${'diff-container-%s' % (id(change))}" class="diff-collapse-button">&uarr; ${_('Collapse diff')} &uarr;</span>
3419
efc00d363d1e collapsable diff container in changeset, makes quick review easier
Marcin Kuzminski <marcin@python-works.com>
parents: 3400
diff changeset
9 </div>
efc00d363d1e collapsable diff container in changeset, makes quick review easier
Marcin Kuzminski <marcin@python-works.com>
parents: 3400
diff changeset
10 <div class="diff-container" id="${'diff-container-%s' % (id(change))}">
2995
32471bd1f4ee Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
11 %for FID,(cs1, cs2, change, path, diff, stats) in change.iteritems():
32471bd1f4ee Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
12 <div id="${FID}_target" style="clear:both;margin-top:25px"></div>
32471bd1f4ee Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
13 <div id="${FID}" class="diffblock margined comm">
1787
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14 <div class="code-header">
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15 <div class="changeset_header">
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 <div class="changeset_file">
3816
6e4e8a03afc4 diff: don't link to removed files
Mads Kiilerich <madski@unity3d.com>
parents: 3654
diff changeset
17 ${h.link_to_if(change!='D',h.safe_unicode(path),h.url('files_home',repo_name=c.repo_name,
2995
32471bd1f4ee Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
18 revision=cs2,f_path=h.safe_unicode(path)))}
1787
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19 </div>
1865
37b3c3244bbc UI fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 1861
diff changeset
20 <div class="diff-actions">
3654
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3517
diff changeset
21 <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(path),diff2=cs2,diff1=cs1,diff='diff',fulldiff=1)}" class="tooltip" title="${h.tooltip(_('Show full diff for this file'))}"><img class="icon" src="${h.url('/images/icons/page_white_go.png')}"/></a>
4043
a1bc4af25ec5 Implemented issue #387 side-by-side diffs view
Marcin Kuzminski <marcin@python-works.com>
parents: 3821
diff changeset
22 <a href="${h.url('files_diff_2way_home',repo_name=c.repo_name,f_path=h.safe_unicode(path),diff2=cs2,diff1=cs1,diff='diff',fulldiff=1)}" class="tooltip" title="${h.tooltip(_('Show full side-by-side diff for this file'))}"><img class="icon" src="${h.url('/images/icons/application_double.png')}"/></a>
3654
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3517
diff changeset
23 <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(path),diff2=cs2,diff1=cs1,diff='raw')}" class="tooltip" title="${h.tooltip(_('Raw diff'))}"><img class="icon" src="${h.url('/images/icons/page_white.png')}"/></a>
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3517
diff changeset
24 <a href="${h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(path),diff2=cs2,diff1=cs1,diff='download')}" class="tooltip" title="${h.tooltip(_('Download diff'))}"><img class="icon" src="${h.url('/images/icons/page_save.png')}"/></a>
2995
32471bd1f4ee Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
25 ${c.ignorews_url(request.GET, h.FID(cs2,path))}
32471bd1f4ee Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
26 ${c.context_url(request.GET, h.FID(cs2,path))}
1865
37b3c3244bbc UI fixes
Marcin Kuzminski <marcin@python-works.com>
parents: 1861
diff changeset
27 </div>
1787
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
28 <span style="float:right;margin-top:-3px">
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
29 <label>
3654
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3517
diff changeset
30 ${_('Show inline comments')}
2995
32471bd1f4ee Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
31 ${h.checkbox('',checked="checked",class_="show-inline-comments",id_for=h.FID(cs2,path))}
1787
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
32 </label>
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
33 </span>
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
34 </div>
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
35 </div>
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
36 <div class="code-body">
2995
32471bd1f4ee Implemented generation of changesets based
Marcin Kuzminski <marcin@python-works.com>
parents: 2478
diff changeset
37 <div class="full_f_path" path="${h.safe_unicode(path)}"></div>
1789
17caf4efe15c implements #308 rewrote diffs to enable displaying full diff on each file
Marcin Kuzminski <marcin@python-works.com>
parents: 1787
diff changeset
38 ${diff|n}
1787
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
39 </div>
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
40 </div>
d4a7b6c82efe code garden for changeset ranges and comments
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
41 %endfor
3419
efc00d363d1e collapsable diff container in changeset, makes quick review easier
Marcin Kuzminski <marcin@python-works.com>
parents: 3400
diff changeset
42 </div>
1888
f91d3f9b7230 White-space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 1865
diff changeset
43 </%def>
2348
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
44
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
45 <%def name="diff_block_simple(change)">
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
46
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
47 %for op,filenode_path,diff in change:
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
48 <div id="${h.FID('',filenode_path)}_target" style="clear:both;margin-top:25px"></div>
2478
8eab81115660 white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
49 <div id="${h.FID('',filenode_path)}" class="diffblock margined comm">
2348
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
50 <div class="code-header">
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
51 <div class="changeset_header">
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
52 <div class="changeset_file">
3357
674a8fad3abc show links to files on compare data at other and org refs
Marcin Kuzminski <marcin@python-works.com>
parents: 2996
diff changeset
53 ${h.safe_unicode(filenode_path)} |
3654
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3517
diff changeset
54 <a class="spantag" href="${h.url('files_home', repo_name=c.other_repo.repo_name, f_path=filenode_path, revision=c.org_ref)}" title="${_('Show file at latest version in this repo')}">${c.org_ref_type}@${h.short_id(c.org_ref) if c.org_ref_type=='rev' else c.org_ref}</a> -&gt;
ec6354949623 Fix a lot of casings - use standard casing in most places
Mads Kiilerich <madski@unity3d.com>
parents: 3517
diff changeset
55 <a class="spantag" href="${h.url('files_home', repo_name=c.repo_name, f_path=filenode_path, revision=c.other_ref)}" title="${_('Show file at initial version in this repo')}">${c.other_ref_type}@${h.short_id(c.other_ref) if c.other_ref_type=='rev' else c.other_ref}</a>
2348
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
56 </div>
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
57 </div>
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
58 </div>
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
59 <div class="code-body">
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
60 <div class="full_f_path" path="${h.safe_unicode(filenode_path)}"></div>
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
61 ${diff|n}
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
62 </div>
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
63 </div>
a07e04ef7bb4 Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents: 2164
diff changeset
64 %endfor
2478
8eab81115660 white space cleanup
Marcin Kuzminski <marcin@python-works.com>
parents: 2430
diff changeset
65 </%def>