Sha256: d530feec108c53204030b1cc9538fc9482978c1ccb44aeab04d12dab08219b81

Contents?: true

Size: 1.1 KB

Versions: 35

Compression:

Stored size: 1.1 KB

Contents

<h1>Order History</h1>

<% if @orders.count > 0 %>
  <table class='orders'>
    <tr>
      <th>Date</th>
      <th>Order Number</th>
      <th>Total</th>
      <th>Status</th>
    </tr>
    <% @orders.each do |order| %>
      <tr onclick="window.location='/my-account/orders/<%= order.id %>';">
        <td><%= order.date_created.strftime('%m/%d/%Y') %></td>
        <td><%= order.order_number %></td>
        <td><%= number_to_currency(order.total) %></td>
        <td><%= order.status.capitalize %></td>
      </tr>
    <% end %>
  </table>
<% else %>
  <p>You haven't placed any orders yet.<p>
<% end %>

<p><input type='button' value='< Back to My Account' class='btn' onclick="window.location='/my-account';" /></p>

<% content_for :caboose_css do %>
<style type='text/css'>

table.orders { border-collapse: collapse; margin-bottom: 20px; }
table.orders th { margin: 0; padding: 10px; border: #000 0px solid; font-weight: bold; text-align: center; }
table.orders td { margin: 0; padding: 10px; border: #000 1px solid; }
table.orders tr:hover td { background: #ccc; cursor: pointer; cursor: hand; }

</style>
<% end %>

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
caboose-cms-0.5.158 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.156 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.155 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.154 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.153 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.152 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.151 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.150 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.149 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.148 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.147 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.146 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.145 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.144 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.143 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.142 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.141 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.140 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.139 app/views/caboose/my_account_orders/index.html.erb
caboose-cms-0.5.138 app/views/caboose/my_account_orders/index.html.erb