scinote-web/app/views/samples/_info_sample_modal.html.erb
2016-10-03 16:33:58 +02:00

56 lines
2.3 KiB
Plaintext

<div class="modal fade" id="modal-info-sample" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
<div class="modal-dialog" role="document">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title"><%= t('samples.modal_info.head_title', sample: @sample.name) %></h4>
</div>
<div class="modal-body">
<% if @sample.my_modules.count > 0 %>
<div>
<%= t("samples.modal_info.title", nr: @sample.my_modules.count) %>
</div>
<div class="linked-children-datatable">
<table id="sample-info-table" class="table dataTable no-footer" role="grid">
<tbody>
<% @sample.my_modules.each_with_index do |mod, i| %>
<tr role="row">
<td class="sorting_1">
<ol class='breadcrumb'>
<li><span class='glyphicon glyphicon-blackboard'></span>&nbsp;
<%= render partial: 'search/results/partials/project_text.html.erb',
locals: { project: mod.experiment.project } %>
</li>
<li><i class='fa fa-flask'></i>&nbsp;
<%= render partial: 'search/results/partials/experiment_text.html.erb',
locals: { experiment: mod.experiment } %>
</li>
<li><span class='glyphicon glyphicon-credit-card'></span>&nbsp;
<%= render partial: 'search/results/partials/my_module_text.html.erb',
locals: { my_module: mod, link_to_page: :samples } %>
</li>
</ol>
</td>
</tr>
<% end %>
</tbody>
<thead>
<tr>
<th></th>
</tr>
</thead>
</table>
</div>
<% else %>
<em><%=t "samples.modal_info.no_tasks" %></em>
<% end %>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" data-dismiss="modal"><%= t("general.close")%></button>
</div>
</div>
</div>
</div>