sanger/sequencescape

View on GitHub
app/views/stock_assets/new.html.erb

Summary

Maintainability
Test Coverage

<%= page_title "Create Stock Library Tubes", "Batch #{@batch.id}" %>


<%= form_tag(batch_stock_assets_path(@batch), multipart: true) do %>
  <%= hidden_field_tag "batch_id", "#{@batch.id}" %>
  <table class="table">
    <thead>
      <th>Name</th>
      <th>Volume (&#181;L)</th>
      <th>Concentration (nM)</th>
    </thead>
    <% @assets.each do |asset_id, stock_asset| %>
      <tr>
        <td><%= text_field_tag "assets[#{asset_id}][name]", "#{stock_asset.name}", class: 'form-control' %></td>
        <td><%= text_field_tag "assets[#{asset_id}][volume]", nil, class: 'form-control' %></td>
        <td><%= text_field_tag "assets[#{asset_id}][concentration]", nil, class: 'form-control' %></td>
      </tr>
    <% end %>
  </table>
  <%= submit_tag 'Save', class: 'btn btn-success' %>
<% end %>