sanger/sequencescape

View on GitHub
app/views/batches/index.html.erb

Summary

Maintainability
Test Coverage

<% add :about, "Batches created by or assigned to you. Or find batches by pipeline using the links below." -%>

<% Pipeline.active.pluck(:name,:id).each do |name, id| -%>
  <% add :menu, "#{name}" => url_for(controller: :pipelines, action: :batches, id: id) %>
<% end -%>

<% add :back_menu, "Back to all pipelines" => pipelines_path -%>

<%= page_title 'Batches', 'Index' %>

<% if @user == 'all' %>
  <%= link_to 'See just my batches', batches_path %>
<% else %>
  <%= link_to 'See all batches', batches_path(user: 'all') %>
<% end %>

<%= render partial: "shared/batches", locals: {batches: @batches, showing_all: true, in_progress: true, batch_state: 'assigned'} %>