Skip to content

Instantly share code, notes, and snippets.

@markprovan
Created January 10, 2012 16:18
Show Gist options
  • Select an option

  • Save markprovan/1589816 to your computer and use it in GitHub Desktop.

Select an option

Save markprovan/1589816 to your computer and use it in GitHub Desktop.
<h3>Order Summary</h3>
<p class="header_tagline">Click an item to remove it.</p>
<% unless @current_order.nil? %>
<ul id="order_items">
<% @current_order.order_items.each do |item| %>
<li class="small gray button"><%= link_to item.get_item.name, remove_item_from_order_path(item.id) %> £<%= item.get_item.sale_price %></li> #Add another of this line via JS
<% end%>
</ul>
<p class="order_total">Order Total: <%= number_to_currency(@current_order.total, :unit => "&pound;")%></p>
<%= link_to "Confirm Order", finalise_order_path, :class => "small green button"%>
<%= link_to "Cancel Order", finalise_order_path, :class => "red button padded_top", :confirm => "Are you sure you want to cancel this order?"%>
<% end %>
<div class="grid_4 active_order_button"><%= link_to "Active Orders", active_orders_path, :class => "small gray button"%></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment