Commit a45a9dc522c3702a10c38702f6734dde7b917c85

Authored by Braulio Bhavamitra
1 parent 76fe9d45

Allow more space to category selection interface

app/controllers/my_profile/manage_products_controller.rb
... ... @@ -48,6 +48,7 @@ class ManageProductsController < ApplicationController
48 48 end
49 49  
50 50 def new
  51 + @no_design_blocks = true
51 52 @category = params[:selected_category_id] ? Category.find(params[:selected_category_id]) : nil
52 53 @product = @profile.products.build(:product_category => @category)
53 54 @categories = ProductCategory.top_level_for(environment)
... ...
app/helpers/layout_helper.rb
... ... @@ -4,7 +4,7 @@ module LayoutHelper
4 4 # Identify the current controller and action for the CSS:
5 5 " controller-#{@controller.controller_name}" +
6 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 8 (!profile.nil? && profile.is_on_homepage?(request.path,@page) ? " profile-homepage" : "")
9 9 end
10 10  
... ...
app/helpers/manage_products_helper.rb
... ... @@ -55,7 +55,7 @@ module ManageProductsHelper
55 55 def options_for_select_categories(categories, selected = nil)
56 56 categories.sort_by{|cat| cat.name.transliterate}.map do |category|
57 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? ? '': ' &raquo;')}</option>"
  58 + "<option value='#{category.id}' title='#{category.name}' #{selected_attribute}>#{category.name + (category.leaf? ? '': ' &raquo;')}</option>"
59 59 end.join("\n")
60 60 end
61 61  
... ...
public/stylesheets/application.css
... ... @@ -3768,7 +3768,6 @@ h1#agenda-title {
3768 3768 -webkit-border-radius: 5px;
3769 3769 background: url(/images/ccc.gif); /* image ccc.gif from http://www.wannabegirl.org/translucent */
3770 3770 padding: 10px 30px 20px 30px;
3771   - width: 570px;
3772 3771 }
3773 3772 #categories_container_wrapper {
3774 3773 overflow-x: scroll;
... ...