annotate rhodecode/templates/changeset/changeset_file_comment.html @ 1670:d2de0c2f02cd beta

#77 code review - initial very simple version of changeset comments - RST parsed
author Marcin Kuzminski <marcin@python-works.com>
date Fri, 11 Nov 2011 20:41:53 +0200
parents
children 6f0143e5efe5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1670
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
1 ##usage:
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
2 ## <%namespace name="comment" file="/changeset/changeset_file_comment.html"/>
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
3 ## ${comment.comment_block(co)}
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
4 ##
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
5 <%def name="comment_block(co)">
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
6 <div class="comment" id="comment-${co.comment_id}">
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
7 <div class="meta">
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
8 <span class="user">
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
9 <img src="${h.gravatar_url(co.author.email, 20)}" />
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
10 ${co.author.username}
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
11 </span>
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
12 <a href="${h.url.current(anchor='comment-%s' % co.comment_id)}"> ${_('commented on')} </a>
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
13 ${h.short_id(co.commit_id)}
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
14 %if co.f_path:
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
15 ${_(' in file ')}
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
16 ${co.f_path}:L${co.line_no}
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
17 %endif
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
18 <span class="date">
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
19 ${h.age(co.modified_at)}
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
20 </span>
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
21 </div>
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
22 <div class="text">
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
23 %if h.HasPermissionAny('hg.admin', 'repository.admin')() or co.author.user_id == c.rhodecode_user.user_id:
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
24 <div class="buttons">
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
25 <a href="javascript:void(0);" onClick="deleteComment(${co.comment_id})" class="">${_('Delete')}</a>
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
26 </div>
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
27 %endif
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
28 ${h.rst(co.text)|n}
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
29 </div>
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
30 </div>
d2de0c2f02cd #77 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
diff changeset
31 </%def>