## -*- coding: utf-8 -*- ## usage: ## <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/> ## ${comment.comment_block(comment)} ## <%! from rhodecode.lib import html_filters %> <%namespace name="base" file="/base/base.mako"/> <%def name="comment_block(comment, inline=False, active_pattern_entries=None)"> <% from rhodecode.model.comment import CommentsModel comment_model = CommentsModel() %> <% comment_ver = comment.get_index_version(getattr(c, 'versions', [])) %> <% latest_ver = len(getattr(c, 'versions', [])) %> % if inline: <% outdated_at_ver = comment.outdated_at_version(c.at_version_num) %> % else: <% outdated_at_ver = comment.older_than_version(c.at_version_num) %> % endif
outdated ${'v{}'.format(comment_ver)}
|
% elif comment_ver:${'v{}'.format(comment_ver)}
|
% endif % else: % if comment_ver: % if comment.outdated: ${_('Outdated comment from pull request version v{0}, latest v{1}').format(comment_ver, latest_ver)}|
% else:${'v{}'.format(comment_ver)}
|
% endif % endif % endif|
% if outdated_at_ver: % else: % endif