Commit a45a9dc522c3702a10c38702f6734dde7b917c85
1 parent
76fe9d45
Exists in
master
and in
29 other branches
Allow more space to category selection interface
Showing
4 changed files
with
3 additions
and
3 deletions
Show diff stats
app/controllers/my_profile/manage_products_controller.rb
@@ -48,6 +48,7 @@ class ManageProductsController < ApplicationController | @@ -48,6 +48,7 @@ class ManageProductsController < ApplicationController | ||
48 | end | 48 | end |
49 | 49 | ||
50 | def new | 50 | def new |
51 | + @no_design_blocks = true | ||
51 | @category = params[:selected_category_id] ? Category.find(params[:selected_category_id]) : nil | 52 | @category = params[:selected_category_id] ? Category.find(params[:selected_category_id]) : nil |
52 | @product = @profile.products.build(:product_category => @category) | 53 | @product = @profile.products.build(:product_category => @category) |
53 | @categories = ProductCategory.top_level_for(environment) | 54 | @categories = ProductCategory.top_level_for(environment) |
app/helpers/layout_helper.rb
@@ -4,7 +4,7 @@ module LayoutHelper | @@ -4,7 +4,7 @@ module LayoutHelper | ||
4 | # Identify the current controller and action for the CSS: | 4 | # Identify the current controller and action for the CSS: |
5 | " controller-#{@controller.controller_name}" + | 5 | " controller-#{@controller.controller_name}" + |
6 | " action-#{@controller.controller_name}-#{@controller.action_name}" + | 6 | " action-#{@controller.controller_name}-#{@controller.action_name}" + |
7 | - " template-#{profile.nil? ? "default" : profile.layout_template}" + | 7 | + " template-#{@layout_template || if profile.blank? then 'default' else profile.layout_template end}" + |
8 | (!profile.nil? && profile.is_on_homepage?(request.path,@page) ? " profile-homepage" : "") | 8 | (!profile.nil? && profile.is_on_homepage?(request.path,@page) ? " profile-homepage" : "") |
9 | end | 9 | end |
10 | 10 |
app/helpers/manage_products_helper.rb
@@ -55,7 +55,7 @@ module ManageProductsHelper | @@ -55,7 +55,7 @@ module ManageProductsHelper | ||
55 | def options_for_select_categories(categories, selected = nil) | 55 | def options_for_select_categories(categories, selected = nil) |
56 | categories.sort_by{|cat| cat.name.transliterate}.map do |category| | 56 | categories.sort_by{|cat| cat.name.transliterate}.map do |category| |
57 | selected_attribute = selected.nil? ? '' : (category == selected ? "selected='selected'" : '') | 57 | selected_attribute = selected.nil? ? '' : (category == selected ? "selected='selected'" : '') |
58 | - "<option value='#{category.id}' title='#{category.name}' #{selected_attribute}>#{truncate(category.name, :length => 33) + (category.leaf? ? '': ' »')}</option>" | 58 | + "<option value='#{category.id}' title='#{category.name}' #{selected_attribute}>#{category.name + (category.leaf? ? '': ' »')}</option>" |
59 | end.join("\n") | 59 | end.join("\n") |
60 | end | 60 | end |
61 | 61 |
public/stylesheets/application.css
@@ -3768,7 +3768,6 @@ h1#agenda-title { | @@ -3768,7 +3768,6 @@ h1#agenda-title { | ||
3768 | -webkit-border-radius: 5px; | 3768 | -webkit-border-radius: 5px; |
3769 | background: url(/images/ccc.gif); /* image ccc.gif from http://www.wannabegirl.org/translucent */ | 3769 | background: url(/images/ccc.gif); /* image ccc.gif from http://www.wannabegirl.org/translucent */ |
3770 | padding: 10px 30px 20px 30px; | 3770 | padding: 10px 30px 20px 30px; |
3771 | - width: 570px; | ||
3772 | } | 3771 | } |
3773 | #categories_container_wrapper { | 3772 | #categories_container_wrapper { |
3774 | overflow-x: scroll; | 3773 | overflow-x: scroll; |