Commit ae616f4df74b6e7bab644a725094ec3e49401939
Exists in
master
and in
2 other branches
Merge branch 'categories_filter_387' into 'master'
Categories filter 387 See merge request !18
Showing
2 changed files
with
7 additions
and
3 deletions
Show diff stats
lib/tasks/create_categories.rake
@@ -6,8 +6,12 @@ namespace :software do | @@ -6,8 +6,12 @@ namespace :software do | ||
6 | print 'Creating categories: ' | 6 | print 'Creating categories: ' |
7 | software = Category.create(:name => _("Software"), :environment => env) | 7 | software = Category.create(:name => _("Software"), :environment => env) |
8 | Category::SOFTWARE_CATEGORIES.each do |category_name| | 8 | Category::SOFTWARE_CATEGORIES.each do |category_name| |
9 | - print '.' | ||
10 | - Category.create(:name => category_name, :environment => env, :parent => software) | 9 | + unless Category.find_by_name(category_name) |
10 | + print '.' | ||
11 | + Category.create(:name => category_name, :environment => env, :parent => software) | ||
12 | + else | ||
13 | + print 'F' | ||
14 | + end | ||
11 | end | 15 | end |
12 | puts '' | 16 | puts '' |
13 | end | 17 | end |
views/search/_full_community.html.erb
@@ -36,7 +36,7 @@ | @@ -36,7 +36,7 @@ | ||
36 | :controller => :search, | 36 | :controller => :search, |
37 | :action => :software_infos, | 37 | :action => :software_infos, |
38 | :selected_categories_id => [category.id], | 38 | :selected_categories_id => [category.id], |
39 | - :include_non_public => !community.software_info.public_software? | 39 | + :software_type => params[:software_type] |
40 | } %> | 40 | } %> |
41 | </li> | 41 | </li> |
42 | <% end %> | 42 | <% end %> |