From 4e87412ce9ab33c4d4ce1a4daec4cff1916f641f Mon Sep 17 00:00:00 2001 From: AurelioAHeckert Date: Sat, 12 Jul 2008 23:13:56 +0000 Subject: [PATCH] ActionItem541: a little change in search results and category filter --- app/views/search/_display_results.rhtml | 18 +++++++++++------- db/schema.rb | 21 +-------------------- public/stylesheets/controller_search.css | 8 +++++++- 3 files changed, 19 insertions(+), 28 deletions(-) diff --git a/app/views/search/_display_results.rhtml b/app/views/search/_display_results.rhtml index 43704e2..7552e1a 100644 --- a/app/views/search/_display_results.rhtml +++ b/app/views/search/_display_results.rhtml @@ -25,13 +25,17 @@ <% end %> <% partial = partial_for_class results.first.class %>
- -
+
+
    + <% hit_pos = 0 %> + <% results.each do |hit| %> + <%= render :partial => partial, + :object => hit, + :locals => { :pos => ( hit_pos += 1 ) } %> + <% end %> +
+
+
<% else %> diff --git a/db/schema.rb b/db/schema.rb index f2becea..9c1926e 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -9,7 +9,7 @@ # # It's strongly recommended to check this file into your version control system. -ActiveRecord::Schema.define(:version => 46) do +ActiveRecord::Schema.define(:version => 43) do create_table "article_versions", :force => true do |t| t.integer "article_id" @@ -82,16 +82,12 @@ ActiveRecord::Schema.define(:version => 46) do t.integer "position" end - add_index "blocks", ["box_id"], :name => "index_blocks_on_box_id" - create_table "boxes", :force => true do |t| t.string "owner_type" t.integer "owner_id" t.integer "position" end - add_index "boxes", ["owner_type", "owner_id"], :name => "index_boxes_on_owner_type_and_owner_id" - create_table "categories", :force => true do |t| t.string "name" t.string "slug" @@ -169,17 +165,6 @@ ActiveRecord::Schema.define(:version => 46) do t.integer "height" end - create_table "product_categorizations", :force => true do |t| - t.integer "category_id" - t.integer "product_id" - t.boolean "virtual", :default => false - t.datetime "created_at" - t.datetime "updated_at" - end - - add_index "product_categorizations", ["category_id"], :name => "index_product_categorizations_on_category_id" - add_index "product_categorizations", ["product_id"], :name => "index_product_categorizations_on_product_id" - create_table "products", :force => true do |t| t.integer "enterprise_id" t.integer "product_category_id" @@ -193,8 +178,6 @@ ActiveRecord::Schema.define(:version => 46) do t.float "lng" end - add_index "products", ["enterprise_id"], :name => "index_products_on_enterprise_id" - create_table "profiles", :force => true do |t| t.string "name" t.string "type" @@ -214,8 +197,6 @@ ActiveRecord::Schema.define(:version => 46) do t.boolean "enabled", :default => true end - add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" - create_table "region_validators", :id => false, :force => true do |t| t.integer "region_id" t.integer "organization_id" diff --git a/public/stylesheets/controller_search.css b/public/stylesheets/controller_search.css index 4037c63..4420f18 100644 --- a/public/stylesheets/controller_search.css +++ b/public/stylesheets/controller_search.css @@ -57,12 +57,18 @@ display: block; } +#product-categories-menu div { + position: relative; +} + #product-categories-menu ul { + position: relative; margin: 0px 0px 0px 20px; padding: 0px; } #product-categories-menu .cat-parent { + position: relative; font-weight: bold; margin: 2px 0px; padding: 5px 0px 0px 10px; @@ -78,7 +84,7 @@ padding-bottom: 5px; } -#product-categories-menu .cat-parent li { +#product-categories-menu .cat-parent li, font-weight: normal; margin: 0px; padding: 0px; -- libgit2 0.21.2