annotate rhodecode/templates/changeset/changeset.html @ 1682:1f2ba96de73e beta

#71 code review - inline comments are now positioned inlines
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 14 Nov 2011 22:10:02 +0200
parents 1bf03daafaf0
children 6ff8bcb783e9
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1130
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
1 ## -*- coding: utf-8 -*-
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
2
193
50a39f923f31 Added file annotation template. Bumped version to 0.6.8. Changelog and changeset are now cleaned with js, it's still very beta.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3 <%inherit file="/base/base.html"/>
50a39f923f31 Added file annotation template. Bumped version to 0.6.8. Changelog and changeset are now cleaned with js, it's still very beta.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4
50a39f923f31 Added file annotation template. Bumped version to 0.6.8. Changelog and changeset are now cleaned with js, it's still very beta.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5 <%def name="title()">
636
ffd07396d315 Fixes for raw_id, needed for git
Marcin Kuzminski <marcin@python-works.com>
parents: 619
diff changeset
6 ${c.repo_name} ${_('Changeset')} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)} - ${c.rhodecode_name}
193
50a39f923f31 Added file annotation template. Bumped version to 0.6.8. Changelog and changeset are now cleaned with js, it's still very beta.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
8
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
9 <%def name="breadcrumbs_links()">
193
50a39f923f31 Added file annotation template. Bumped version to 0.6.8. Changelog and changeset are now cleaned with js, it's still very beta.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
10 ${h.link_to(u'Home',h.url('/'))}
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
11 &raquo;
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
12 ${h.link_to(c.repo_name,h.url('summary_home',repo_name=c.repo_name))}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
13 &raquo;
636
ffd07396d315 Fixes for raw_id, needed for git
Marcin Kuzminski <marcin@python-works.com>
parents: 619
diff changeset
14 ${_('Changeset')} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
193
50a39f923f31 Added file annotation template. Bumped version to 0.6.8. Changelog and changeset are now cleaned with js, it's still very beta.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
16
193
50a39f923f31 Added file annotation template. Bumped version to 0.6.8. Changelog and changeset are now cleaned with js, it's still very beta.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17 <%def name="page_nav()">
50a39f923f31 Added file annotation template. Bumped version to 0.6.8. Changelog and changeset are now cleaned with js, it's still very beta.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 ${self.menu('changelog')}
50a39f923f31 Added file annotation template. Bumped version to 0.6.8. Changelog and changeset are now cleaned with js, it's still very beta.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19 </%def>
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
20
1682
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
21 <%def name="fid(raw_id,path)" filter="strip">
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
22 <%
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
23 return 'C-%s-%s' % (h.short_id(raw_id),h.safeid(h.safe_unicode(path)))
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
24 %>
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
25 </%def>
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
26
193
50a39f923f31 Added file annotation template. Bumped version to 0.6.8. Changelog and changeset are now cleaned with js, it's still very beta.
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27 <%def name="main()">
362
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
28 <div class="box">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
29 <!-- box / title -->
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
30 <div class="title">
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
31 ${self.breadcrumbs()}
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
32 </div>
558eb7c5028f version bump to 0.8
Marcin Kuzminski <marcin@python-works.com>
parents: 332
diff changeset
33 <div class="table">
977
28524453bb76 started work on #93 added rev ranges view, checkboxes in changelog to view ranges of changes
Marcin Kuzminski <marcin@python-works.com>
parents: 816
diff changeset
34 <div class="diffblock">
468
9dd372c7166c added menu for changeset raw diff and download diff
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
35 <div class="code-header">
9dd372c7166c added menu for changeset raw diff and download diff
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
36 <div>
636
ffd07396d315 Fixes for raw_id, needed for git
Marcin Kuzminski <marcin@python-works.com>
parents: 619
diff changeset
37 ${_('Changeset')} - r${c.changeset.revision}:${h.short_id(c.changeset.raw_id)}
468
9dd372c7166c added menu for changeset raw diff and download diff
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
38 &raquo; <span>${h.link_to(_('raw diff'),
636
ffd07396d315 Fixes for raw_id, needed for git
Marcin Kuzminski <marcin@python-works.com>
parents: 619
diff changeset
39 h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='show'))}</span>
468
9dd372c7166c added menu for changeset raw diff and download diff
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
40 &raquo; <span>${h.link_to(_('download diff'),
636
ffd07396d315 Fixes for raw_id, needed for git
Marcin Kuzminski <marcin@python-works.com>
parents: 619
diff changeset
41 h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download'))}</span>
468
9dd372c7166c added menu for changeset raw diff and download diff
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
42 </div>
9dd372c7166c added menu for changeset raw diff and download diff
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
43 </div>
9dd372c7166c added menu for changeset raw diff and download diff
Marcin Kuzminski <marcin@python-works.com>
parents: 387
diff changeset
44 </div>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
45 <div id="changeset_content">
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
46 <div class="container">
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
47 <div class="left">
636
ffd07396d315 Fixes for raw_id, needed for git
Marcin Kuzminski <marcin@python-works.com>
parents: 619
diff changeset
48 <div class="date">${_('commit')} ${c.changeset.revision}: ${h.short_id(c.changeset.raw_id)}@${c.changeset.date}</div>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
49 <div class="author">
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
50 <div class="gravatar">
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
51 <img alt="gravatar" src="${h.gravatar_url(h.email(c.changeset.author),20)}"/>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
52 </div>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
53 <span>${h.person(c.changeset.author)}</span><br/>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
54 <span><a href="mailto:${h.email_or_none(c.changeset.author)}">${h.email_or_none(c.changeset.author)}</a></span><br/>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
55 </div>
636
ffd07396d315 Fixes for raw_id, needed for git
Marcin Kuzminski <marcin@python-works.com>
parents: 619
diff changeset
56 <div class="message">${h.link_to(h.wrap_paragraphs(c.changeset.message),h.url('changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</div>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
57 </div>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
58 <div class="right">
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
59 <div class="changes">
1130
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
60 % if len(c.changeset.affected_files) <= c.affected_files_cut_off:
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
61 <span class="removed" title="${_('removed')}">${len(c.changeset.removed)}</span>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
62 <span class="changed" title="${_('changed')}">${len(c.changeset.changed)}</span>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
63 <span class="added" title="${_('added')}">${len(c.changeset.added)}</span>
1130
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
64 % else:
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
65 <span class="removed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
66 <span class="changed" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
67 <span class="added" title="${_('affected %s files') % len(c.changeset.affected_files)}">!</span>
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
68 % endif
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
69 </div>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
70 %if len(c.changeset.parents)>1:
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
71 <div class="merge">
1676
e86191684f4b fixed some anchor id problems for changeset ranges
Marcin Kuzminski <marcin@python-works.com>
parents: 1674
diff changeset
72 ${_('merge')}<img alt="merge" src="${h.url('/images/icons/arrow_join.png')}"/>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
73 </div>
551
f57aaf673743 fixed initial commit missing parents div,
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
74 %endif
f57aaf673743 fixed initial commit missing parents div,
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
75
f57aaf673743 fixed initial commit missing parents div,
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
76 %if c.changeset.parents:
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
77 %for p_cs in reversed(c.changeset.parents):
636
ffd07396d315 Fixes for raw_id, needed for git
Marcin Kuzminski <marcin@python-works.com>
parents: 619
diff changeset
78 <div class="parent">${_('Parent')} ${p_cs.revision}: ${h.link_to(h.short_id(p_cs.raw_id),
ffd07396d315 Fixes for raw_id, needed for git
Marcin Kuzminski <marcin@python-works.com>
parents: 619
diff changeset
79 h.url('changeset_home',repo_name=c.repo_name,revision=p_cs.raw_id),title=p_cs.message)}
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
80 </div>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
81 %endfor
551
f57aaf673743 fixed initial commit missing parents div,
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
82 %else:
f57aaf673743 fixed initial commit missing parents div,
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
83 <div class="parent">${_('No parents')}</div>
f57aaf673743 fixed initial commit missing parents div,
Marcin Kuzminski <marcin@python-works.com>
parents: 547
diff changeset
84 %endif
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
85 <span class="logtags">
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
86 <span class="branchtag" title="${'%s %s' % (_('branch'),c.changeset.branch)}">
636
ffd07396d315 Fixes for raw_id, needed for git
Marcin Kuzminski <marcin@python-works.com>
parents: 619
diff changeset
87 ${h.link_to(c.changeset.branch,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
88 %for tag in c.changeset.tags:
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
89 <span class="tagtag" title="${'%s %s' % (_('tag'),tag)}">
636
ffd07396d315 Fixes for raw_id, needed for git
Marcin Kuzminski <marcin@python-works.com>
parents: 619
diff changeset
90 ${h.link_to(tag,h.url('files_home',repo_name=c.repo_name,revision=c.changeset.raw_id))}</span>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
91 %endfor
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
92 </span>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
93 </div>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
94 </div>
1257
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
95 <span style="font-size:1.1em;font-weight: bold">
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
96 ${_('%s files affected with %s additions and %s deletions.') % (len(c.changeset.affected_files),c.lines_added,c.lines_deleted)}
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
97 </span>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
98 <div class="cs_files">
1257
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
99 %for change,filenode,diff,cs1,cs2,stat in c.changes:
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
100 <div class="cs_${change}">
1682
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
101 <div class="node">${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=self.fid(filenode.changeset.raw_id,filenode.path)))}</div>
1257
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
102 <div class="changes">${h.fancy_file_stats(stat)}</div>
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
103 </div>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
104 %endfor
1130
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
105 % if c.cut_off:
1472
aaec08ad9daf Added pt_BR localization, added i18n wrappers on some places missing, fixed css in settings screen for longer labels.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents: 1257
diff changeset
106 ${_('Changeset was too big and was cut off...')}
1130
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
107 % endif
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
108 </div>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
109 </div>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
110
218
58b46f9194c3 version bump. Made changesets work as should, but vcs had to be fixed for that.
Marcin Kuzminski <marcin@python-works.com>
parents: 193
diff changeset
111 </div>
332
40b409af53a5 litle html updates for changeset
Marcin Kuzminski <marcin@python-works.com>
parents: 285
diff changeset
112
1257
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
113 %for change,filenode,diff,cs1,cs2,stat in c.changes:
218
58b46f9194c3 version bump. Made changesets work as should, but vcs had to be fixed for that.
Marcin Kuzminski <marcin@python-works.com>
parents: 193
diff changeset
114 %if change !='removed':
58b46f9194c3 version bump. Made changesets work as should, but vcs had to be fixed for that.
Marcin Kuzminski <marcin@python-works.com>
parents: 193
diff changeset
115 <div style="clear:both;height:10px"></div>
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
116 <div class="diffblock margined">
1682
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
117 <div id="${self.fid(filenode.changeset.raw_id,filenode.path)}" class="code-header">
816
555b68f94c45 some small css fixes for changesets
Marcin Kuzminski <marcin@python-works.com>
parents: 636
diff changeset
118 <div class="changeset_header">
555b68f94c45 some small css fixes for changesets
Marcin Kuzminski <marcin@python-works.com>
parents: 636
diff changeset
119 <span class="changeset_file">
1176
014c9a58a0d9 fixes for issues #137 and #116 safe_unicode is now default for handling file names
Marcin Kuzminski <marcin@python-works.com>
parents: 1130
diff changeset
120 ${h.link_to_if(change!='removed',h.safe_unicode(filenode.path),h.url('files_home',repo_name=c.repo_name,
014c9a58a0d9 fixes for issues #137 and #116 safe_unicode is now default for handling file names
Marcin Kuzminski <marcin@python-works.com>
parents: 1130
diff changeset
121 revision=filenode.changeset.raw_id,f_path=h.safe_unicode(filenode.path)))}
225
710e7a75bb6b templating update, improved look & feel, version bump
Marcin Kuzminski <marcin@python-works.com>
parents: 218
diff changeset
122 </span>
387
2a18192fbd1e templating updates (font sizes)
Marcin Kuzminski <marcin@python-works.com>
parents: 362
diff changeset
123 &raquo; <span>${h.link_to(_('diff'),
1176
014c9a58a0d9 fixes for issues #137 and #116 safe_unicode is now default for handling file names
Marcin Kuzminski <marcin@python-works.com>
parents: 1130
diff changeset
124 h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='diff'))}</span>
387
2a18192fbd1e templating updates (font sizes)
Marcin Kuzminski <marcin@python-works.com>
parents: 362
diff changeset
125 &raquo; <span>${h.link_to(_('raw diff'),
1176
014c9a58a0d9 fixes for issues #137 and #116 safe_unicode is now default for handling file names
Marcin Kuzminski <marcin@python-works.com>
parents: 1130
diff changeset
126 h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='raw'))}</span>
387
2a18192fbd1e templating updates (font sizes)
Marcin Kuzminski <marcin@python-works.com>
parents: 362
diff changeset
127 &raquo; <span>${h.link_to(_('download diff'),
1176
014c9a58a0d9 fixes for issues #137 and #116 safe_unicode is now default for handling file names
Marcin Kuzminski <marcin@python-works.com>
parents: 1130
diff changeset
128 h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='download'))}</span>
218
58b46f9194c3 version bump. Made changesets work as should, but vcs had to be fixed for that.
Marcin Kuzminski <marcin@python-works.com>
parents: 193
diff changeset
129 </div>
58b46f9194c3 version bump. Made changesets work as should, but vcs had to be fixed for that.
Marcin Kuzminski <marcin@python-works.com>
parents: 193
diff changeset
130 </div>
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
131 <div class="code-body">
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
132 <div class="full_f_path" path="${filenode.path}"></div>
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
133 %if diff:
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
134 ${diff|n}
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
135 %else:
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
136 ${_('No changes in this file')}
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
137 %endif
218
58b46f9194c3 version bump. Made changesets work as should, but vcs had to be fixed for that.
Marcin Kuzminski <marcin@python-works.com>
parents: 193
diff changeset
138 </div>
58b46f9194c3 version bump. Made changesets work as should, but vcs had to be fixed for that.
Marcin Kuzminski <marcin@python-works.com>
parents: 193
diff changeset
139 </div>
58b46f9194c3 version bump. Made changesets work as should, but vcs had to be fixed for that.
Marcin Kuzminski <marcin@python-works.com>
parents: 193
diff changeset
140 %endif
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
141 %endfor
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
142
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
143 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
144 ## template for inline comment form
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
145 ${comment.comment_inline_form()}
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
146
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
147 <div class="comments">
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
148 <div class="comments-number">${len(c.comments)} comment(s) (${c.inline_cnt} ${_('inline')})</div>
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
149
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
150 %for path, lines in c.inline_comments:
1682
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
151 <div style="display:none" class="inline-comment-placeholder" path="${path}" target_id="${self.fid(c.changeset.raw_id,path)}">
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
152 % for line,comments in lines.iteritems():
1682
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
153 <div class="inline-comment-placeholder-line" line="${line}" target_id="${h.safeid(h.safe_unicode(path))}">
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
154 %for co in comments:
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
155 ${comment.comment_block(co)}
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
156 %endfor
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
157 </div>
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
158 %endfor
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
159 </div>
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
160 %endfor
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
161
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
162 %for co in c.comments:
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
163 ${comment.comment_block(co)}
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
164 %endfor
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
165 %if c.rhodecode_user.username != 'default':
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
166 <div class="comment-form">
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
167 ${h.form(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id))}
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
168 <strong>${_('Leave a comment')}</strong>
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
169 <div class="clearfix">
1681
1bf03daafaf0 fixes inline comments double entries
Marcin Kuzminski <marcin@python-works.com>
parents: 1677
diff changeset
170 <div class="comment-help">
1bf03daafaf0 fixes inline comments double entries
Marcin Kuzminski <marcin@python-works.com>
parents: 1677
diff changeset
171 ${_('Comments parsed using')} <a href="${h.url('rst_help')}">RST</a> ${_('syntax')}
1bf03daafaf0 fixes inline comments double entries
Marcin Kuzminski <marcin@python-works.com>
parents: 1677
diff changeset
172 </div>
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
173 ${h.textarea('text')}
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
174 </div>
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
175 <div class="comment-button">
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
176 ${h.submit('save', _('Comment'), class_='ui-button')}
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
177 </div>
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
178 ${h.end_form()}
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
179 </div>
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
180 %endif
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
181 </div>
1674
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
182 <script type="text/javascript">
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
183 var deleteComment = function(comment_id){
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
184
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
185 var url = "${url('changeset_comment_delete',repo_name=c.repo_name,comment_id='__COMMENT_ID__')}".replace('__COMMENT_ID__',comment_id);
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
186 var postData = '_method=delete';
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
187 var success = function(o){
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
188 var n = YUD.get('comment-'+comment_id);
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
189 n.parentNode.removeChild(n);
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
190 }
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
191 ajaxPOST(url,postData,success);
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
192 }
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
193
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
194 YUE.onDOMReady(function(){
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
195 YUE.on(YUQ('.line'),'mouseenter',function(e){
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
196 var tr = e.currentTarget;
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
197 if(YUD.hasClass(tr,'form-open') || YUD.hasClass(tr,'context')){
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
198 return
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
199 }
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
200 YUD.addClass(tr,'highlight');
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
201 });
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
202 YUE.on(YUQ('.line'),'mouseleave',function(e){
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
203 YUD.removeClass(e.currentTarget,'highlight');
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
204 });
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
205
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
206 YUE.on(YUQ('.line'),'click',function(e){
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
207 var tr = e.currentTarget;
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
208 if(YUD.hasClass(tr,'form-open') || YUD.hasClass(tr,'context')){
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
209 return
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
210 }
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
211 YUD.addClass(tr,'form-open');
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
212 var node = tr.parentNode.parentNode.parentNode.getElementsByClassName('full_f_path')[0];
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
213 var f_path = YUD.getAttribute(node,'path');
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
214 var lineno = getLineNo(tr);
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
215 var form = createInlineForm(tr, f_path, lineno);
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
216 YUD.insertAfter(form,tr);
1682
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
217 });
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
218
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
219 // inject comments into they proper positions
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
220 var file_comments = YUQ('.inline-comment-placeholder');
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
221
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
222 for (f in file_comments){
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
223 var box = file_comments[f];
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
224 var inlines = box.children;
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
225
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
226 for(var i=0; i<inlines.length; i++){
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
227 var inline = inlines[i];
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
228 var lineno = YUD.getAttribute(inlines[i],'line');
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
229 var lineid = "a{0}_{1}".format(YUD.getAttribute(inline,'target_id'),lineno);
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
230 var target_line = YUD.get(lineid);
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
231 var comments = new YAHOO.util.Element(tableTr('inline-comments',inline.innerHTML))
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
232 YUD.insertAfter(comments,target_line.parentNode);
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
233 }
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
234 }
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
235 })
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
236
1674
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
237 </script>
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
238 </div>
1472
aaec08ad9daf Added pt_BR localization, added i18n wrappers on some places missing, fixed css in settings screen for longer labels.
Augusto Herrmann <augusto.herrmann@planejamento.gov.br>
parents: 1257
diff changeset
239 </%def>