diff --git a/Gemfile.lock b/Gemfile.lock index 17abe4a12f..f295c687cb 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -215,5 +215,8 @@ DEPENDENCIES uglifier (>= 1.3.0) web-console (~> 2.0) +RUBY VERSION + ruby 2.3.0p0 + BUNDLED WITH - 1.11.2 + 1.13.2 diff --git a/app/assets/stylesheets/products.scss b/app/assets/stylesheets/products.scss index 106bbbdd45..4096110472 100644 --- a/app/assets/stylesheets/products.scss +++ b/app/assets/stylesheets/products.scss @@ -40,6 +40,19 @@ main section.categories-show { transition: all 0.3s; } + aside.soldout { + font-weight: bold; + color: white; + position: absolute; + top: 0; + left: 0; + padding: 10px; + background-color: red; + border-top-left-radius: 4px; + border-bottom-right-radius: 20px; + font-size: 1em; + } + aside.price { position: absolute; top: 0; @@ -72,5 +85,3 @@ main section.products-show { } } } - - diff --git a/app/views/products/_product.html.erb b/app/views/products/_product.html.erb index 7bcef07dde..ada844ea3c 100644 --- a/app/views/products/_product.html.erb +++ b/app/views/products/_product.html.erb @@ -17,6 +17,12 @@ <% end %> + <% if product.quantity <= 0%> + + <% end %> + diff --git a/db/seeds.rb b/db/seeds.rb index de3384d0bd..1bad7490cd 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -101,7 +101,7 @@ def open_asset(file_name) name: 'World\'s Largest Smartwatch', description: Faker::Hipster.paragraph(4), image: open_asset('electronics3.jpg'), - quantity: 32, + quantity: 0, price: 2_026.29 })