scinote-web/app/views/shareable_links/my_modules/results/_result.html.erb

38 lines
1.7 KiB
Text
Raw Normal View History

<div class="result">
<div class="panel panel-default">
<div class="panel-heading">
<div class="panel-options pull-right">
</div>
<a class="result-panel-collapse-link" href="#result-panel-<%= result.id %>" data-toggle="collapse">
<span class="sn-icon sn-icon-right"></span>
<strong><%= result.name %></strong> |
<span><%= t('my_modules.results.published_on_iso_html', timestamp: result.created_at.iso8601, user: h(result.user.full_name)) %></span>
</a>
</div>
<div class="panel-collapse collapse in" id="result-panel-<%= result.id %>" role="tabpanel">
<div class="panel-body">
<div class="row">
<div class="col-xs-12">
<% result.result_orderable_elements.sort_by(&:position).each do |element| %>
<% if element.orderable_type == 'ResultText' %>
<%= render partial: "shareable_links/my_modules/step_elements/text", locals: { element: element.orderable } %>
<% elsif element.orderable_type == 'ResultTable'%>
<%= render partial: "shareable_links/my_modules/step_elements/table", locals: { element: element.orderable.table } %>
<% end %>
<% end %>
<% if result.result_assets.present? %>
<%= render partial: "shareable_links/my_modules/attachments", locals: { attachments: result.assets, step: result } %>
<% end %>
</div>
</div>
<div class="row">
<div class="result-comment"
id="result-comments-<%= result.id %>">
<%= render partial: "shareable_links/my_modules/results/comments", locals: { comments: result.comments } %>
</div>
</div>
</div>
</div>
</div>
</div>