scinote-web/app/views/sample_groups/index.html.erb

63 lines
2.6 KiB
Text
Raw Normal View History

2016-12-02 16:33:09 +08:00
<% provide(:head_title, t('sample_groups.index.head_title')) %>
<%= render partial: "shared/sidebar" %>
<%= render partial: "shared/secondary_navigation" %>
2016-12-02 16:33:09 +08:00
2017-01-25 19:01:23 +08:00
<% if current_team %>
2016-12-02 16:33:09 +08:00
<ul class="nav nav-tabs nav-settings" data-position="bottom">
<li role="presentation">
<%= link_to t('sample_types.index.sample_types'),
2017-01-25 19:01:23 +08:00
team_sample_types_path(current_team,
project_id: (@project.id if @project),
2016-12-12 23:03:14 +08:00
my_module_id: (@my_module.id if @my_module),
experiment_id: (@experiment.id if @experiment)) %>
2016-12-02 16:33:09 +08:00
</li>
<li role="presentation" class="active">
<%= link_to t('sample_types.index.sample_groups'),
2017-01-25 19:01:23 +08:00
team_sample_groups_path(current_team,
project_id: (@project.id if @project),
2016-12-12 23:03:14 +08:00
my_module_id: (@my_module.id if @my_module),
experiment_id: (@experiment.id if @experiment)) %>
2016-12-02 16:33:09 +08:00
</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' },
2017-01-25 19:01:23 +08:00
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>
2016-12-02 16:33:09 +08:00
</li>
<% @sample_groups.sorted.each do |sample_group| %>
2016-12-02 16:33:09 +08:00
<%= render partial: 'sample_group',
locals: { sample_group: sample_group,
2017-01-25 19:01:23 +08:00
team: current_team } %>
2016-12-02 16:33:09 +08:00
<% end %>
</ul>
</div>
</div>
<% end %>
<%= javascript_include_tag 'samples/sample_types_groups' %>