From a45a9dc522c3702a10c38702f6734dde7b917c85 Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Wed, 9 Apr 2014 12:44:06 -0300 Subject: [PATCH] Allow more space to category selection interface --- app/controllers/my_profile/manage_products_controller.rb | 1 + app/helpers/layout_helper.rb | 2 +- app/helpers/manage_products_helper.rb | 2 +- public/stylesheets/application.css | 1 - 4 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/my_profile/manage_products_controller.rb b/app/controllers/my_profile/manage_products_controller.rb index 575d510..44f0d5b 100644 --- a/app/controllers/my_profile/manage_products_controller.rb +++ b/app/controllers/my_profile/manage_products_controller.rb @@ -48,6 +48,7 @@ class ManageProductsController < ApplicationController end def new + @no_design_blocks = true @category = params[:selected_category_id] ? Category.find(params[:selected_category_id]) : nil @product = @profile.products.build(:product_category => @category) @categories = ProductCategory.top_level_for(environment) diff --git a/app/helpers/layout_helper.rb b/app/helpers/layout_helper.rb index fa7cfc1..c734d6f 100644 --- a/app/helpers/layout_helper.rb +++ b/app/helpers/layout_helper.rb @@ -4,7 +4,7 @@ module LayoutHelper # Identify the current controller and action for the CSS: " controller-#{@controller.controller_name}" + " action-#{@controller.controller_name}-#{@controller.action_name}" + - " template-#{profile.nil? ? "default" : profile.layout_template}" + + " template-#{@layout_template || if profile.blank? then 'default' else profile.layout_template end}" + (!profile.nil? && profile.is_on_homepage?(request.path,@page) ? " profile-homepage" : "") end diff --git a/app/helpers/manage_products_helper.rb b/app/helpers/manage_products_helper.rb index 2c4ee06..179fcbd 100644 --- a/app/helpers/manage_products_helper.rb +++ b/app/helpers/manage_products_helper.rb @@ -55,7 +55,7 @@ module ManageProductsHelper def options_for_select_categories(categories, selected = nil) categories.sort_by{|cat| cat.name.transliterate}.map do |category| selected_attribute = selected.nil? ? '' : (category == selected ? "selected='selected'" : '') - "" + "" end.join("\n") end diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index 8cdcce2..1b5eeef 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -3768,7 +3768,6 @@ h1#agenda-title { -webkit-border-radius: 5px; background: url(/images/ccc.gif); /* image ccc.gif from http://www.wannabegirl.org/translucent */ padding: 10px 30px 20px 30px; - width: 570px; } #categories_container_wrapper { overflow-x: scroll; -- libgit2 0.21.2