2019-06-04 20:40:21 +08:00
|
|
|
<% user_comment = comment.user == current_user %>
|
2019-04-25 17:14:55 +08:00
|
|
|
<div
|
|
|
|
class="comment-container <%= user_comment ? 'comment-editable-field' : '' %>"
|
|
|
|
data-field-to-update="message"
|
|
|
|
data-params-group="comment"
|
2019-06-04 20:40:21 +08:00
|
|
|
data-path-to-update="<%= comment_action_url(comment) %>"
|
2019-04-25 17:14:55 +08:00
|
|
|
data-original-name="<%= comment.message %>"
|
2019-05-15 20:59:15 +08:00
|
|
|
data-response-field="comment"
|
|
|
|
data-smart-annotation="true"
|
2019-04-25 17:14:55 +08:00
|
|
|
error="false"
|
|
|
|
>
|
2019-04-20 16:59:59 +08:00
|
|
|
<div class="avatar-placehodler">
|
2019-05-21 21:19:44 +08:00
|
|
|
<span class='global-avatar-container'>
|
|
|
|
<%= image_tag avatar_path(comment.user, :icon_small), class: 'avatar' %>
|
|
|
|
</span>
|
2019-04-20 16:59:59 +08:00
|
|
|
</div>
|
|
|
|
<div class="content-placeholder">
|
2019-04-25 17:14:55 +08:00
|
|
|
<div class="comment-name"><%= comment.user.full_name %></div>
|
|
|
|
<div class="comment-right">
|
|
|
|
<div class="comment-datetime"><%= l(comment.created_at, format: :full) %></div>
|
|
|
|
<% if user_comment %>
|
|
|
|
<div class="comment-actions">
|
|
|
|
<div class="edit-buttons">
|
|
|
|
<span class="save-button"><i class="fas fa-save"></i><%= t('general.save') %></span>
|
|
|
|
<span class="cancel-button"><i class="fas fa-times"></i></span>
|
|
|
|
</div>
|
|
|
|
<div class="view-buttons">
|
|
|
|
<span class="edit-button"><i class="fas fa-pen"></i><%= t('general.edit') %></span>
|
|
|
|
<a href="#"
|
|
|
|
class="delete-button"
|
2019-06-04 20:40:21 +08:00
|
|
|
data-url="<%= comment_action_url(comment) %>"
|
2019-04-25 17:14:55 +08:00
|
|
|
data-confirm-message="<%= t('comments.delete_confirm') %>"
|
|
|
|
data-turbolinks="false">
|
|
|
|
<span class="fas fa-trash action-icon-delete"></span>
|
|
|
|
</a>
|
2019-04-20 16:59:59 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-04-25 17:14:55 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div class="comment-message">
|
2019-06-04 20:40:21 +08:00
|
|
|
<div class="view-mode"><%= custom_auto_link(comment.message, team: current_team, simple_format: true).html_safe %></div>
|
2019-05-15 20:59:15 +08:00
|
|
|
<% if user_comment %>
|
|
|
|
<%= text_area_tag 'message', comment.message, disabled: true, class: 'smart-text-area hidden' %>
|
|
|
|
<% end %>
|
2019-04-20 16:59:59 +08:00
|
|
|
</div>
|
2019-04-25 17:14:55 +08:00
|
|
|
<div class="error-block"></div>
|
2019-04-20 16:59:59 +08:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|