comparison rhodecode/templates/changeset/diff_block.html @ 1787:d4a7b6c82efe beta

code garden for changeset ranges and comments - disabled (for now) comments on changeset ranges - code reuse by mako namespaces - added flag for enabling comments in diffs
author Marcin Kuzminski <marcin@python-works.com>
date Sun, 18 Dec 2011 04:24:53 +0200
parents
children 17caf4efe15c
comparison
equal deleted inserted replaced
1786:02a26ed03537 1787:d4a7b6c82efe
1 ## -*- coding: utf-8 -*-
2 ##usage:
3 ## <%namespace name="diff_block" file="/changeset/diff_block.html"/>
4 ## ${diff_block.diff_block(changes)}
5 ##
6 <%def name="diff_block(changes)">
7
8 %for change,filenode,diff,cs1,cs2,stat in changes:
9 %if change !='removed':
10 <div id="${h.FID(filenode.changeset.raw_id,filenode.path)}" style="clear:both;height:90px;margin-top:-60px"></div>
11 <div class="diffblock margined comm">
12 <div class="code-header">
13 <div class="changeset_header">
14 <div class="changeset_file">
15 ${h.link_to_if(change!='removed',h.safe_unicode(filenode.path),h.url('files_home',repo_name=c.repo_name,
16 revision=filenode.changeset.raw_id,f_path=h.safe_unicode(filenode.path)))}
17 </div>
18 <div class="diff-menu-wrapper">
19 <img class="diff-menu-activate" style="margin-bottom:-6px;cursor: pointer" alt="diff-menu" src="${h.url('/images/icons/script_gear.png')}" />
20 <div class="diff-menu" style="display:none">
21 <ul>
22 <li>${h.link_to(_('diff'),h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='diff'))}</li>
23 <li>${h.link_to(_('raw diff'),h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='raw'))}</li>
24 <li>${h.link_to(_('download diff'),h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='download'))}</li>
25 <li>${c.ignorews_url(h.FID(filenode.changeset.raw_id,filenode.path))}</li>
26 <li>${c.context_url(h.FID(filenode.changeset.raw_id,filenode.path))}</li>
27 </ul>
28 </div>
29 </div>
30 <span style="float:right;margin-top:-3px">
31 <label>
32 ${_('show inline comments')}
33 ${h.checkbox('',checked="checked",class_="show-inline-comments",id_for=h.FID(filenode.changeset.raw_id,filenode.path))}
34 </label>
35 </span>
36 </div>
37 </div>
38 <div class="code-body">
39 <div class="full_f_path" path="${h.safe_unicode(filenode.path)}"></div>
40 %if diff:
41 ${diff|n}
42 %else:
43 ${_('No changes in this file')}
44 %endif
45 </div>
46 </div>
47 %endif
48 %endfor
49
50 </%def>