Mercurial > kallithea
annotate rhodecode/templates/changeset/changeset_file_comment.html @ 1677:7276b170ce8b beta
#71 code-review
- simple inline comments
author | Marcin Kuzminski <marcin@python-works.com> |
---|---|
date | Sun, 13 Nov 2011 02:16:12 +0200 |
parents | 7c487d2678c7 |
children | aa6a1c6f2ac5 |
rev | line source |
---|---|
1670 | 1 ##usage: |
2 ## <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> | |
3 ## ${comment.comment_block(co)} | |
4 ## | |
5 <%def name="comment_block(co)"> | |
6 <div class="comment" id="comment-${co.comment_id}"> | |
7 <div class="meta"> | |
8 <span class="user"> | |
9 <img src="${h.gravatar_url(co.author.email, 20)}" /> | |
10 ${co.author.username} | |
11 </span> | |
12 <a href="${h.url.current(anchor='comment-%s' % co.comment_id)}"> ${_('commented on')} </a> | |
1675
7c487d2678c7
code refactoring
Marcin Kuzminski <marcin@python-works.com>
parents:
1674
diff
changeset
|
13 ${h.short_id(co.revision)} |
1670 | 14 %if co.f_path: |
15 ${_(' in file ')} | |
1677
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
16 ${co.f_path}:L ${co.line_no} |
1670 | 17 %endif |
18 <span class="date"> | |
19 ${h.age(co.modified_at)} | |
20 </span> | |
21 </div> | |
22 <div class="text"> | |
23 %if h.HasPermissionAny('hg.admin', 'repository.admin')() or co.author.user_id == c.rhodecode_user.user_id: | |
24 <div class="buttons"> | |
1674
6f0143e5efe5
#71 code review
Marcin Kuzminski <marcin@python-works.com>
parents:
1670
diff
changeset
|
25 <span onClick="deleteComment(${co.comment_id})" class="delete-comment ui-button-small">${_('Delete')}</span> |
1670 | 26 </div> |
27 %endif | |
28 ${h.rst(co.text)|n} | |
29 </div> | |
30 </div> | |
1677
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
31 </%def> |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
32 |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
33 |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
34 |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
35 <%def name="comment_inline_form()"> |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
36 <div id='comment-inline-form-template' style="display:none"> |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
37 <div class="comment-inline-form"> |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
38 ${h.form(h.url('changeset_comment', repo_name=c.repo_name, revision=c.changeset.raw_id))} |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
39 <div class="clearfix"> |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
40 <div class="comment-help">${_('Commenting on line')} {1} ${_('comments parsed using RST syntax')}</div> |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
41 ${h.textarea('text')} |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
42 </div> |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
43 <div class="comment-button"> |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
44 <input type="hidden" name="f_path" value="{0}"> |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
45 <input type="hidden" name="line" value="{1}"> |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
46 ${h.submit('save', _('Comment'), class_='ui-button-small')} |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
47 ${h.reset('hide-inline-form', _('Hide'), class_='ui-button-small hide-inline-form')} |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
48 </div> |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
49 ${h.end_form()} |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
50 </div> |
7276b170ce8b
#71 code-review
Marcin Kuzminski <marcin@python-works.com>
parents:
1675
diff
changeset
|
51 </div> |
1670 | 52 </%def> |