diff --git a/lib/controlled_vocabulary_helper.rb b/lib/controlled_vocabulary_helper.rb new file mode 100644 index 0000000..e17a6a3 --- /dev/null +++ b/lib/controlled_vocabulary_helper.rb @@ -0,0 +1,14 @@ +module ControlledVocabularyHelper + + def self.get_categories_as_options + categories = [] + + ControlledVocabulary.attribute_names.each do |attribute| + if attribute.to_s != "id" && attribute.to_s != "software_info_id" then + categories << "".html_safe + end + end + + categories + end +end diff --git a/lib/mpog_software_plugin.rb b/lib/mpog_software_plugin.rb index d848767..9bc57bd 100644 --- a/lib/mpog_software_plugin.rb +++ b/lib/mpog_software_plugin.rb @@ -325,10 +325,10 @@ class MpogSoftwarePlugin < Noosfero::Plugin end end - def add_new_search_filter type - if type == "People" + def add_new_search_filter + if context.params[:action] == "people" expanded_template('search/search_user_filter.html.erb') - else type == "Community" + else context.params[:action] == "communities" expanded_template('search/search_community_filter.html.erb') end end diff --git a/public/style.css b/public/style.css index 2ba04b8..bf14f0c 100644 --- a/public/style.css +++ b/public/style.css @@ -77,28 +77,25 @@ height: auto; } -.user_filter_options { +.mpog_search_form_fields { + margin-top: 10px; width: 80%; height: auto; position: relative; float: left; } -.user_filter_options input[type='text'] { - width: 78%; - +.mpog_search_form_button { + margin-top: 10px; } -.user_filter_actions { - width: 18 %; - height: auto; - position: relative; - float: right; - text-align: right; +.mpog_search_form_fields input[type='text'] { + width: 90%; + } -.search-table tr td:first-child { - width: 40px; +.mpog_search_form_table tr td:first-child { + width: 22%; } .formfieldline { diff --git a/views/search/search_community_filter.html.erb b/views/search/search_community_filter.html.erb index abd5cbd..1d15a85 100644 --- a/views/search/search_community_filter.html.erb +++ b/views/search/search_community_filter.html.erb @@ -1,8 +1,8 @@