mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-15 05:34:53 +08:00
62 lines
2.6 KiB
Text
62 lines
2.6 KiB
Text
<% provide(:head_title, t('sample_groups.index.head_title')) %>
|
|
<%= render partial: "shared/sidebar" %>
|
|
<%= render partial: "shared/secondary_navigation" %>
|
|
|
|
<% if current_team %>
|
|
<ul class="nav nav-tabs nav-settings" data-position="bottom">
|
|
<li role="presentation">
|
|
<%= link_to t('sample_types.index.sample_types'),
|
|
team_sample_types_path(current_team,
|
|
project_id: (@project.id if @project),
|
|
my_module_id: (@my_module.id if @my_module),
|
|
experiment_id: (@experiment.id if @experiment)) %>
|
|
</li>
|
|
<li role="presentation" class="active">
|
|
<%= link_to t('sample_types.index.sample_groups'),
|
|
team_sample_groups_path(current_team,
|
|
project_id: (@project.id if @project),
|
|
my_module_id: (@my_module.id if @my_module),
|
|
experiment_id: (@experiment.id if @experiment)) %>
|
|
</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">
|
|
<div class="row">
|
|
<%= bootstrap_form_for SampleGroup.new,
|
|
remote: true,
|
|
html: { class: 'form-inline' },
|
|
url: team_sample_groups_path(current_team) do |f| %>
|
|
<div class="col-xs-8">
|
|
<%= f.text_field :name,
|
|
id: 'name-input',
|
|
class: 'form-control',
|
|
hide_label: true %>
|
|
</div>
|
|
<div class="col-xs-4 text-right">
|
|
<button id="submit"
|
|
class="btn btn-primary"><%= t('general.create') %></button>
|
|
<button id="remove"
|
|
class="btn btn-default"><%= t('general.cancel') %></button>
|
|
</div>
|
|
<% end %>
|
|
</div>
|
|
</li>
|
|
<% @sample_groups.sorted.each do |sample_group| %>
|
|
<%= render partial: 'sample_group',
|
|
locals: { sample_group: sample_group,
|
|
team: current_team } %>
|
|
<% end %>
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
|
|
<%= javascript_include_tag 'samples/sample_types_groups' %>
|