scinote-web/app/views/reports/elements/_step_comments_element.html.erb
2022-06-24 14:38:24 +02:00

27 lines
987 B
Text

<% step ||= report_element.step %>
<% comments = step.step_comments.order(created_at: :desc) %>
<% export_all = defined?(export_all) && export_all %>
<% if comments.present? %>
<div class="report-element report-comments-element report-step-comments-element">
<div class="report-element-header">
<div class="pull-left comments-name">
<%= t('projects.reports.elements.step_comments.name') %>
</div>
</div>
<div class="report-element-body">
<div class="comments-container simple">
<ul class="no-style content-comments">
<% comments.each do |comment| %>
<%= render partial: 'shared/comments/item.html.erb',
locals: { comment: comment, readonly: true, report: true, export_all: export_all } %>
<% end %>
</ul>
</div>
</div>
<% if defined?(children) %>
<div class="report-element-children">
<%= children %>
</div>
<% end %>
</div>
<% end %>