2016-12-02 16:33:09 +08:00
|
|
|
<% provide(:head_title, t('sample_groups.index.head_title')) %>
|
|
|
|
|
|
|
|
<% if current_organization %>
|
|
|
|
<ul class="nav nav-tabs nav-settings" data-position="bottom">
|
|
|
|
<li role="presentation">
|
|
|
|
<%= link_to t('sample_types.index.sample_types'),
|
|
|
|
organization_sample_types_path(current_organization) %>
|
|
|
|
</li>
|
|
|
|
<li role="presentation" class="active">
|
|
|
|
<%= link_to t('sample_types.index.sample_groups'),
|
|
|
|
organization_sample_groups_path(current_organization) %>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
<div class="tab-content">
|
|
|
|
<div class="tab-pane tab-pane-settings tab-pane-protocols active" role="tabpanel">
|
|
|
|
<div class="pull-right">
|
|
|
|
<button id="create-resource"
|
|
|
|
class="btn btn-primary pull-right"
|
|
|
|
><%= t 'sample_groups.index.new' %></button>
|
|
|
|
</div>
|
|
|
|
<ul class="list-unstyled sample_types_groups_list"
|
|
|
|
id="sample_groups_list">
|
|
|
|
<li class="new-resource-form">
|
|
|
|
<%= form_for SampleGroup.new,
|
|
|
|
remote: true,
|
|
|
|
html: { class: 'form-inline' },
|
|
|
|
url: organization_sample_groups_path(current_organization) do |f| %>
|
|
|
|
<div class="form-group">
|
|
|
|
<%= f.text_field :name, id: 'name-input', class: 'form-control' %>
|
|
|
|
<span id="submit" class="glyphicon glyphicon-ok"></span>
|
|
|
|
<span id="remove" class="glyphicon glyphicon-remove"></span>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
</li>
|
2016-12-02 16:58:35 +08:00
|
|
|
<% @sample_groups.sorted.each do |sample_group| %>
|
2016-12-02 16:33:09 +08:00
|
|
|
<%= render partial: 'sample_group',
|
|
|
|
locals: { sample_group: sample_group,
|
|
|
|
organization: current_organization } %>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%= javascript_include_tag 'samples/sample_types_groups' %>
|