mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-18 15:13:21 +08:00
41 lines
1.6 KiB
Text
41 lines
1.6 KiB
Text
<div>
|
|
<strong>
|
|
<%=t "protocols.steps.comment_title", user: comment.user.full_name, time: l(comment.created_at, format: :time) %>
|
|
</strong>
|
|
<% if can_manage_comment_in_module?(comment.becomes(Comment)) %>
|
|
<div class="dropdown dropdown-comment">
|
|
<a href="#"
|
|
class="dropdown-toggle"
|
|
data-role="comment-options"
|
|
type="button"
|
|
id="comment-<%= comment.id %>-dropdown"
|
|
data-toggle="dropdown"
|
|
aria-haspopup="true"
|
|
aria-expanded="true">
|
|
<span class="caret"></span>
|
|
</a>
|
|
<ul class="dropdown-menu custom-dropdown-menu dropdown-menu-fixed" aria-labelledby="comment-<%= comment.id %>-dropdown">
|
|
<li class="dropdown-header"><%= I18n.t('comments.options_dropdown.header') %></li>
|
|
<li>
|
|
<a href="#"
|
|
data-action="edit-comment"
|
|
data-remote="true"
|
|
data-url="<%= edit_step_step_comment_path(comment.step, comment, format: :json) %>">
|
|
<%= t('comments.options_dropdown.edit') %>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="#"
|
|
data-action="delete-comment"
|
|
data-url="<%= step_step_comment_path(comment.step, comment, format: :json) %>"
|
|
data-confirm-message="<%= t('comments.delete_confirm') %>">
|
|
<%= t('comments.options_dropdown.delete') %>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<div data-role="comment-message-container">
|
|
<div data-role="comment-message"><%= custom_auto_link(comment.message)%></div>
|
|
</div>
|