* Change models and related files * Update controllers and specs * More renaming * Seek and destroy, I mean search and replace * Round up the stragglers * Ground control to Major Travis... * More fixes * PR feedback * Various fixes * Rename view * Fix list query builder * Unify request specs * Fix some API spec errors * Fix remaining API specs * Make spec conform to API * Fix leftover problems * Fix JS tests * Fix column name in select * Fix API specs * Fix search specs * Paging Mr. Travis
43 lines
1.1 KiB
Text
43 lines
1.1 KiB
Text
<table class="ledger">
|
|
<caption>Purchase history</caption>
|
|
|
|
<thead>
|
|
<tr>
|
|
<th>Category</th>
|
|
<th>Item</th>
|
|
<th>Cost (credits)</th>
|
|
<th>Date</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% if items.present? %>
|
|
<% for item in items %>
|
|
<% if item.purchase %>
|
|
<tr>
|
|
<% else %>
|
|
<tr class="misc">
|
|
<% end %>
|
|
<td>
|
|
<% if item.purchase %>
|
|
<%= item.purchase.class.name == "Listing" ? "Listing" : item.purchase.class.name.titleize %>
|
|
<% end %>
|
|
</td>
|
|
<td>
|
|
<% if item.purchase %>
|
|
<%= render "ledger_#{item.purchase.class.name.underscore}", purchase: item.purchase %>
|
|
<% else %>
|
|
<span>Miscellaneous items</span>
|
|
<% end %>
|
|
</td>
|
|
<td class="cost"><%= item.cost %></td>
|
|
<td>
|
|
<% if item.purchased_at %>
|
|
<time datetime="<%= item.purchased_at.iso8601 %>"><%= item.purchased_at.iso8601 %></time>
|
|
<% end %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|