sanger/limber

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

Summary

Maintainability
Test Coverage
<%= page(:"robot-verification-bed") do %>
  <%= vite_javascript_tag 'entrypoints/pages/bed_verification.js', defer: true %>
  <%= content do %>
    <%= card title: robot.name do %>
      <div id="robot-verification">
        <div class="layout">
        <h4>Layout</h4>
          <dl class="row">
            <% robot.beds.each do |barcode,config| %>
              <dt class='col-2'><%= config.label %></dt>
              <dd class='col-10'><%= config.purpose_labels %></dd>
            <% end %>
          </dl>
        </div>
        <div class="instructions">
          <h4><%= t(robot.id, scope: [:robots, :instruction_summary ], default: :default ) %></h4>
          <ol>
            <%= t(robot.id, scope: [:robots, :instructions ], default: :default ).html_safe %>
          </ol>
        </div>
      </div>
    <% end # of card%>
  <% end # of content%>

  <%= sidebar do %>
    <%= form_for :robot, url: start_robot_path(robot.id) do |form| %>
      <%= render partial: 'bed', locals: {robot: robot, form: form } %>
      <%= submit_tag "Start the #{robot.name}",
        name: nil,
        class: "submit btn btn-lg btn-success btn-block",
        id: 'start-robot',
        disabled: true,
        data: { disable_with: 'Starting...' }
      %>
    <% end # of form %>
  <% end # of sidebar %>
<% end # of page %>