annotate rhodecode/templates/changeset/changeset.html @ 1705:5e4827a8e942 beta

added reply comment button on top of inline comments fixed some issues with interactive file filter on files
author Marcin Kuzminski <marcin@python-works.com>
date Mon, 21 Nov 2011 00:29:14 +0200
parents 3efc47f59639
children c83d3d42ab92
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>
1703
f23828b00b21 notification fixes and improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1701
diff changeset
37 <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
38 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
39 &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
40 h.url('raw_changeset_home',repo_name=c.repo_name,revision=c.changeset.raw_id,diff='download'))}</span>
1703
f23828b00b21 notification fixes and improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1701
diff changeset
41 <div class="comments-number" style="float:right;padding-right:5px">${len(c.comments)} comment(s) (${c.inline_cnt} ${_('inline')})</div>
f23828b00b21 notification fixes and improvements
Marcin Kuzminski <marcin@python-works.com>
parents: 1701
diff changeset
42 </div>
468
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}">
1687
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
101 <div class="node">
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
102 %if change != 'removed':
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
103 ${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=self.fid(filenode.changeset.raw_id,filenode.path)))}
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
104 %else:
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
105 ${h.link_to(h.safe_unicode(filenode.path),h.url.current(anchor=self.fid('',filenode.path)))}
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
106 %endif
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
107 </div>
1257
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
108 <div class="changes">${h.fancy_file_stats(stat)}</div>
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
109 </div>
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
110 %endfor
1130
1cecc7db3106 fixed some limits in changesets and changelogs
Marcin Kuzminski <marcin@python-works.com>
parents: 1100
diff changeset
111 % 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
112 ${_('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
113 % endif
529
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
114 </div>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
115 </div>
3a567e329fb6 updated whoosh deps,
Marcin Kuzminski <marcin@python-works.com>
parents: 528
diff changeset
116
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
117 </div>
332
40b409af53a5 litle html updates for changeset
Marcin Kuzminski <marcin@python-works.com>
parents: 285
diff changeset
118
1257
0a2a10a1912f Implemented --stat for changelog
Marcin Kuzminski <marcin@python-works.com>
parents: 1176
diff changeset
119 %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
120 %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
121 <div style="clear:both;height:10px"></div>
1701
b702d0d4b030 fixed inline comment indicator.
Marcin Kuzminski <marcin@python-works.com>
parents: 1691
diff changeset
122 <div class="diffblock margined comm" id="${self.fid(filenode.changeset.raw_id,filenode.path)}">
1686
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
123 <div class="code-header">
816
555b68f94c45 some small css fixes for changesets
Marcin Kuzminski <marcin@python-works.com>
parents: 636
diff changeset
124 <div class="changeset_header">
555b68f94c45 some small css fixes for changesets
Marcin Kuzminski <marcin@python-works.com>
parents: 636
diff changeset
125 <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
126 ${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
127 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
128 </span>
387
2a18192fbd1e templating updates (font sizes)
Marcin Kuzminski <marcin@python-works.com>
parents: 362
diff changeset
129 &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
130 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
131 &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
132 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
133 &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
134 h.url('files_diff_home',repo_name=c.repo_name,f_path=h.safe_unicode(filenode.path),diff2=cs2,diff1=cs1,diff='download'))}</span>
1686
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
135 <span style="float:right">
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
136 <label>
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
137 ${_('show inline comments')}
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
138 ${h.checkbox('',checked="checked",class_="show-inline-comments",id_for=self.fid(filenode.changeset.raw_id,filenode.path))}
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
139 </label>
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
140 </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
141 </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
142 </div>
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
143 <div class="code-body">
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
144 <div class="full_f_path" path="${filenode.path}"></div>
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
145 %if diff:
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
146 ${diff|n}
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
147 %else:
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
148 ${_('No changes in this file')}
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
149 %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
150 </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
151 </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
152 %endif
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
153 %endfor
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
154
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
155 <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
156 ## template for inline comment form
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
157 ${comment.comment_inline_form()}
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
158
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
159 <div class="comments">
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
160 <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
161
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
162 %for path, lines in c.inline_comments:
1682
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
163 <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
164 % for line,comments in lines.iteritems():
1682
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
165 <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
166 %for co in comments:
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
167 ${comment.comment_block(co)}
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
168 %endfor
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
169 </div>
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
170 %endfor
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
171 </div>
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
172 %endfor
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
173
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
174 %for co in c.comments:
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
175 ${comment.comment_block(co)}
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
176 %endfor
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
177 %if c.rhodecode_user.username != 'default':
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
178 <div class="comment-form">
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
179 ${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
180 <strong>${_('Leave a comment')}</strong>
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
181 <div class="clearfix">
1681
1bf03daafaf0 fixes inline comments double entries
Marcin Kuzminski <marcin@python-works.com>
parents: 1677
diff changeset
182 <div class="comment-help">
1bf03daafaf0 fixes inline comments double entries
Marcin Kuzminski <marcin@python-works.com>
parents: 1677
diff changeset
183 ${_('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
184 </div>
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
185 ${h.textarea('text')}
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
186 </div>
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
187 <div class="comment-button">
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
188 ${h.submit('save', _('Comment'), class_='ui-button')}
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
189 </div>
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
190 ${h.end_form()}
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
191 </div>
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
192 %endif
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
193 </div>
1674
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
194 <script type="text/javascript">
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
195 var deleteComment = function(comment_id){
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
196
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
197 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
198 var postData = '_method=delete';
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
199 var success = function(o){
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
200 var n = YUD.get('comment-'+comment_id);
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
201 n.parentNode.removeChild(n);
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
202 }
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
203 ajaxPOST(url,postData,success);
1677
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.onDOMReady(function(){
1686
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
207
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
208 YUE.on(YUQ('.show-inline-comments'),'change',function(e){
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
209 var show = 'none';
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
210 var target = e.currentTarget;
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
211 if(target.checked){
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
212 var show = ''
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
213 }
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
214 var boxid = YUD.getAttribute(target,'id_for');
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
215 var comments = YUQ('#{0} .inline-comments'.format(boxid));
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
216 for(c in comments){
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
217 YUD.setStyle(comments[c],'display',show);
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
218 }
6ff8bcb783e9 show inline comments option
Marcin Kuzminski <marcin@python-works.com>
parents: 1682
diff changeset
219 })
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
220
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
221 YUE.on(YUQ('.line'),'click',function(e){
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
222 var tr = e.currentTarget;
1705
5e4827a8e942 added reply comment button on top of inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1704
diff changeset
223 injectInlineForm(tr);
1682
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
224 });
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 // inject comments into they proper positions
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
227 var file_comments = YUQ('.inline-comment-placeholder');
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
228
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
229 for (f in file_comments){
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
230 var box = file_comments[f];
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
231 var inlines = box.children;
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
232 for(var i=0; i<inlines.length; i++){
1687
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
233 try{
1704
3efc47f59639 inline comment form is displayed now under all comments.
Marcin Kuzminski <marcin@python-works.com>
parents: 1703
diff changeset
234
1687
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
235 var inline = inlines[i];
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
236 var lineno = YUD.getAttribute(inlines[i],'line');
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
237 var lineid = "{0}_{1}".format(YUD.getAttribute(inline,'target_id'),lineno);
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
238 var target_line = YUD.get(lineid);
1705
5e4827a8e942 added reply comment button on top of inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1704
diff changeset
239
5e4827a8e942 added reply comment button on top of inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1704
diff changeset
240 var add = createInlineAddButton(target_line.parentNode,'${_("add another comment")}');
5e4827a8e942 added reply comment button on top of inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1704
diff changeset
241 YUD.insertAfter(add,target_line.parentNode);
5e4827a8e942 added reply comment button on top of inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1704
diff changeset
242
1704
3efc47f59639 inline comment form is displayed now under all comments.
Marcin Kuzminski <marcin@python-works.com>
parents: 1703
diff changeset
243 var comment = new YAHOO.util.Element(tableTr('inline-comments',inline.innerHTML))
3efc47f59639 inline comment form is displayed now under all comments.
Marcin Kuzminski <marcin@python-works.com>
parents: 1703
diff changeset
244 YUD.insertAfter(comment,target_line.parentNode);
1687
e21ec97aca1f fixed issue with new files and removed files with using inline comments
Marcin Kuzminski <marcin@python-works.com>
parents: 1686
diff changeset
245 }catch(e){}
1682
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
246 }
1f2ba96de73e #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1681
diff changeset
247 }
1677
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
248 })
7276b170ce8b #71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents: 1676
diff changeset
249
1674
6f0143e5efe5 #71 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1670
diff changeset
250 </script>
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents: 1472
diff changeset
251 </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
252 </%def>