Skip to content

Instantly share code, notes, and snippets.

@leemcalilly
Created July 8, 2013 19:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leemcalilly/95f19b23ed121e40f73d to your computer and use it in GitHub Desktop.
Save leemcalilly/95f19b23ed121e40f73d to your computer and use it in GitHub Desktop.
<% provide(:title, 'All Checkouts') %>
<h1>All Checkouts</h1>
<table>
<thead>
<tr>
<th>Job</th>
<th>Shift</th>
<th>Employee</th>
<th>Date</th>
<th>Hours</th>
<th>Sales</th>
<th>Tips</th>
<th>Owed</th>
<th>Collected</th>
<th>Notes</th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
<% @checkouts.each do |checkout| %>
<tr>
<td><%= checkout.job %></td>
<td><%= checkout.shift %></td>
<td>
<% checkout.employees.each do |employee| %>
<%= employee.full_name %>
<% end %>
</td>
<td><%= checkout.date %></td>
<td><%= checkout.hours %></td>
<td><%= checkout.sales %></td>
<td><%= checkout.tips %></td>
<td><%= checkout.owed %></td>
<td><%= checkout.collected %></td>
<td><%= checkout.notes %></td>
<td><%= link_to 'Show', checkout %></td>
<td><%= link_to 'Edit', edit_checkout_path(checkout) %></td>
<td><%= link_to 'Destroy', checkout, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Checkout', new_checkout_path %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment