Commit 4e87412ce9ab33c4d4ce1a4daec4cff1916f641f

Authored by AurelioAHeckert
1 parent cce5575b

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
app/views/search/_display_results.rhtml
... ... @@ -25,13 +25,17 @@
25 25 <% end %>
26 26 <% partial = partial_for_class results.first.class %>
27 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 39 </div><!-- end class="search-results-innerbox" -->
36 40 </div><!-- end class="search-results-<%= name %>" -->
37 41 <% else %>
... ...
db/schema.rb
... ... @@ -9,7 +9,7 @@
9 9 #
10 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 14 create_table "article_versions", :force => true do |t|
15 15 t.integer "article_id"
... ... @@ -82,16 +82,12 @@ ActiveRecord::Schema.define(:version =&gt; 46) do
82 82 t.integer "position"
83 83 end
84 84  
85   - add_index "blocks", ["box_id"], :name => "index_blocks_on_box_id"
86   -
87 85 create_table "boxes", :force => true do |t|
88 86 t.string "owner_type"
89 87 t.integer "owner_id"
90 88 t.integer "position"
91 89 end
92 90  
93   - add_index "boxes", ["owner_type", "owner_id"], :name => "index_boxes_on_owner_type_and_owner_id"
94   -
95 91 create_table "categories", :force => true do |t|
96 92 t.string "name"
97 93 t.string "slug"
... ... @@ -169,17 +165,6 @@ ActiveRecord::Schema.define(:version =&gt; 46) do
169 165 t.integer "height"
170 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 168 create_table "products", :force => true do |t|
184 169 t.integer "enterprise_id"
185 170 t.integer "product_category_id"
... ... @@ -193,8 +178,6 @@ ActiveRecord::Schema.define(:version =&gt; 46) do
193 178 t.float "lng"
194 179 end
195 180  
196   - add_index "products", ["enterprise_id"], :name => "index_products_on_enterprise_id"
197   -
198 181 create_table "profiles", :force => true do |t|
199 182 t.string "name"
200 183 t.string "type"
... ... @@ -214,8 +197,6 @@ ActiveRecord::Schema.define(:version =&gt; 46) do
214 197 t.boolean "enabled", :default => true
215 198 end
216 199  
217   - add_index "profiles", ["environment_id"], :name => "index_profiles_on_environment_id"
218   -
219 200 create_table "region_validators", :id => false, :force => true do |t|
220 201 t.integer "region_id"
221 202 t.integer "organization_id"
... ...
public/stylesheets/controller_search.css
... ... @@ -57,12 +57,18 @@
57 57 display: block;
58 58 }
59 59  
  60 +#product-categories-menu div {
  61 + position: relative;
  62 +}
  63 +
60 64 #product-categories-menu ul {
  65 + position: relative;
61 66 margin: 0px 0px 0px 20px;
62 67 padding: 0px;
63 68 }
64 69  
65 70 #product-categories-menu .cat-parent {
  71 + position: relative;
66 72 font-weight: bold;
67 73 margin: 2px 0px;
68 74 padding: 5px 0px 0px 10px;
... ... @@ -78,7 +84,7 @@
78 84 padding-bottom: 5px;
79 85 }
80 86  
81   -#product-categories-menu .cat-parent li {
  87 +#product-categories-menu .cat-parent li,
82 88 font-weight: normal;
83 89 margin: 0px;
84 90 padding: 0px;
... ...