%def name="diff_line_anchor(filename, line, type)"><%
return '%s_%s_%i' % (h.safeid(filename), type, line)
%>%def>
<%def name="action_class(action)"><%
return {
'-': 'cb-deletion',
'+': 'cb-addition',
' ': 'cb-context',
}.get(action, 'cb-empty')
%>%def>
<%def name="op_class(op_id)"><%
return {
DEL_FILENODE: 'deletion', # file deleted
BIN_FILENODE: 'warning' # binary diff hidden
}.get(op_id, 'addition')
%>%def>
<%def name="link_for(**kw)"><%
new_args = request.GET.mixed()
new_args.update(kw)
return h.url('', **new_args)
%>%def>
<%def name="render_diffset(diffset, commit=None,
# collapse all file diff entries when there are more than this amount of files in the diff
collapse_when_files_over=20,
# collapse lines in the diff when more than this amount of lines changed in the file diff
lines_changed_limit=500,
# add a ruler at to the output
ruler_at_chars=0,
# turn on inline comments
use_comments=False,
)">
%if use_comments:
${(_('Comments parsed using %s syntax with %s support.') % (
('%s' % (h.url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper())),
('@mention' % _('Use @username inside this text to send notification to this RhodeCode user'))
)
)|n
}
%if use_comments and line.original.lineno:
${render_add_comment_button()}
%endif
${line.original.action} ${line.original.content or '' | n}
%if use_comments and line.original.lineno and line.original.comments:
${inline_comments_container(line.original.comments)}
%endif
%if use_comments and line.modified.lineno:
${render_add_comment_button()}
%endif
${line.modified.action} ${line.modified.content or '' | n}
%if use_comments and line.modified.lineno and line.modified.comments:
${inline_comments_container(line.modified.comments)}
%endif