From 7831520c6f5d90b656e72193ebf72d74096161de Mon Sep 17 00:00:00 2001 From: David Vandorpe Date: Tue, 7 Jul 2015 22:36:04 +0200 Subject: [PATCH 1/2] Red border when product is sold out --- app/assets/stylesheets/products.css.scss | 4 ++++ app/views/order_items/_order_item.html.erb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/stylesheets/products.css.scss b/app/assets/stylesheets/products.css.scss index 2a9487c..7834f4e 100644 --- a/app/assets/stylesheets/products.css.scss +++ b/app/assets/stylesheets/products.css.scss @@ -32,3 +32,7 @@ vertical-align: middle; } } + +div.out-of-stock { + border-color:red; +} \ No newline at end of file diff --git a/app/views/order_items/_order_item.html.erb b/app/views/order_items/_order_item.html.erb index 50334af..e7f2965 100644 --- a/app/views/order_items/_order_item.html.erb +++ b/app/views/order_items/_order_item.html.erb @@ -1,5 +1,5 @@
-
+
<%= image_tag product.avatar %> From d397ae7d3453a2812c4cb8ccac4ede63691cb344 Mon Sep 17 00:00:00 2001 From: David Vandorpe Date: Wed, 8 Jul 2015 17:06:02 +0200 Subject: [PATCH 2/2] Use of .zero? instead of == 0 --- app/views/order_items/_order_item.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/order_items/_order_item.html.erb b/app/views/order_items/_order_item.html.erb index e7f2965..a70559f 100644 --- a/app/views/order_items/_order_item.html.erb +++ b/app/views/order_items/_order_item.html.erb @@ -1,5 +1,5 @@
-
+
<%= image_tag product.avatar %>