diff --git a/app/controllers/public/category_controller.rb b/app/controllers/public/category_controller.rb index ab01362..802a926 100644 --- a/app/controllers/public/category_controller.rb +++ b/app/controllers/public/category_controller.rb @@ -2,12 +2,11 @@ class CategoryController < ApplicationController before_filter :load_default_enviroment - #FIXME This is not necessary because the application controller define the envrioment # as the default holder - + design :holder => 'environment' - + def load_default_enviroment @environment = Environment.default end @@ -26,11 +25,12 @@ class CategoryController < ApplicationController send(@category.class.name.underscore.to_sym) # TODO: load articles, documents, etc so the view can list them. end - + protected def product_category @products = @category.all_products @enterprises = Enterprise.find(:all, :conditions => ['products.id in (?)', @products.map(&:id)], :include => :products) + @users = Profile.find(:all, :conditions => ['consumptions.product_category_id = (?)',@category.id], :include => :consumptions) end def category diff --git a/app/controllers/public/search_controller.rb b/app/controllers/public/search_controller.rb index 7407133..603f292 100644 --- a/app/controllers/public/search_controller.rb +++ b/app/controllers/public/search_controller.rb @@ -51,4 +51,8 @@ class SearchController < ApplicationController @tagged = @tag.taggings.map(&:taggable) end + def advanced_search + + end + end diff --git a/app/views/category/_product_category.rhtml b/app/views/category/_product_category.rhtml index 8c6ee8d..01dc200 100644 --- a/app/views/category/_product_category.rhtml +++ b/app/views/category/_product_category.rhtml @@ -1,9 +1,11 @@ -<%= link_to(_('I consume this'), {:profile => current_user.login, :controller => 'consumed_products', :action => 'new', 'consumption[product_category_id]' => @category.id }, :method => :post) %> +<%= link_to(_('I consume this'), {:profile => current_user.login, :controller => 'consumed_products', :action => 'new', 'consumption[product_category_id]' => @category.id }, :method => :post) if logged_in? %>
+ <%= image_tag u.image.public_filename(:thumb) if u.image %>
+ <%= link_to_homepage(u.name, u.identifier) %>
+