Merge pull request #2249 from aignatov-bio/ai-sci-fix-comment-error

Remove edit initialization from comment view mode
This commit is contained in:
aignatov-bio 2019-12-10 10:36:38 +01:00 committed by GitHub
commit 4d3968a48a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,8 +1,8 @@
<% report = false unless defined?(report) %>
<% readonly = false unless defined?(readonly) %>
<% edit_mode = (comment.user == current_user && !readonly) %>
<div
class="comment-container inline-init-handler <%= edit_mode ? 'comment-editable-field' : '' %> <%= report ? 'report' : '' %>"
<div
class="comment-container <%= edit_mode ? 'inline-init-handler' : '' %> <%= report ? 'report' : '' %>"
data-field-to-update="message"
data-params-group="comment"
data-path-to-update="<%= comment_action_url(comment) %>"