##// END OF EJS Templates
fix(svn): fix the problems of reading txn_id when used gunicorn/waitress + traefik/no-traefik combinations
fix(svn): fix the problems of reading txn_id when used gunicorn/waitress + traefik/no-traefik combinations

File last commit:

r5045:0ea2e860 default
r5207:9410d3a2 default
Show More
changeset_file_comment.mako
555 lines | 25.8 KiB | application/x-mako | MakoHtmlLexer
/ rhodecode / templates / changeset / changeset_file_comment.mako
templating: use .mako as extensions for template files.
r1282 ## usage:
## <%namespace name="comment" file="/changeset/changeset_file_comment.mako"/>
## ${comment.comment_block(comment)}
##
comments: introduce new draft comments....
r4540 <%namespace name="base" file="/base/base.mako"/>
comments: edit functionality added
r4401
<%!
from rhodecode.lib import html_filters
%>
comments: introduce new draft comments....
r4540
comments: multiple changes on comments navigation/display logic...
r4543 <%def name="comment_block(comment, inline=False, active_pattern_entries=None, is_new=False)">
pull-requests: overhaul of the UX by adding new sidebar...
r4482
commits/pr pages various fixes....
r4485 <%
comments: introduce new draft comments....
r4540 from rhodecode.model.comment import CommentsModel
comment_model = CommentsModel()
comment_ver = comment.get_index_version(getattr(c, 'versions', []))
latest_ver = len(getattr(c, 'versions', []))
visible_for_user = True
if comment.draft:
visible_for_user = comment.user_id == c.rhodecode_user.user_id
commits/pr pages various fixes....
r4485 %>
pull-requests: overhaul of the UX by adding new sidebar...
r4482
comments: use unified aggregation of comments counters....
r1332 % if inline:
pull-requests: overhaul of the UX by adding new sidebar...
r4482 <% outdated_at_ver = comment.outdated_at_version(c.at_version_num) %>
comments: use unified aggregation of comments counters....
r1332 % else:
pull-requests: overhaul of the UX by adding new sidebar...
r4482 <% outdated_at_ver = comment.older_than_version(c.at_version_num) %>
comments: use unified aggregation of comments counters....
r1332 % endif
comments: introduce new draft comments....
r4540 % if visible_for_user:
templating: use .mako as extensions for template files.
r1282 <div class="comment
comments: properly show version of pull request into added comments....
r1286 ${'comment-inline' if inline else 'comment-general'}
templating: use .mako as extensions for template files.
r1282 ${'comment-outdated' if outdated_at_ver else 'comment-current'}"
id="comment-${comment.comment_id}"
line="${comment.line_no}"
data-comment-id="${comment.comment_id}"
comments: allow submitting id of comment which submitted comment resolved....
r1325 data-comment-type="${comment.comment_type}"
json: fixed calls to json after orjson implementation
r4974 data-comment-draft=${h.str_json(comment.draft)}
comments: edit functionality added
r4401 data-comment-renderer="${comment.renderer}"
data-comment-text="${comment.text | html_filters.base64,n}"
comments: multiple changes on comments navigation/display logic...
r4543 data-comment-f-path="${comment.f_path}"
comments: allow to properly initialize outdated comments that are attached...
r2250 data-comment-line-no="${comment.line_no}"
json: fixed calls to json after orjson implementation
r4974 data-comment-inline=${h.str_json(inline)}
templating: use .mako as extensions for template files.
r1282 style="${'display: none;' if outdated_at_ver else ''}">
<div class="meta">
comments: allow submitting id of comment which submitted comment resolved....
r1325 <div class="comment-type-label">
comments: introduce new draft comments....
r4540 % if comment.draft:
comments: multiple changes on comments navigation/display logic...
r4543 <div class="tooltip comment-draft" title="${_('Draft comments are only visible to the author until submitted')}.">
DRAFT
</div>
drafts: draft finize boilerplate
r4549 % elif is_new:
<div class="tooltip comment-new" title="${_('This comment was added while you browsed this page')}.">
NEW
</div>
comments: introduce new draft comments....
r4540 % endif
comments: multiple changes on comments navigation/display logic...
r4543
comments: made few UI changes/improvements for how we show comments status, ribbons and general comment data.
r4411 <div class="comment-label ${comment.comment_type or 'note'}" id="comment-label-${comment.comment_id}">
## TODO COMMENT
comments: allow submitting id of comment which submitted comment resolved....
r1325 % if comment.comment_type == 'todo':
% if comment.resolved:
<div class="resolved tooltip" title="${_('Resolved by comment #{}').format(comment.resolved.comment_id)}">
comments: made few UI changes/improvements for how we show comments status, ribbons and general comment data.
r4411 <i class="icon-flag-filled"></i>
comments: allow submitting id of comment which submitted comment resolved....
r1325 <a href="#comment-${comment.resolved.comment_id}">${comment.comment_type}</a>
</div>
% else:
<div class="resolved tooltip" style="display: none">
<span>${comment.comment_type}</span>
</div>
comments: made few UI changes/improvements for how we show comments status, ribbons and general comment data.
r4411 <div class="resolve tooltip" onclick="return Rhodecode.comments.createResolutionComment(${comment.comment_id});" title="${_('Click to create resolution comment.')}">
<i class="icon-flag-filled"></i>
comments: allow submitting id of comment which submitted comment resolved....
r1325 ${comment.comment_type}
</div>
% endif
comments: made few UI changes/improvements for how we show comments status, ribbons and general comment data.
r4411 ## NOTE COMMENT
comments: allow submitting id of comment which submitted comment resolved....
r1325 % else:
comments: made few UI changes/improvements for how we show comments status, ribbons and general comment data.
r4411 ## RESOLVED NOTE
comments: allow submitting id of comment which submitted comment resolved....
r1325 % if comment.resolved_comment:
comments: made few UI changes/improvements for how we show comments status, ribbons and general comment data.
r4411 <div class="tooltip" title="${_('This comment resolves TODO #{}').format(comment.resolved_comment.comment_id)}">
fix
json: fixed calls to json after orjson implementation
r4974 <a href="#comment-${comment.resolved_comment.comment_id}" onclick="Rhodecode.comments.scrollToComment($('#comment-${comment.resolved_comment.comment_id}'), 0, ${h.str_json(comment.resolved_comment.outdated)})">
comments: made few UI changes/improvements for how we show comments status, ribbons and general comment data.
r4411 <span style="text-decoration: line-through">#${comment.resolved_comment.comment_id}</span>
</a>
</div>
## STATUS CHANGE NOTE
% elif not comment.is_inline and comment.status_change:
<%
if comment.pull_request:
status_change_title = 'Status of review for pull request !{}'.format(comment.pull_request.pull_request_id)
else:
status_change_title = 'Status of review for commit {}'.format(h.short_id(comment.commit_id))
%>
sidebar: expose status indicator for general comments which changed review status.
r4490 <i class="icon-circle review-status-${comment.review_status}"></i>
comments: made few UI changes/improvements for how we show comments status, ribbons and general comment data.
r4411 <div class="changeset-status-lbl tooltip" title="${status_change_title}">
sidebar: expose status indicator for general comments which changed review status.
r4490 ${comment.review_status_lbl}
comments: made few UI changes/improvements for how we show comments status, ribbons and general comment data.
r4411 </div>
comments: allow submitting id of comment which submitted comment resolved....
r1325 % else:
comments: made few UI changes/improvements for how we show comments status, ribbons and general comment data.
r4411 <div>
<i class="icon-comment"></i>
${(comment.comment_type or 'note')}
</div>
comments: allow submitting id of comment which submitted comment resolved....
r1325 % endif
% endif
comments: made few UI changes/improvements for how we show comments status, ribbons and general comment data.
r4411
comments: add comments type into comments.
r1324 </div>
</div>
comments: introduce new draft comments....
r4540 ## NOTE 0 and .. => because we disable it for now until UI ready
comments: made few UI changes/improvements for how we show comments status, ribbons and general comment data.
r4411 % if 0 and comment.status_change:
<div class="pull-left">
<span class="tag authortag tooltip" title="${_('Status from pull request.')}">
<a href="${h.route_path('pullrequest_show',repo_name=comment.pull_request.target_repo.repo_name,pull_request_id=comment.pull_request.pull_request_id)}">
${'!{}'.format(comment.pull_request.pull_request_id)}
</a>
</span>
</div>
% endif
comments: introduce new draft comments....
r4540 ## Since only author can see drafts, we don't show it
% if not comment.draft:
comments: properly show version of pull request into added comments....
r1286 <div class="author ${'author-inline' if inline else 'author-general'}">
hovercacrds: added new tooltips and hovercards to expose certain information for objects shown in UI
r4026 ${base.gravatar_with_user(comment.author.email, 16, tooltip=True)}
comments: made few UI changes/improvements for how we show comments status, ribbons and general comment data.
r4411 </div>
comments: introduce new draft comments....
r4540 % endif
comments: cleanup of PR versions/author tags.
r4409
templating: use .mako as extensions for template files.
r1282 <div class="date">
${h.age_component(comment.modified_at, time_is_local=True)}
</div>
comments: made few UI changes/improvements for how we show comments status, ribbons and general comment data.
r4411
% if comment.pull_request and comment.pull_request.author.user_id == comment.author.user_id:
<span class="tag authortag tooltip" title="${_('Pull request author')}">
${_('author')}
</span>
% endif
comment-history: fixes/ui changes...
r4408 <%
comment_version_selector = 'comment_versions_{}'.format(comment.comment_id)
%>
comments: edit functionality added
r4401 % if comment.history:
<div class="date">
comment-history: fixes/ui changes...
r4408
<input id="${comment_version_selector}" name="${comment_version_selector}"
type="hidden"
data-last-version="${comment.history[-1].version}">
<script type="text/javascript">
comment-history: UI fixes
r4404
comment-history: fixes/ui changes...
r4408 var preLoadVersionData = [
% for comment_history in comment.history:
{
id: ${comment_history.comment_history_id},
text: 'v${comment_history.version}',
action: function () {
Rhodecode.comments.showVersion(
"${comment.comment_id}",
"${comment_history.comment_history_id}"
)
},
comment_version: "${comment_history.version}",
comment_author_username: "${comment_history.author.username}",
templates: pass in request where possible to avoid threadglobals
r5045 comment_author_gravatar: "${h.gravatar_url(comment_history.author.email, 16, request=request)}",
comment-history: fixes/ui changes...
r4408 comment_created_on: '${h.age_component(comment_history.created_on, time_is_local=True)}',
},
% endfor
]
initVersionSelector("#${comment_version_selector}", {results: preLoadVersionData});
</script>
comments: edit functionality added
r4401 </div>
% else:
<div class="date" style="display: none">
comment-history: fixes/ui changes...
r4408 <input id="${comment_version_selector}" name="${comment_version_selector}"
type="hidden"
data-last-version="0">
comments: edit functionality added
r4401 </div>
%endif
comments: properly show version of pull request into added comments....
r1286
templating: use .mako as extensions for template files.
r1282 <div class="comment-links-block">
comments: cleanup of PR versions/author tags.
r4409
comments: properly show version of pull request into added comments....
r1286 % if inline:
comments: cleanup of PR versions/author tags.
r4409 <a class="pr-version-inline" href="${request.current_route_path(_query=dict(version=comment.pull_request_version_id), _anchor='comment-{}'.format(comment.comment_id))}">
comments: use unified aggregation of comments counters....
r1332 % if outdated_at_ver:
comments: multiple changes on comments navigation/display logic...
r4543 <strong class="comment-outdated-label">outdated</strong> <code class="tooltip pr-version-num" title="${_('Outdated comment from pull request version v{0}, latest v{1}').format(comment_ver, latest_ver)}">${'v{}'.format(comment_ver)}</code>
commits/pr pages various fixes....
r4485 <code class="action-divider">|</code>
pull-requests: overhaul of the UX by adding new sidebar...
r4482 % elif comment_ver:
commits/pr pages various fixes....
r4485 <code class="tooltip pr-version-num" title="${_('Comment from pull request version v{0}, latest v{1}').format(comment_ver, latest_ver)}">${'v{}'.format(comment_ver)}</code>
<code class="action-divider">|</code>
comments: use unified aggregation of comments counters....
r1332 % endif
comments: properly show version of pull request into added comments....
r1286 </a>
% else:
pull-requests: overhaul of the UX by adding new sidebar...
r4482 % if comment_ver:
comments: cleanup of PR versions/author tags.
r4409
comments: properly show version of pull request into added comments....
r1286 % if comment.outdated:
comments: cleanup of PR versions/author tags.
r4409 <a class="pr-version"
href="?version=${comment.pull_request_version_id}#comment-${comment.comment_id}"
>
pull-requests: overhaul of the UX by adding new sidebar...
r4482 ${_('Outdated comment from pull request version v{0}, latest v{1}').format(comment_ver, latest_ver)}
commits/pr pages various fixes....
r4485 </a>
<code class="action-divider">|</code>
comments: properly show version of pull request into added comments....
r1286 % else:
comments: made few UI changes/improvements for how we show comments status, ribbons and general comment data.
r4411 <a class="tooltip pr-version"
pull-requests: overhaul of the UX by adding new sidebar...
r4482 title="${_('Comment from pull request version v{0}, latest v{1}').format(comment_ver, latest_ver)}"
comments: cleanup of PR versions/author tags.
r4409 href="${h.route_path('pullrequest_show',repo_name=comment.pull_request.target_repo.repo_name,pull_request_id=comment.pull_request.pull_request_id, version=comment.pull_request_version_id)}"
>
commits/pr pages various fixes....
r4485 <code class="pr-version-num">${'v{}'.format(comment_ver)}</code>
</a>
<code class="action-divider">|</code>
comments: properly show version of pull request into added comments....
r1286 % endif
comments: cleanup of PR versions/author tags.
r4409
comments: properly show version of pull request into added comments....
r1286 % endif
% endif
commits/pr pages various fixes....
r4485 <details class="details-reset details-inline-block">
<summary class="noselect"><i class="icon-options cursor-pointer"></i></summary>
<details-menu class="details-dropdown">
<div class="dropdown-item">
${_('Comment')} #${comment.comment_id}
<span class="pull-right icon-clipboard clipboard-action" data-clipboard-text="${comment_model.get_url(comment,request, permalink=True, anchor='comment-{}'.format(comment.comment_id))}" title="${_('Copy permalink')}"></span>
</div>
templating: use .mako as extensions for template files.
r1282
commits/pr pages various fixes....
r4485 ## 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):
<div class="dropdown-divider"></div>
<div class="dropdown-item">
comments: multiple changes on comments navigation/display logic...
r4543 <a onclick="return Rhodecode.comments.editComment(this, '${comment.line_no}', '${comment.f_path}');" class="btn btn-link btn-sm edit-comment">${_('Edit')}</a>
commits/pr pages various fixes....
r4485 </div>
<div class="dropdown-item">
<a onclick="return Rhodecode.comments.deleteComment(this);" class="btn btn-link btn-sm btn-danger delete-comment">${_('Delete')}</a>
</div>
comments: multiple changes on comments navigation/display logic...
r4543 ## Only available in EE edition
% if comment.draft and c.rhodecode_edition_id == 'EE':
comments: introduce new draft comments....
r4540 <div class="dropdown-item">
<a onclick="return Rhodecode.comments.finalizeDrafts([${comment.comment_id}]);" class="btn btn-link btn-sm finalize-draft-comment">${_('Submit draft')}</a>
</div>
% endif
commits/pr pages various fixes....
r4485 %else:
<div class="dropdown-divider"></div>
<div class="dropdown-item">
<a class="tooltip edit-comment link-disabled" disabled="disabled" title="${_('Action unavailable')}">${_('Edit')}</a>
</div>
<div class="dropdown-item">
<a class="tooltip edit-comment link-disabled" disabled="disabled" title="${_('Action unavailable')}">${_('Delete')}</a>
</div>
%endif
%else:
<div class="dropdown-divider"></div>
<div class="dropdown-item">
<a class="tooltip edit-comment link-disabled" disabled="disabled" title="${_('Action unavailable')}">${_('Edit')}</a>
</div>
<div class="dropdown-item">
<a class="tooltip edit-comment link-disabled" disabled="disabled" title="${_('Action unavailable')}">${_('Delete')}</a>
</div>
%endif
</details-menu>
</details>
<code class="action-divider">|</code>
outdated-notes: show navigation on outdated comments
r1343 % if outdated_at_ver:
commits/pr pages various fixes....
r4485 <a onclick="return Rhodecode.comments.prevOutdatedComment(this);" class="tooltip prev-comment" title="${_('Jump to the previous outdated comment')}"> <i class="icon-angle-left"></i> </a>
<a onclick="return Rhodecode.comments.nextOutdatedComment(this);" class="tooltip next-comment" title="${_('Jump to the next outdated comment')}"> <i class="icon-angle-right"></i></a>
outdated-notes: show navigation on outdated comments
r1343 % else:
commits/pr pages various fixes....
r4485 <a onclick="return Rhodecode.comments.prevComment(this);" class="tooltip prev-comment" title="${_('Jump to the previous comment')}"> <i class="icon-angle-left"></i></a>
<a onclick="return Rhodecode.comments.nextComment(this);" class="tooltip next-comment" title="${_('Jump to the next comment')}"> <i class="icon-angle-right"></i></a>
outdated-notes: show navigation on outdated comments
r1343 % endif
templating: use .mako as extensions for template files.
r1282
</div>
</div>
<div class="text">
issue-tracker: cache active patterns in the template so we can re-use them when rendering comments....
r4202 ${h.render(comment.text, renderer=comment.renderer, mentions=True, repo_name=getattr(c, 'repo_name', None), active_pattern_entries=active_pattern_entries)}
templating: use .mako as extensions for template files.
r1282 </div>
</div>
comments: introduce new draft comments....
r4540 % endif
templating: use .mako as extensions for template files.
r1282 </%def>
comments: allow submitting id of comment which submitted comment resolved....
r1325
templating: use .mako as extensions for template files.
r1282 ## generate main comments
comments: use unified aggregation of comments counters....
r1332 <%def name="generate_comments(comments, include_pull_request=False, is_pull_request=False)">
issue-tracker: cache active patterns in the template so we can re-use them when rendering comments....
r4202 <%
active_pattern_entries = h.get_active_pattern_entries(getattr(c, 'repo_name', None))
%>
outdated-notes: show navigation on outdated comments
r1343 <div class="general-comments" id="comments">
comments: use unified aggregation of comments counters....
r1332 %for comment in comments:
templating: use .mako as extensions for template files.
r1282 <div id="comment-tr-${comment.comment_id}">
## only render comments that are not from pull request, or from
## pull request and a status change
%if not comment.pull_request or (comment.pull_request and comment.status_change) or include_pull_request:
issue-tracker: cache active patterns in the template so we can re-use them when rendering comments....
r4202 ${comment_block(comment, active_pattern_entries=active_pattern_entries)}
templating: use .mako as extensions for template files.
r1282 %endif
</div>
%endfor
## to anchor ajax comments
<div id="injected_page_comments"></div>
</div>
</%def>
comments: allow submitting id of comment which submitted comment resolved....
r1325
templating: use .mako as extensions for template files.
r1282 <%def name="comments(post_url, cur_status, is_pull_request=False, is_compare=False, change_status=True, form_extras=None)">
<div class="comments">
<%
if is_pull_request:
placeholder = _('Leave a comment on this Pull Request.')
elif is_compare:
comments: fixed compare view comments.
r1331 placeholder = _('Leave a comment on {} commits in this range.').format(len(form_extras))
templating: use .mako as extensions for template files.
r1282 else:
placeholder = _('Leave a comment on this Commit.')
%>
comments: allow submitting id of comment which submitted comment resolved....
r1325
templating: use .mako as extensions for template files.
r1282 % if c.rhodecode_user.username != h.DEFAULT_USER:
comments: enabled resolution for general comments, and finalized how general comment is build
r1326 <div class="js-template" id="cb-comment-general-form-template">
## template generated for injection
${comment_form(form_type='general', review_statuses=c.commit_statuses, form_extras=form_extras)}
</div>
<div id="cb-comment-general-form-placeholder" class="comment-form ac">
comments: allow submitting id of comment which submitted comment resolved....
r1325 ## inject form here
</div>
<script type="text/javascript">
comments: enabled resolution for general comments, and finalized how general comment is build
r1326 var resolvesCommentId = null;
comments: fixed compare view comments.
r1331 var generalCommentForm = Rhodecode.comments.createGeneralComment(
comments: small fixes for range commits comments
r4551 'general', "${placeholder}", resolvesCommentId);
comments: fixed compare view comments.
r1331
// set custom success callback on rangeCommit
% if is_compare:
generalCommentForm.setHandleFormSubmit(function(o) {
var self = generalCommentForm;
var text = self.cm.getValue();
var status = self.getCommentStatus();
var commentType = self.getCommentType();
comments: introduce new draft comments....
r4540 var isDraft = self.getDraftState();
comments: fixed compare view comments.
r1331
if (text === "" && !status) {
return;
}
// we can pick which commits we want to make the comment by
// selecting them via click on preview pane, this will alter the hidden inputs
var cherryPicked = $('#changeset_compare_view_content .compare_select.hl').length > 0;
var commitIds = [];
$('#changeset_compare_view_content .compare_select').each(function(el) {
var commitId = this.id.replace('row-', '');
if ($(this).hasClass('hl') || !cherryPicked) {
$("input[data-commit-id='{0}']".format(commitId)).val(commitId);
commitIds.push(commitId);
} else {
$("input[data-commit-id='{0}']".format(commitId)).val('')
}
});
self.setActionButtonsDisabled(true);
self.cm.setOption("readOnly", true);
var postData = {
'text': text,
'changeset_status': status,
'comment_type': commentType,
comments: introduce new draft comments....
r4540 'draft': isDraft,
comments: fixed compare view comments.
r1331 'commit_ids': commitIds,
'csrf_token': CSRF_TOKEN
};
var submitSuccessCallback = function(o) {
location.reload(true);
};
var submitFailCallback = function(){
self.resetCommentFormState(text)
};
self.submitAjaxPOST(
self.submitUrl, postData, submitSuccessCallback, submitFailCallback);
});
% endif
comments: allow submitting id of comment which submitted comment resolved....
r1325 </script>
templating: use .mako as extensions for template files.
r1282 % else:
comments: allow submitting id of comment which submitted comment resolved....
r1325 ## form state when not logged in
templating: use .mako as extensions for template files.
r1282 <div class="comment-form ac">
<div class="comment-area">
<div class="comment-area-header">
<ul class="nav-links clearfix">
<li class="active">
<a class="disabled" href="#edit-btn" disabled="disabled" onclick="return false">${_('Write')}</a>
</li>
<li class="">
<a class="disabled" href="#preview-btn" disabled="disabled" onclick="return false">${_('Preview')}</a>
</li>
</ul>
</div>
<div class="comment-area-write" style="display: block;">
<div id="edit-container">
comments: multiple changes on comments navigation/display logic...
r4543 <div style="padding: 20px 0px 0px 0;">
templating: use .mako as extensions for template files.
r1282 ${_('You need to be logged in to leave comments.')}
routing: remove usage of url.current from pylons.
r2104 <a href="${h.route_path('login', _query={'came_from': h.current_route_path(request)})}">${_('Login now')}</a>
templating: use .mako as extensions for template files.
r1282 </div>
</div>
<div id="preview-container" class="clearfix" style="display: none;">
<div id="preview-box" class="preview-box"></div>
</div>
</div>
<div class="comment-area-footer">
<div class="toolbar">
<div class="toolbar-text">
</div>
</div>
</div>
</div>
<div class="comment-footer">
</div>
</div>
% endif
comments: allow submitting id of comment which submitted comment resolved....
r1325 <script type="text/javascript">
bindToggleButtons();
</script>
templating: use .mako as extensions for template files.
r1282 </div>
comments: allow submitting id of comment which submitted comment resolved....
r1325 </%def>
<%def name="comment_form(form_type, form_id='', lineno_id='{1}', review_statuses=None, form_extras=None)">
comments: added support for adding comment attachments using the artifacts logic....
r3973
comments: allow submitting id of comment which submitted comment resolved....
r1325 ## comment injected based on assumption that user is logged in
ui: updated comments box with latest styling.
r4130 <form ${('id="{}"'.format(form_id) if form_id else '') |n} action="#" method="GET">
templating: use .mako as extensions for template files.
r1282
comments: allow submitting id of comment which submitted comment resolved....
r1325 <div class="comment-area">
<div class="comment-area-header">
ui: updated comments box with latest styling.
r4130 <div class="pull-left">
<ul class="nav-links clearfix">
<li class="active">
<a href="#edit-btn" tabindex="-1" id="edit-btn_${lineno_id}">${_('Write')}</a>
</li>
<li class="">
<a href="#preview-btn" tabindex="-1" id="preview-btn_${lineno_id}">${_('Preview')}</a>
</li>
</ul>
</div>
<div class="pull-right">
<span class="comment-area-text">${_('Mark as')}:</span>
<select class="comment-type" id="comment_type_${lineno_id}" name="comment_type">
% for val in c.visual.comment_types:
<option value="${val}">${val.upper()}</option>
% endfor
</select>
</div>
comments: allow submitting id of comment which submitted comment resolved....
r1325 </div>
<div class="comment-area-write" style="display: block;">
comments: multiple changes on comments navigation/display logic...
r4543 <div id="edit-container_${lineno_id}" style="margin-top: -1px">
comments: allow submitting id of comment which submitted comment resolved....
r1325 <textarea id="text_${lineno_id}" name="text" class="comment-block-ta ac-input"></textarea>
</div>
<div id="preview-container_${lineno_id}" class="clearfix" style="display: none;">
<div id="preview-box_${lineno_id}" class="preview-box"></div>
</div>
</div>
templating: use .mako as extensions for template files.
r1282
comments: added support for adding comment attachments using the artifacts logic....
r3973 <div class="comment-area-footer comment-attachment-uploader">
comments: allow submitting id of comment which submitted comment resolved....
r1325 <div class="toolbar">
comments: added support for adding comment attachments using the artifacts logic....
r3973
<div class="comment-attachment-text">
<div class="dropzone-text">
${_("Drag'n Drop files here or")} <span class="link pick-attachment">${_('Choose your files')}</span>.<br>
</div>
<div class="dropzone-upload" style="display:none">
<i class="icon-spin animate-spin"></i> ${_('uploading...')}
</div>
</div>
## comments dropzone template, empty on purpose
<div style="display: none" class="comment-attachment-uploader-template">
<div class="dz-file-preview" style="margin: 0">
<div class="dz-error-message"></div>
</div>
</div>
comments: allow submitting id of comment which submitted comment resolved....
r1325 </div>
</div>
</div>
<div class="comment-footer">
templating: use .mako as extensions for template files.
r1282
ui: updated comments box with latest styling.
r4130 ## inject extra inputs into the form
% if form_extras and isinstance(form_extras, (list, tuple)):
<div id="comment_form_extras">
% for form_ex_el in form_extras:
${form_ex_el|n}
% endfor
</div>
% endif
<div class="action-buttons">
% if form_type != 'inline':
<div class="action-buttons-extra"></div>
% endif
comments: introduce new draft comments....
r4540 <input class="btn btn-success comment-button-input submit-comment-action" id="save_${lineno_id}" name="save" type="submit" value="${_('Add comment')}" data-is-draft=false onclick="$(this).addClass('submitter')">
% if form_type == 'inline':
comments: multiple changes on comments navigation/display logic...
r4543 % if c.rhodecode_edition_id == 'EE':
## Disable the button for CE, the "real" validation is in the backend code anyway
comments: UX improvements for comment buttons.
r4585 <input class="btn btn-draft comment-button-input submit-draft-action" id="save_draft_${lineno_id}" name="save_draft" type="submit" value="${_('Add draft')}" data-is-draft=true onclick="$(this).addClass('submitter')">
comments: multiple changes on comments navigation/display logic...
r4543 % else:
comments: UX improvements for comment buttons.
r4585 <input class="btn btn-draft comment-button-input submit-draft-action disabled" disabled="disabled" type="submit" value="${_('Add draft')}" onclick="return false;" title="Draft comments only available in EE edition of RhodeCode">
comments: multiple changes on comments navigation/display logic...
r4543 % endif
% endif
% if review_statuses:
<div class="comment-status-box">
<select id="change_status_${lineno_id}" name="changeset_status">
<option></option> ## Placeholder
% for status, lbl in review_statuses:
<option value="${status}" data-status="${status}">${lbl}</option>
%if is_pull_request and change_status and status in ('approved', 'rejected'):
<option value="${status}_closed" data-status="${status}">${lbl} & ${_('Closed')}</option>
%endif
% endfor
</select>
</div>
comments: introduce new draft comments....
r4540 % endif
ui: updated comments box with latest styling.
r4130
## inline for has a file, and line-number together with cancel hide button.
% if form_type == 'inline':
<input type="hidden" name="f_path" value="{0}">
<input type="hidden" name="line" value="${lineno_id}">
comments: make dismiss less prominent
r4587 <span style="opacity: 0.7" class="cursor-pointer cb-comment-cancel" onclick="return Rhodecode.comments.cancelComment(this);">
comments: UX improvements for comment buttons.
r4585 ${_('dismiss')}
</span>
ui: updated comments box with latest styling.
r4130 % endif
</div>
<div class="toolbar-text">
<% renderer_url = '<a href="%s">%s</a>' % (h.route_url('%s_help' % c.visual.default_renderer), c.visual.default_renderer.upper()) %>
drafts: support draft in commits view...
r4555 <span>${_('{} is supported.').format(renderer_url)|n}
comments: multiple changes on comments navigation/display logic...
r4543
<i class="icon-info-circled tooltip-hovercard"
data-hovercard-alt="ALT"
data-hovercard-url="javascript:commentHelp('${c.visual.default_renderer.upper()}')"
json: fixed calls to json after orjson implementation
r4974 data-comment-json-b64='${h.b64(h.str_json({}))}'></i>
comments: small fixes for range commits comments
r4551 </span>
comments: allow submitting id of comment which submitted comment resolved....
r1325 </div>
</div>
</form>
</%def>