Skip to content

Commit

Permalink
changes to order (usability). Add button to navigate around orders pages
Browse files Browse the repository at this point in the history
  • Loading branch information
Mary Cutrali committed May 2, 2012
1 parent faef00e commit d82c86c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 6 deletions.
4 changes: 4 additions & 0 deletions app/assets/stylesheets/orders.css.scss
@@ -1,3 +1,7 @@
// Place all the styles related to the Orders controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
h4.permalink{
padding-top: 10px;
padding-bottom: 10px;
}
3 changes: 2 additions & 1 deletion app/views/layouts/admin.html.slim
Expand Up @@ -14,7 +14,8 @@ html
li.nav class="brand"
= link_to "Son of Store Engine", root_path
li.nav id="right"
= link_to "#{current_user.name}", edit_user_registration_path
#admin_name
= link_to "#{current_user.name}", edit_user_registration_path
= link_to("Log out",
destroy_user_session_path(:slug => nil),
:method => :delete, :class=>'btn btn-primary')
Expand Down
2 changes: 2 additions & 0 deletions app/views/orders/index.html.slim
Expand Up @@ -11,3 +11,5 @@ table.table.table-condensed.table-striped
td = link_to(order.id, order_path(@store, order))
td = link_to(order.created_at, order_path(@store, order))
td = link_to(order.total, order_path(@store, order))

= link_to "Back to Store", products_path(@store), :class => 'btn'
11 changes: 6 additions & 5 deletions app/views/orders/show.html.slim
@@ -1,7 +1,7 @@
h2#order_number = "Order ##{@order.id}"
h3 = "Status: #{@order.status}"
h3 = "Total: #{@order.total}"
h4
h3 = "Status: #{@order.status}"
h4.permalink
= "To visit this order again in the future use your "
= link_to "order permalink", permalink(@order), :id => 'unique_url'

Expand All @@ -14,6 +14,7 @@ table.table.table-striped.table-condensed
- @order.items.each do |item|
tr
td = link_to(item.title, product_path(@store, item.product))
td = link_to(item.price, product_path(@store, item.product))
td = link_to(item.quantity, product_path(@store, item.product))
td = link_to(item.subtotal, product_path(@store, item.product))
td = item.price
td = item.quantity
td = item.subtotal
= link_to "View All of My Orders", orders_path(@store), :class => 'btn'

0 comments on commit d82c86c

Please sign in to comment.