## -*- coding: utf-8 -*- ## usage: ## <%namespace name="comment" file="/changeset/changeset_file_comment.html"/> ## ${comment.comment_block(co)} ## <%def name="comment_block(co)">
${h.gravatar_div(co.author.email, size=20)} ${co.author.full_name_and_username} ${h.age(co.modified_at)} %if co.pull_request: ${_("comment")} ${_('on pull request')} "${co.pull_request.title or _("No title")}" %else: ${_('on this changeset')} %endif %if co.author_id == request.authuser.user_id or h.HasRepoPermissionLevel('admin')(c.repo_name): %if co.deletable(): %endif %endif
%if co.status_change:

${_("Status change")}: ${co.status_change[0].status_lbl}

%endif
%if co.text: ${h.render_w_mentions(co.text, c.repo_name)|n} %endif
<%def name="comment_inline_form()"> ## show comment count as "x comments (y inline, z general)" <%def name="comment_count(inline_cnt, general_cnt)"> ${'%s (%s, %s)' % ( ungettext("%d comment", "%d comments", inline_cnt + general_cnt) % (inline_cnt + general_cnt), ungettext("%d inline", "%d inline", inline_cnt) % inline_cnt, ungettext("%d general", "%d general", general_cnt) % general_cnt )} ## generate inline comments and the main ones <%def name="generate_comments()"> ## original location of comments ... but the ones outside diff context remains here
%for f_path, lines in c.inline_comments: %for line_no, comments in lines.iteritems():
%for co in comments: ${comment_block(co)} %endfor
%endfor %endfor
%for co in c.comments: ${comment_block(co)} %endfor
${comment_count(c.inline_cnt, len(c.comments))}
## MAIN COMMENT FORM <%def name="comments(change_status=True)">
## comment_div for general comments