Sha256: f83209476f85592e0a82ca9adee367b03c3818515ca59b9d602a5860fe6d3b7d
Contents?: true
Size: 1.12 KB
Versions: 199
Compression:
Stored size: 1.12 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 ? 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
199 entries across 199 versions & 1 rubygems