Mercurial > kallithea
annotate rhodecode/templates/compare/compare_diff.html @ 2350:d787da66c292 codereview
Changed compare-view of remote repos to use incoming option instead of outgoing.
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Mon, 28 May 2012 02:00:14 +0200 |
parents | a07e04ef7bb4 |
children | 3c4afb8894bd |
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()"> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
9 ${h.link_to(u'Home',h.url('/'))} |
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"> |
2350
d787da66c292
Changed compare-view of remote repos to use incoming option instead of outgoing.
Marcin Kuzminski <marcin@python-works.com>
parents:
2348
diff
changeset
|
29 <h3 class="code-header-title">${_('Compare View')} <a href="${c.swap_url}">swap</a></h3> |
2337
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 ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)} |
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"> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
36 <div class="container"> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
37 <table class="compare_view_commits noborder"> |
2348
a07e04ef7bb4
Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents:
2337
diff
changeset
|
38 %for cnt, cs in enumerate(c.cs_ranges): |
2337
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
39 <tr> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
40 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),14)}"/></div></td> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
41 <td>${h.link_to('r%s:%s' % (cs.revision,h.short_id(cs.raw_id)),h.url('changeset_home',repo_name=c.repo_name,revision=cs.raw_id))}</td> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
42 <td><div class="author">${h.person(cs.author)}</div></td> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
43 <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
44 <td> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
45 %if hasattr(c,'statuses') and c.statuses: |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
46 <div title="${_('Changeset status')}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
47 %endif |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
48 </td> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
49 <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
50 </tr> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
51 %endfor |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
52 </table> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
53 </div> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
54 <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
|
55 <div class="cs_files"> |
2348
a07e04ef7bb4
Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents:
2337
diff
changeset
|
56 %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
|
57 <div class="cs_${change}"> |
a07e04ef7bb4
Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents:
2337
diff
changeset
|
58 <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
|
59 <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
|
60 </div> |
2337
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
61 %endfor |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
62 </div> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
63 </div> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
64 </div> |
2348
a07e04ef7bb4
Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents:
2337
diff
changeset
|
65 |
a07e04ef7bb4
Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents:
2337
diff
changeset
|
66 ## diff block |
a07e04ef7bb4
Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents:
2337
diff
changeset
|
67 <%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
|
68 %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
|
69 ${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
|
70 %endfor |
a07e04ef7bb4
Implemented basic compare view(for pull requests) for mercurial.
Marcin Kuzminski <marcin@python-works.com>
parents:
2337
diff
changeset
|
71 |
2337
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
72 <script type="text/javascript"> |
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 YUE.onDOMReady(function(){ |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
75 |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
76 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
|
77 var act = e.currentTarget.nextElementSibling; |
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 if(YUD.hasClass(act,'active')){ |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
80 YUD.removeClass(act,'active'); |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
81 YUD.setStyle(act,'display','none'); |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
82 }else{ |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
83 YUD.addClass(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',''); |
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 }) |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
88 </script> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
89 </div> |
f8c953c6b040
Created base for diffing two repositories inside rhodecode
Marcin Kuzminski <marcin@python-works.com>
parents:
diff
changeset
|
90 </%def> |