mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-02-06 06:56:54 +08:00
53699193a2
Conflicts: app/assets/javascripts/comments.js.erb app/assets/javascripts/protocols/index.js app/assets/javascripts/protocols/steps.js.erb app/assets/javascripts/samples/sample_datatable.js.erb app/controllers/my_module_comments_controller.rb app/controllers/project_comments_controller.rb app/controllers/result_comments_controller.rb app/controllers/step_comments_controller.rb app/datatables/sample_datatable.rb app/views/my_module_comments/_comment.html.erb app/views/project_comments/_comment.html.erb app/views/projects/show/_experiment.html.erb app/views/reports/elements/_experiment_element.html.erb app/views/reports/elements/_result_comments_element.html.erb app/views/reports/elements/_result_text_element.html.erb app/views/reports/elements/_step_checklist_element.html.erb app/views/reports/elements/_step_comments_element.html.erb app/views/reports/elements/_step_element.html.erb app/views/result_comments/_comment.html.erb app/views/results/_result_text.html.erb app/views/step_comments/_comment.html.erb app/views/steps/_step.html.erb db/schema.rb
51 lines
1.9 KiB
Text
51 lines
1.9 KiB
Text
f<div>
|
|
<strong>
|
|
<%=t "protocols.steps.comment_title", user: comment.user.full_name, time: l(comment.created_at, format: :time) %>
|
|
</strong>
|
|
<% if can_edit_step_comment_in_protocol(comment) || can_delete_step_comment_in_protocol(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>
|
|
<% if can_edit_step_comment_in_protocol(comment) %>
|
|
<li>
|
|
<a href="#"
|
|
data-action="edit-comment"
|
|
data-url="<%= edit_step_step_comment_path(comment.step_comment.step, comment, format: :json) %>">
|
|
<%= t('comments.options_dropdown.edit') %>
|
|
</a>
|
|
</li>
|
|
<% end %>
|
|
<% if can_delete_step_comment_in_protocol(comment) %>
|
|
<li>
|
|
<a href="#"
|
|
data-action="delete-comment"
|
|
data-url="<%= step_step_comment_path(comment.step_comment.step, comment, format: :json) %>"
|
|
data-confirm-message="<%= t('comments.delete_confirm') %>">
|
|
<%= t('comments.options_dropdown.delete') %>
|
|
</a>
|
|
</li>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
<div data-role="comment-message-container">
|
|
<div data-role="comment-message"><%= auto_link(
|
|
smart_annotation_parser(simple_format(
|
|
sanitize_input(comment.message)),
|
|
),
|
|
link: :urls,
|
|
sanitize: false,
|
|
html: { target: '_blank' }
|
|
).html_safe %></div>
|
|
</div>
|