app/views/batches/simplified_worksheet.html.erb
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Batch <%= @batch.id %></title>
<%= vite_stylesheet_tag "print", media: "all" %>
<%= vite_javascript_tag "worksheet", media: "print" %>
</head>
<body data-enable-printing="<%= ["cucumber", "test"].exclude?(Rails.env) %>">
<% if @batch.workflow_name.present? -%>
<div style="font-size:40px;text-align:right;padding-right:20px"><%= @batch.workflow_name %></div>
<% end -%>
<div class="page-header"><h1>Batch <%= @batch.id %></h1></div>
<table width="100%" cellpadding="4" cellspacing="0" border="1">
<thead>
<% if @batch.workflow.name.include? "HiSeq" -%>
<tr class="tr_hiseq">
<% else %>
<tr>
<% end %>
<th>Lane</th>
<th>Library Barcode</th>
<th>Library Name</th>
<th>Dilution Volume</th>
<th>Library Types</th>
<th>Number of Cycles</th>
</tr>
</thead>
<tbody>
<% @batch.ordered_requests.each do |request| -%>
<% asset = request.asset %>
<% if asset %>
<% no_barcode = !asset.respond_to?(:human_barcode) %>
<tr>
<td width="20%">Lane <%= request.position %></td>
<td><strong><%= asset.human_barcode unless asset.resource? || no_barcode %></strong></td>
<td><strong><%= h(asset.display_name) %></strong></td>
<td><%= request.concentration %></td>
<td><%= asset.library_types.join(',') %></td>
<td><%= request.request_metadata.read_length unless asset.resource? %></td>
</tr>
<% end %>
<% end -%>
</tbody>
</table>
<br />
<% if @batch.comments.size > 0 %>
<table width="100%" cellpadding="4" cellspacing="0" border="0">
<thead>
<tr>
<th align=left>Comments</th>
</tr>
</thead>
<tbody>
<% @comments.each do |comment| %>
<tr><td><%= comment.description %></td></tr>
<% end %>
</tbody>
</table>
<br />
<% end %>
<div style="border-top: 1px solid black; border-left: none; border-right: none; border-bottom: none">
Printed at <%= Time.now.strftime("%I:%M %p on %A %d %B, %Y") %> for <%= current_user.login %>
</div>
</body>
</html>