Commit e4cf222cf9e4da666afea3c239640db9c2215023

Authored by AntonioTerceiro
1 parent f00650b1

ActionItem405: recent comments is still needed


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1913 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/models/category_finder.rb
@@ -56,6 +56,8 @@ class CategoryFinder @@ -56,6 +56,8 @@ class CategoryFinder
56 56
57 def options_for_find(klass, options={}) 57 def options_for_find(klass, options={})
58 case klass.name 58 case klass.name
  59 + when 'Comment'
  60 + {:select => 'distinct comments.*', :joins => 'inner join articles_categories on articles_categories.article_id = comments.article_id', :conditions => ['articles_categories.category_id in (?)', category_ids]}.merge!(options)
59 when 'Product' 61 when 'Product'
60 {:select => 'distinct products.*', :joins => 'inner join categories_profiles on products.enterprise_id = categories_profiles.profile_id', :conditions => ['categories_profiles.category_id in (?)', category_ids]}.merge!(options) 62 {:select => 'distinct products.*', :joins => 'inner join categories_profiles on products.enterprise_id = categories_profiles.profile_id', :conditions => ['categories_profiles.category_id in (?)', category_ids]}.merge!(options)
61 when 'Article', 'Person', 'Community', 'Enterprise', 'Event' 63 when 'Article', 'Person', 'Community', 'Enterprise', 'Event'
app/views/search/_directory.rhtml
1 <div class="search-index"> 1 <div class="search-index">
2 - <%= link_to_unless_current(_('Recent'), :action => 'index') %> 2 + <%= link_to_unless_current(_('Recent'), :action => 'assets') %>
3 &nbsp; 3 &nbsp;
4 <%= (?a..?z).map { |initial| link_to_unless_current(('' << initial).upcase, :action => 'directory', :asset => @asset, :initial => ('' << initial)) }.join(' &nbsp; ') %> 4 <%= (?a..?z).map { |initial| link_to_unless_current(('' << initial).upcase, :action => 'directory', :asset => @asset, :initial => ('' << initial)) }.join(' &nbsp; ') %>
5 </div> 5 </div>