Sha256: 28f9b46213da92008c75b2028ec8db00319a48365fc23e4a68cc5661e9819dbe

Contents?: true

Size: 1.27 KB

Versions: 1

Compression:

Stored size: 1.27 KB

Contents

<h1>Listing purchases</h1>

<table class='table table-striped table-condensed table-bordered'>
  <thead>
    <tr>
      <th>Title</th>
      <th>Description</th>
      <th>Purchase date</th>
      <th>Warranty duration</th>
      <th>Receipt</th>
      <th></th>
    </tr>
  </thead>
  <tbody>
    <% @purchases.each do |purchase| %>
      <tr>
        <td><%= purchase.title %></td>
        <td><%= purchase.description %></td>
        <td><%=l purchase.purchase_date rescue '' %></td>
        <td><%= purchase.warranty_duration %></td>
        <td><%= link_to "<i class='icon-download-alt'></i> #{purchase.receipt.file.filename}".html_safe, purchase.receipt.url, class: 'btn btn-mini' if purchase.receipt.file %></td>
        <td>
          <%= link_to '<i class="icon-search"></i> Show'.html_safe, purchase, class: 'btn btn-mini' %>
          <%= link_to '<i class="icon-pencil"></i> Edit'.html_safe, edit_purchase_path(purchase), class: 'btn btn-mini' %>
          <%= link_to '<i class="icon-remove"></i> Destroy'.html_safe, purchase, method: :delete, data: { confirm: 'Are you sure?' }, class: 'btn btn-mini btn-danger' %>
        </td>
      </tr>
    <% end %>
  </tbody>
</table>

<br />

<%= link_to '<i class="icon-plus"></i> New Purchase'.html_safe, new_purchase_path, class: 'btn' %>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
bookkeeper-0.0.1.beta1 app/views/bookkeeper/purchases/index.html.erb