2017-01-25 20:20:11 +08:00
|
|
|
<div>
|
2016-08-25 16:26:40 +08:00
|
|
|
<strong>
|
|
|
|
<%=t "protocols.steps.comment_title", user: comment.user.full_name, time: l(comment.created_at, format: :time) %>
|
|
|
|
</strong>
|
2018-02-13 21:59:30 +08:00
|
|
|
<% if can_manage_comment_in_module?(comment.becomes(Comment)) %>
|
2016-08-25 16:26:40 +08:00
|
|
|
<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>
|
2018-05-15 00:33:57 +08:00
|
|
|
<ul class="dropdown-menu custom-dropdown-menu dropdown-menu-fixed" aria-labelledby="comment-<%= comment.id %>-dropdown">
|
2016-08-25 16:26:40 +08:00
|
|
|
<li class="dropdown-header"><%= I18n.t('comments.options_dropdown.header') %></li>
|
2016-08-25 19:48:37 +08:00
|
|
|
<li>
|
|
|
|
<a href="#"
|
|
|
|
data-action="edit-comment"
|
2018-07-19 23:56:42 +08:00
|
|
|
data-remote="true"
|
2017-03-08 20:18:20 +08:00
|
|
|
data-url="<%= edit_step_step_comment_path(comment.step, comment, format: :json) %>">
|
2016-08-25 19:48:37 +08:00
|
|
|
<%= t('comments.options_dropdown.edit') %>
|
|
|
|
</a>
|
2016-08-25 16:26:40 +08:00
|
|
|
</li>
|
2016-08-25 19:48:37 +08:00
|
|
|
<li>
|
|
|
|
<a href="#"
|
|
|
|
data-action="delete-comment"
|
2017-03-08 20:18:20 +08:00
|
|
|
data-url="<%= step_step_comment_path(comment.step, comment, format: :json) %>"
|
2018-11-13 23:57:42 +08:00
|
|
|
data-confirm-message="<%= t('comments.delete_confirm') %>"
|
|
|
|
data-turbolinks="false">
|
2016-08-25 19:48:37 +08:00
|
|
|
<%= t('comments.options_dropdown.delete') %>
|
|
|
|
</a>
|
|
|
|
</li>
|
2016-08-22 21:10:06 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
2016-08-25 16:26:40 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<div data-role="comment-message-container">
|
2018-11-19 15:02:25 +08:00
|
|
|
<div data-role="comment-message"><%= custom_auto_link(comment.message, team: current_team)%></div>
|
2016-11-23 21:18:50 +08:00
|
|
|
</div>
|