sanger/sequencescape

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

Summary

Maintainability
Test Coverage

<% add :about, "Process your batch or change its composition" -%>
<% @submenu_presenter.each_option do |option| -%>
  <% add :menu, option[:label] => option[:url] -%>
<% end -%>
<% add :back_menu, "Back to pipeline" => pipeline_path(@pipeline) -%>

<%= page_title 'Batch', @batch.id %>
<p class="lead">
  <%= badge(@batch.displayed_status, type: 'batch-state') -%>
</p>

<%= panel do %>
  <dl class="descriptive-list-inline">
    <dt>Created</dt> <dd><%= time_tag( @batch.created_at) %></dd>
    <dt>Pipeline</dt> <dd><%= @pipeline.name %></dd>
  </dl>
<% end %>

<% if @pipeline.group_by_parent %>
  <%= panel_no_body :default, title: 'Input', id: 'input_assets' do %>
    <%= render partial: "assets", locals: {show_pick_data: false, listed_labware: @input_labware } %>
  <% end %>

  <% unless @output_labware.blank? %>
    <%= panel_no_body :default, title: 'Output', id: 'output_assets' do %>
      <%= render partial: "assets", locals: {show_pick_data: @pipeline.pick_data, listed_labware: @output_labware }%>
   <% end %>
  <%end %>
  <br/>
<% else %>
  <%= panel_no_body do %>
    <%= render partial: "shared/batch", locals: { requests: @batch.ordered_requests.include_for_batch_view, edit: false, stage: false } %>
  <% end %>
<% end %>

<%= panel_no_body :default, title: 'Events' do %>
  <%= render partial: "events", locals: { events: @batch.lab_events.includes(:user) } %>
<% end %>


<%= render partial: "shared/actions", locals: { batch: @batch } %>