Mercurial > kallithea
annotate rhodecode/templates/compare/compare_diff.html @ 2977:cff9d4e1d821 beta
Fixed issue when node didn't exists at 'tip' and we tried calculate history based on that assumption.
Now fallback to the changeset the node exists in for history calculation
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 04 Nov 2012 13:08:27 +0100 |
parents | 79818f546538 |
children | 25d77aef2729 |
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()"> |
2348
a07e04ef7bb4
Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents:
2337
diff
changeset
|
5 ${c.repo_name} ${_('Compare')} ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} |
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 » |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
11 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))} |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
12 » |
2348
a07e04ef7bb4
Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents:
2337
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"> |
2362
3c4afb8894bd
Improved cross repos diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
2350
diff
changeset
|
29 <h3 class="code-header-title">${_('Compare View')}</h3> |
2337
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
30 <div> |
2362
3c4afb8894bd
Improved cross repos diffs
Marcin Kuzminski <marcin@python-works.com>
parents:
2350
diff
changeset
|
31 ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%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 |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2395
diff
changeset
|
37 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Outgoing changesets')}</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 |
2337
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
41 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
42 <div class="cs_files"> |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2395
diff
changeset
|
43 %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
|
44 <div class="cs_${change}"> |
a07e04ef7bb4
Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents:
2337
diff
changeset
|
45 <div class="node">${h.link_to(h.safe_unicode(f),h.url.current(anchor=fid))}</div> |
a07e04ef7bb4
Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents:
2337
diff
changeset
|
46 <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
|
47 </div> |
2337
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
48 %endfor |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
49 </div> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
50 </div> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
51 </div> |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2395
diff
changeset
|
52 |
2348
a07e04ef7bb4
Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents:
2337
diff
changeset
|
53 ## diff block |
a07e04ef7bb4
Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents:
2337
diff
changeset
|
54 <%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
|
55 %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
|
56 ${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
|
57 %endfor |
2434
f29469677319
Added basic models for saving open pull requests
Marcin Kuzminski <marcin@python-works.com>
parents:
2395
diff
changeset
|
58 |
2337
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
59 <script type="text/javascript"> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
60 |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
61 YUE.onDOMReady(function(){ |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
62 |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
63 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
|
64 var act = e.currentTarget.nextElementSibling; |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
65 |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
66 if(YUD.hasClass(act,'active')){ |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
67 YUD.removeClass(act,'active'); |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
68 YUD.setStyle(act,'display','none'); |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
69 }else{ |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
70 YUD.addClass(act,'active'); |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
71 YUD.setStyle(act,'display',''); |
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 }); |
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 </script> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
76 </div> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
77 </%def> |