Commit 4e87412ce9ab33c4d4ce1a4daec4cff1916f641f
1 parent
cce5575b
Exists in
master
and in
29 other branches
ActionItem541: a little change in search results and category filter
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@2250 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
3 changed files
with
19 additions
and
28 deletions
Show diff stats
app/views/search/_display_results.rhtml
@@ -25,13 +25,17 @@ | @@ -25,13 +25,17 @@ | ||
25 | <% end %> | 25 | <% end %> |
26 | <% partial = partial_for_class results.first.class %> | 26 | <% partial = partial_for_class results.first.class %> |
27 | <div class="search-results-innerbox search-results-type-<%= partial %> <%= 'common-profile-list-block' if partial == 'profile' %>"> | 27 | <div class="search-results-innerbox search-results-type-<%= partial %> <%= 'common-profile-list-block' if partial == 'profile' %>"> |
28 | - <ul> | ||
29 | - <% hit_pos = 0 %> | ||
30 | - <% results.each do |hit| %> | ||
31 | - <%= render :partial => partial, :object => hit, :locals => { :pos => ( hit_pos += 1 ) } %> | ||
32 | - <% end %> | ||
33 | - </ul> | ||
34 | - <hr /> | 28 | + <div class="search-results-innerbox2"><!-- the innerbox2 is a workarround for MSIE --> |
29 | + <ul> | ||
30 | + <% hit_pos = 0 %> | ||
31 | + <% results.each do |hit| %> | ||
32 | + <%= render :partial => partial, | ||
33 | + :object => hit, | ||
34 | + :locals => { :pos => ( hit_pos += 1 ) } %> | ||
35 | + <% end %> | ||
36 | + </ul> | ||
37 | + <hr /> | ||
38 | + </div><!-- end class="search-results-innerbox2" --> | ||
35 | </div><!-- end class="search-results-innerbox" --> | 39 | </div><!-- end class="search-results-innerbox" --> |
36 | </div><!-- end class="search-results-<%= name %>" --> | 40 | </div><!-- end class="search-results-<%= name %>" --> |
37 | <% else %> | 41 | <% else %> |
db/schema.rb
@@ -9,7 +9,7 @@ | @@ -9,7 +9,7 @@ | ||
9 | # | 9 | # |
10 | # It's strongly recommended to check this file into your version control system. | 10 | # It's strongly recommended to check this file into your version control system. |
11 | 11 | ||
12 | -ActiveRecord::Schema.define(:version => 46) do | 12 | +ActiveRecord::Schema.define(:version => 43) do |
13 | 13 | ||
14 | create_table "article_versions", :force => true do |t| | 14 | create_table "article_versions", :force => true do |t| |
15 | t.integer "article_id" | 15 | t.integer "article_id" |
@@ -82,16 +82,12 @@ ActiveRecord::Schema.define(:version => 46) do | @@ -82,16 +82,12 @@ ActiveRecord::Schema.define(:version => 46) do | ||
82 | t.integer "position" | 82 | t.integer "position" |
83 | end | 83 | end |
84 | 84 | ||
85 | - add_index "blocks", ["box_id"], :name => "index_blocks_on_box_id" | ||
86 | - | ||
87 | create_table "boxes", :force => true do |t| | 85 | create_table "boxes", :force => true do |t| |
88 | t.string "owner_type" | 86 | t.string "owner_type" |
89 | t.integer "owner_id" | 87 | t.integer "owner_id" |
90 | t.integer "position" | 88 | t.integer "position" |
91 | end | 89 | end |
92 | 90 | ||
93 | - add_index "boxes", ["owner_type", "owner_id"], :name => "index_boxes_on_owner_type_and_owner_id" | ||
94 | - | ||
95 | create_table "categories", :force => true do |t| | 91 | create_table "categories", :force => true do |t| |
96 | t.string "name" | 92 | t.string "name" |
97 | t.string "slug" | 93 | t.string "slug" |
@@ -169,17 +165,6 @@ ActiveRecord::Schema.define(:version => 46) do | @@ -169,17 +165,6 @@ ActiveRecord::Schema.define(:version => 46) do | ||
169 | t.integer "height" | 165 | t.integer "height" |
170 | end | 166 | end |
171 | 167 | ||
172 | - create_table "product_categorizations", :force => true do |t| | ||
173 | - t.integer "category_id" | ||
174 | - t.integer "product_id" | ||
175 | - t.boolean "virtual", :default => false | ||
176 | - t.datetime "created_at" | ||
177 | - t.datetime "updated_at" | ||
178 | - end | ||
179 | - | ||
180 | - add_index "product_categorizations", ["category_id"], :name => "index_product_categorizations_on_category_id" | ||
181 | - add_index "product_categorizations", ["product_id"], :name => "index_product_categorizations_on_product_id" | ||
182 | - | ||
183 | create_table "products", :force => true do |t| | 168 | create_table "products", :force => true do |t| |
184 | t.integer "enterprise_id" | 169 | t.integer "enterprise_id" |
185 | t.integer "product_category_id" | 170 | t.integer "product_category_id" |
@@ -193,8 +178,6 @@ ActiveRecord::Schema.define(:version => 46) do | @@ -193,8 +178,6 @@ ActiveRecord::Schema.define(:version => 46) do | ||
193 | t.float "lng" | 178 | t.float "lng" |
194 | end | 179 | end |
195 | 180 | ||
196 | - add_index "products", ["enterprise_id"], :name => "index_products_on_enterprise_id" | ||
197 | - | ||
198 | create_table "profiles", :force => true do |t| | 181 | create_table "profiles", :force => true do |t| |
199 | t.string "name" | 182 | t.string "name" |
200 | t.string "type" | 183 | t.string "type" |
@@ -214,8 +197,6 @@ ActiveRecord::Schema.define(:version => 46) do | @@ -214,8 +197,6 @@ ActiveRecord::Schema.define(:version => 46) do | ||
214 | t.boolean "enabled", :default => true | 197 | t.boolean "enabled", :default => true |
215 | end | 198 | end |
216 | 199 | ||
217 | - add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id" | ||
218 | - | ||
219 | create_table "region_validators", :id => false, :force => true do |t| | 200 | create_table "region_validators", :id => false, :force => true do |t| |
220 | t.integer "region_id" | 201 | t.integer "region_id" |
221 | t.integer "organization_id" | 202 | t.integer "organization_id" |
public/stylesheets/controller_search.css
@@ -57,12 +57,18 @@ | @@ -57,12 +57,18 @@ | ||
57 | display: block; | 57 | display: block; |
58 | } | 58 | } |
59 | 59 | ||
60 | +#product-categories-menu div { | ||
61 | + position: relative; | ||
62 | +} | ||
63 | + | ||
60 | #product-categories-menu ul { | 64 | #product-categories-menu ul { |
65 | + position: relative; | ||
61 | margin: 0px 0px 0px 20px; | 66 | margin: 0px 0px 0px 20px; |
62 | padding: 0px; | 67 | padding: 0px; |
63 | } | 68 | } |
64 | 69 | ||
65 | #product-categories-menu .cat-parent { | 70 | #product-categories-menu .cat-parent { |
71 | + position: relative; | ||
66 | font-weight: bold; | 72 | font-weight: bold; |
67 | margin: 2px 0px; | 73 | margin: 2px 0px; |
68 | padding: 5px 0px 0px 10px; | 74 | padding: 5px 0px 0px 10px; |
@@ -78,7 +84,7 @@ | @@ -78,7 +84,7 @@ | ||
78 | padding-bottom: 5px; | 84 | padding-bottom: 5px; |
79 | } | 85 | } |
80 | 86 | ||
81 | -#product-categories-menu .cat-parent li { | 87 | +#product-categories-menu .cat-parent li, |
82 | font-weight: normal; | 88 | font-weight: normal; |
83 | margin: 0px; | 89 | margin: 0px; |
84 | padding: 0px; | 90 | padding: 0px; |