From 80e158caf7f2a9403f79e03a0c836175a8612deb Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Sat, 20 Jan 2024 23:59:08 -0800 Subject: [PATCH] Remove extra item zones section from item page This is in the previewer UI now, we can remove this extra one! --- app/assets/stylesheets/items/_show.sass | 12 ------------ app/controllers/items_controller.rb | 7 ------- app/helpers/items_helper.rb | 4 ---- app/views/items/show.html.haml | 11 ----------- 4 files changed, 34 deletions(-) diff --git a/app/assets/stylesheets/items/_show.sass b/app/assets/stylesheets/items/_show.sass index 34c368d9..193be067 100644 --- a/app/assets/stylesheets/items/_show.sass +++ b/app/assets/stylesheets/items/_show.sass @@ -46,18 +46,6 @@ body.items-show #item-info grid-area: info - - #item-zones - font: - family: $text-font - size: 85% - margin-bottom: 1em - - p - display: inline - - &:first-child - margin-right: 1em #your-items-form grid-area: form diff --git a/app/controllers/items_controller.rb b/app/controllers/items_controller.rb index e9a56db7..ddb2cf12 100644 --- a/app/controllers/items_controller.rb +++ b/app/controllers/items_controller.rb @@ -58,13 +58,6 @@ class ItemsController < ApplicationController respond_to do |format| format.html do - @occupied_zones = @item.occupied_zones( - scope: Zone.includes_translations.alphabetical - ) - @restricted_zones = @item.restricted_zones( - scope: Zone.includes_translations.alphabetical - ) - @contributors_with_counts = @item.contributors_with_counts trading_closet_hangers = @item.closet_hangers.trading.includes(:user). diff --git a/app/helpers/items_helper.rb b/app/helpers/items_helper.rb index 6f37343a..edce0c3a 100644 --- a/app/helpers/items_helper.rb +++ b/app/helpers/items_helper.rb @@ -49,10 +49,6 @@ module ItemsHelper content_tag :div, content, :class => 'closeted-icons' end - - def list_zones(zones, method=:label) - zones.map(&method).join(', ') - end def nc_icon image_tag 'nc.png', :title => t('items.item.nc.description'), diff --git a/app/views/items/show.html.haml b/app/views/items/show.html.haml index c536fbc3..fd861110 100644 --- a/app/views/items/show.html.haml +++ b/app/views/items/show.html.haml @@ -23,17 +23,6 @@ #item-info %p= @item.description - #item-zones - %p - %strong #{t '.zones.occupied_header'}: - = list_zones @occupied_zones, :uncertain_label - %p - %strong #{t '.zones.restricted_header'}: - - if @restricted_zones.empty? - = t '.zones.none' - - else - = list_zones @restricted_zones - #trade-hangers - if Time.now < Date.new(2024, 1, 26) %p