scinote-web/app/views/reports/elements/_result_comments_element.html.erb

37 lines
1.3 KiB
Plaintext
Raw Normal View History

2021-06-10 16:59:34 +08:00
<% result ||= report_element.result %>
<% comments = result.result_comments.order(created_at: :desc) %>
<% export_all = defined?(export_all) && export_all %>
2021-06-10 16:59:34 +08:00
<div class="report-element report-comments-element report-result-comments-element">
2016-02-12 23:52:43 +08:00
<div class="report-element-header">
<div class="row">
<div class="pull-left comments-icon">
<span class="fas fa-comment"></span>
2016-02-12 23:52:43 +08:00
</div>
<div class="pull-left comments-name">
2021-06-10 16:59:34 +08:00
<%= t('projects.reports.elements.result_comments.name', result: result.name) %>
2016-02-12 23:52:43 +08:00
</div>
</div>
</div>
<div class="report-element-body">
<div class="row">
<div class="col-xs-12 comments-container simple">
2021-06-10 16:59:34 +08:00
<% if comments.present? %>
<ul class="no-style content-comments">
2016-02-12 23:52:43 +08:00
<% comments.each do |comment| %>
<%= render partial: 'shared/comments/item.html.erb',
locals: { comment: comment, readonly: true, report: true, export_all: export_all } %>
2016-02-12 23:52:43 +08:00
<% end %>
</ul>
<% else %>
2021-06-10 16:59:34 +08:00
<em><%= t('projects.reports.elements.result_comments.no_comments') %></em>
2016-02-12 23:52:43 +08:00
<% end %>
</div>
</div>
</div>
<% if defined?(children) %>
<div class="report-element-children">
<%= children %>
</div>
<% end %>
2016-02-12 23:52:43 +08:00
</div>