comparison rhodecode/templates/compare/compare_diff.html @ 2337:f8c953c6b040 codereview

Created base for diffing two repositories inside rhodecode
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 25 May 2012 18:29:31 +0200
parents
children a07e04ef7bb4
comparison
equal deleted inserted replaced
2336:aa2f0e4382e9 2337:f8c953c6b040
1 ## -*- coding: utf-8 -*-
2 <%inherit file="/base/base.html"/>
3
4 <%def name="title()">
5 TODO FIll this in
6 </%def>
7
8 <%def name="breadcrumbs_links()">
9 ${h.link_to(u'Home',h.url('/'))}
10 &raquo;
11 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
12 &raquo;
13 TODO!
14 </%def>
15
16 <%def name="page_nav()">
17 ${self.menu('changelog')}
18 </%def>
19
20 <%def name="main()">
21 <div class="box">
22 <!-- box / title -->
23 <div class="title">
24 ${self.breadcrumbs()}
25 </div>
26 <div class="table">
27 <div id="body" class="diffblock">
28 <div class="code-header cv">
29 <h3 class="code-header-title">${_('Compare View')}</h3>
30 <div>
31 ${'%s@%s' % (c.org_repo.repo_name, c.org_ref)} -> ${'%s@%s' % (c.other_repo.repo_name, c.other_ref)}
32 </div>
33 </div>
34 </div>
35 <div id="changeset_compare_view_content">
36 <div class="container">
37 <table class="compare_view_commits noborder">
38 %for cnt,cs in enumerate(c.cs_ranges):
39 <tr>
40 <td><div class="gravatar"><img alt="gravatar" src="${h.gravatar_url(h.email(cs.author),14)}"/></div></td>
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>
42 <td><div class="author">${h.person(cs.author)}</div></td>
43 <td><span class="tooltip" title="${h.age(cs.date)}">${cs.date}</span></td>
44 <td>
45 %if hasattr(c,'statuses') and c.statuses:
46 <div title="${_('Changeset status')}" class="changeset-status-ico"><img src="${h.url('/images/icons/flag_status_%s.png' % c.statuses[cnt])}" /></div>
47 %endif
48 </td>
49 <td><div class="message">${h.urlify_commit(h.wrap_paragraphs(cs.message),c.repo_name)}</div></td>
50 </tr>
51 %endfor
52 </table>
53 </div>
54 <div style="font-size:1.1em;font-weight: bold;clear:both;padding-top:10px">${_('Files affected')}</div>
55 <div class="cs_files">
56 %for change,filenode,diff,cs1,cs2,st in c.changes[cs.raw_id]:
57 <div class="cs_${change}">${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=h.FID(cs.raw_id,filenode.path)))}</div>
58 %endfor
59 </div>
60 </div>
61
62 </div>
63
64 <script type="text/javascript">
65
66 YUE.onDOMReady(function(){
67
68 YUE.on(YUQ('.diff-menu-activate'),'click',function(e){
69 var act = e.currentTarget.nextElementSibling;
70
71 if(YUD.hasClass(act,'active')){
72 YUD.removeClass(act,'active');
73 YUD.setStyle(act,'display','none');
74 }else{
75 YUD.addClass(act,'active');
76 YUD.setStyle(act,'display','');
77 }
78 });
79 })
80 </script>
81 </div>
82 </%def>