Commit 431b4eb6261b1897c34d443633a9bb36dea71213
1 parent
4078ca33
Exists in
master
and in
24 other branches
Add custom catalog to categories and tags block
Signed-off-by: Omar Junior <omarroinuj@gmail.com> Signed-off-by: Pedro de Lyra <pedrodelyra@gmail.com> Signed-off-by: Tallys Martins <tallysmartins@yahoo.com.br>
Showing
3 changed files
with
9 additions
and
1 deletions
Show diff stats
src/noosfero-spb/software_communities/lib/categories_and_tags_block.rb
1 | 1 | class CategoriesAndTagsBlock < Block |
2 | 2 | |
3 | 3 | attr_accessible :show_name |
4 | + attr_accessible :search_catalog | |
4 | 5 | |
5 | 6 | settings_items :show_name, :type => :boolean, :default => false |
7 | + settings_items :search_catalog, :type => :string, :default => SearchController.catalog_list[:public_software].last | |
6 | 8 | |
7 | 9 | def self.description |
8 | 10 | _('Categories and Tags') | ... | ... |
src/noosfero-spb/software_communities/views/blocks/categories_and_tags.html.erb
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | |
4 | 4 | <div class="category_cloud"> |
5 | 5 | <% block.owner.categories.each do |category| %> |
6 | - <%= link_to category.name, {:controller => :search, :action => :software_infos, :selected_categories_id => [category.id], :software_type => 'all'}, :id => "select-category-1-link", :class => "select-subcategory-link", :target => "_blank" %> | |
6 | + <%= link_to category.name, {:controller => :search, :action => block.search_catalog, :selected_categories_id => [category.id], :software_type => 'all'}, :id => "select-category-1-link", :class => "select-subcategory-link", :target => "_blank" %> | |
7 | 7 | <% end %> |
8 | 8 | </div><!-- end class='category_cloud' --> |
9 | 9 | <% end %> | ... | ... |
src/noosfero-spb/software_communities/views/box_organizer/_categories_and_tags_block.html.erb
0 → 100644