diff --git a/lib/ext/category.rb b/lib/ext/category.rb
index dcc9aff..0c3008c 100644
--- a/lib/ext/category.rb
+++ b/lib/ext/category.rb
@@ -14,9 +14,19 @@ class Category
_('Education'),
_('Government and Politics'),
_('Justice and Legislation'),
- _('International Relationships')
+ _('International Relationships'),
+ _('Transportation and Transit')
]
+ scope :software_categories, lambda {
+ software_category = Category.find_by_name("Software")
+ if software_category.nil?
+ []
+ else
+ software_category.children
+ end
+ }
+
def software_infos
software_list = self.communities
software_list.collect { |x| software_list.delete(x) unless x.software? }
diff --git a/lib/ext/search_controller.rb b/lib/ext/search_controller.rb
index 4881f2a..0e62b7b 100644
--- a/lib/ext/search_controller.rb
+++ b/lib/ext/search_controller.rb
@@ -78,7 +78,7 @@ class SearchController
def prepare_software_search_page
@titles[:software_infos] = _("Public Software Catalog")
@category_filters = []
- @categories = Category.all
+ @categories = Category.software_categories
@selected_categories = params[:selected_categories]
@selected_categories ||= []
@selected_categories = @selected_categories.map(&:to_i)
diff --git a/views/search/_catalog_filter.html.erb b/views/search/_catalog_filter.html.erb
index 012562f..c1e78ad 100644
--- a/views/search/_catalog_filter.html.erb
+++ b/views/search/_catalog_filter.html.erb
@@ -26,6 +26,7 @@
<%= _("#{category.name}") %>
<% end %>
+
--
libgit2 0.21.2