2016-08-25 15:26:45 +08:00
|
|
|
<div class="pull-right">
|
|
|
|
<span class="text-muted"><%= l comment.created_at, format: '%H:%M' %></span>
|
|
|
|
<% if can_edit_module_comment(comment) || can_delete_module_comment(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 dropdown-menu-fixed" aria-labelledby="comment-<%= comment.id %>-dropdown">
|
|
|
|
<li class="dropdown-header"><%= I18n.t('comments.options_dropdown.header') %></li>
|
2016-08-25 19:48:37 +08:00
|
|
|
<% if can_edit_module_comment(comment) %>
|
|
|
|
<li>
|
|
|
|
<a href="#"
|
|
|
|
data-action="edit-comment"
|
2017-03-08 20:18:20 +08:00
|
|
|
data-url="<%= edit_my_module_my_module_comment_path(comment.my_module, comment, format: :json) %>">
|
2016-08-25 19:48:37 +08:00
|
|
|
<%= t('comments.options_dropdown.edit') %>
|
|
|
|
</a>
|
2016-08-25 15:26:45 +08:00
|
|
|
</li>
|
2016-08-25 19:48:37 +08:00
|
|
|
<% end %>
|
|
|
|
<% if can_delete_module_comment(comment) %>
|
|
|
|
<li>
|
|
|
|
<a href="#"
|
|
|
|
data-action="delete-comment"
|
2017-03-08 20:18:20 +08:00
|
|
|
data-url="<%= my_module_my_module_comment_path(comment.my_module, comment, format: :json) %>"
|
2016-08-25 19:48:37 +08:00
|
|
|
data-confirm-message="<%= t('comments.delete_confirm') %>">
|
|
|
|
<%= t('comments.options_dropdown.delete') %>
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
<% end %>
|
2016-08-22 21:10:06 +08:00
|
|
|
</ul>
|
|
|
|
</div>
|
2016-08-25 15:26:45 +08:00
|
|
|
<% end %>
|
|
|
|
</div>
|
|
|
|
<strong><%= comment.user.full_name %>:</strong>
|
|
|
|
<div data-role="comment-message-container">
|
2017-01-24 23:44:56 +08:00
|
|
|
<div data-role="comment-message"><%= custom_auto_link(comment.message) %></div>
|
2016-08-25 15:26:45 +08:00
|
|
|
</div>
|