Commit 357b937de6ec531b1f42824646c81684f59ae07b
Exists in
master
and in
28 other branches
Merge branch 'ai3088' into stable
Showing
4 changed files
with
5 additions
and
22 deletions
Show diff stats
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
... | ... | @@ -26,27 +26,10 @@ module ManageProductsHelper |
26 | 26 | def hierarchy_category_navigation(current_category, options = {}) |
27 | 27 | hierarchy = [] |
28 | 28 | if current_category |
29 | - count_chars = 0 | |
30 | - unless options[:hide_current_category] | |
31 | - hierarchy << current_category.name | |
32 | - count_chars += current_category.name.length | |
33 | - end | |
29 | + hierarchy << current_category.name unless options[:hide_current_category] | |
34 | 30 | ancestors = current_category.ancestors |
35 | - toplevel = ancestors.pop | |
36 | - if toplevel | |
37 | - count_chars += toplevel.name.length | |
38 | - end | |
39 | 31 | ancestors.each do |category| |
40 | - if count_chars > 55 | |
41 | - hierarchy << hierarchy_category_item(category, options[:make_links], '( … )') | |
42 | - break | |
43 | - else | |
44 | - hierarchy << hierarchy_category_item(category, options[:make_links]) | |
45 | - end | |
46 | - count_chars += category.name.length | |
47 | - end | |
48 | - if toplevel | |
49 | - hierarchy << hierarchy_category_item(toplevel, options[:make_links]) | |
32 | + hierarchy << hierarchy_category_item(category, options[:make_links]) | |
50 | 33 | end |
51 | 34 | end |
52 | 35 | hierarchy.reverse.join(options[:separator] || ' → ') |
... | ... | @@ -55,7 +38,7 @@ module ManageProductsHelper |
55 | 38 | def options_for_select_categories(categories, selected = nil) |
56 | 39 | categories.sort_by{|cat| cat.name.transliterate}.map do |category| |
57 | 40 | 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>" | |
41 | + "<option value='#{category.id}' title='#{category.name}' #{selected_attribute}>#{category.name + (category.leaf? ? '': ' »')}</option>" | |
59 | 42 | end.join("\n") |
60 | 43 | end |
61 | 44 | ... | ... |
public/stylesheets/application.css
... | ... | @@ -3771,7 +3771,6 @@ h1#agenda-title { |
3771 | 3771 | -webkit-border-radius: 5px; |
3772 | 3772 | background: url(/images/ccc.gif); /* image ccc.gif from http://www.wannabegirl.org/translucent */ |
3773 | 3773 | padding: 10px 30px 20px 30px; |
3774 | - width: 570px; | |
3775 | 3774 | } |
3776 | 3775 | #categories_container_wrapper { |
3777 | 3776 | overflow-x: scroll; | ... | ... |