+ % if ver_info:
+ v${comments_ver_divider} ${h.age_component(ver_info.created_on, time_is_local=True, tooltip=False)}
+ % else:
+ v${comments_ver_divider}
+ % endif
+ |
+ ||
+ <% + version_info = '' + if is_pr: + version_info = (' made in older version (v{})'.format(comment_ver_index) if is_from_old_ver == 'true' else ' made in this version') + %> + + + + % if comment_obj.outdated: + + % elif comment_obj.is_inline: + + % else: + + % endif + + ## NEW, since refresh + % if existing_ids and comment_obj.comment_id not in existing_ids: + NEW + % endif + | + ++ ${base.gravatar(comment_obj.author.email, 16, user=comment_obj.author, tooltip=True, extra_class=['no-margin'])} + | +
+
+
+
+ ${h.chop_at_smart(comment_obj.text, '\n', suffix_if_chopped='...')}
+
+
+ |
+
- outdated ${'v{}'.format(pr_index_ver)} |
-
- % elif pr_index_ver:
-
- ${'v{}'.format(pr_index_ver)} |
-
+ outdated ${'v{}'.format(comment_ver)}
+ |
+ % elif comment_ver:
+ ${'v{}'.format(comment_ver)}
+ |
% endif
% else:
- % if pr_index_ver:
+ % if comment_ver:
% if comment.outdated:
- ${_('Outdated comment from pull request version v{0}, latest v{1}').format(pr_index_ver, latest_ver)}
- |
+ ${_('Outdated comment from pull request version v{0}, latest v{1}').format(comment_ver, latest_ver)}
+
+ |
% else:
-
- ${'v{}'.format(pr_index_ver)}
-
- |
+ ${'v{}'.format(comment_ver)}
+
+ |
% endif
% endif
% endif
- ## show delete comment if it's not a PR (regular comments) or it's PR that is not closed
- ## only super-admin, repo admin OR comment owner can delete, also hide delete if currently viewed comment is outdated
- %if not outdated_at_ver and (not comment.pull_request or (comment.pull_request and not comment.pull_request.is_closed())):
- ## permissions to delete
- %if comment.immutable is False and (c.is_super_admin or h.HasRepoPermissionAny('repository.admin')(c.repo_name) or comment.author.user_id == c.rhodecode_user.user_id):
- ${_('Edit')}
- | ${_('Delete')}
- %else:
- ${_('Edit')}
- | ${_('Delete')}
- %endif
- %else:
- ${_('Edit')}
- | ${_('Delete')}
- %endif
+ |
% if outdated_at_ver:
- |
- |
+
+
% else:
- |
- |
+
+
% endif