From 342ae8dfaace6ecdae62a6e280e8a1a182cfdeb5 Mon Sep 17 00:00:00 2001 From: Luciano Date: Tue, 16 Dec 2014 16:16:17 -0200 Subject: [PATCH] Remove unnecessary views and test --- test/unit/search_person_test.rb | 53 ----------------------------------------------------- views/mpog_software_plugin/_index_buttons.html.erb | 5 ----- views/mpog_software_plugin/_software_list.html.erb | 31 ------------------------------- views/mpog_software_plugin/_softwares_search_form.html.erb | 6 ------ views/search/search_community_filter.html.erb | 36 ------------------------------------ 5 files changed, 0 insertions(+), 131 deletions(-) delete mode 100644 test/unit/search_person_test.rb delete mode 100644 views/mpog_software_plugin/_index_buttons.html.erb delete mode 100644 views/mpog_software_plugin/_software_list.html.erb delete mode 100644 views/mpog_software_plugin/_softwares_search_form.html.erb delete mode 100644 views/search/search_community_filter.html.erb diff --git a/test/unit/search_person_test.rb b/test/unit/search_person_test.rb deleted file mode 100644 index 0f12abc..0000000 --- a/test/unit/search_person_test.rb +++ /dev/null @@ -1,53 +0,0 @@ -require File.dirname(__FILE__) + '/../../../../test/test_helper' -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper' - - -class SearchPersonTest < ActiveSupport::TestCase - include PluginTestHelper - def setup - create_person("Jose_Augusto", "jose_augusto@email.com", "aaaaaaa", "aaaaaaa", "jose_silva@email.com", "DF", "Gama") - create_person("Maria_cunha", "maria_cunha@email.com", "aaaaaaa", "aaaaaaa", "maria_silva@email.com" , "RJ", "Rio de Janeiro") - create_person("Joao_da_silva_costa_cunha", "joao_da_silva_costa_cunha@email.com", "aaaaaaa", "aaaaaaa", "joao_cunha@email.com" ,"RJ", "Rio de Janeiro") - end - - def teardown - Person.destroy_all - end - - should "Find people with Jo in name" do - people_list = Person.search("Jo") - - assert_equal 2, people_list.count - end - - should "Find people with RJ in state" do - people_list = Person.search("", "RJ") - - assert_equal 2, people_list.count - end - - should "Find people with Gama in city" do - people_list = Person.search("", "", "Gama") - - assert_equal 1, people_list.count - end - - should "Find people with jose in email" do - people_list = Person.search("", "", "", "jose") - - assert_equal 1, people_list.count - end - - should "Find people with Jo in name and j in email" do - people_list = Person.search("Jo", "", "", "j") - - assert_equal 2, people_list.count - end - - should "Find people with Ma in name and email and RJ in state and Rio in city" do - people_list = Person.search("Ma", "RJ", "Rio", "ma") - - assert_equal 1, people_list.count - end - -end diff --git a/views/mpog_software_plugin/_index_buttons.html.erb b/views/mpog_software_plugin/_index_buttons.html.erb deleted file mode 100644 index 899cdf7..0000000 --- a/views/mpog_software_plugin/_index_buttons.html.erb +++ /dev/null @@ -1,5 +0,0 @@ -<% button_bar do %> - <%= button :'text-plain', _('Software list as [CSV]'), :action => 'download.csv' %> - <%= button :'text-html', _('Software list as [XML]'), :action => 'download.xml' %> - <%= button :back, _('Back'), :controller => 'admin_panel' %> -<% end %> \ No newline at end of file diff --git a/views/mpog_software_plugin/_software_list.html.erb b/views/mpog_software_plugin/_software_list.html.erb deleted file mode 100644 index 6bfa0c7..0000000 --- a/views/mpog_software_plugin/_software_list.html.erb +++ /dev/null @@ -1,31 +0,0 @@ -
-
-
- - - - - - - - - - - <% @collection.each do |s| %> - - - - - <% end %> -
<%= _('Software') %><%= _('Actions') %>
<%= link_to_profile s.short_name, s.identifier, :title => s.name %> -
- <% if !s.visible? %> - <%= button_without_text :'activate-user', _('Activate Software'), {:action => 'activate', :id => s, :q => @q}, :filter => @filter, :confirm => _("Do you want to activate this software?") %> - <% else %> - <%= button_without_text :'deactivate-user', _('Deactivate software'), {:action => 'deactivate', :id => s, :q => @q,:from_profile => false}, :filter => @filter, :confirm => _("Do you want to deactivate this software?") %> - <% end %> - <%= button_without_text :'delete', _('Remove'), {:action => :destroy_user, :id => s, :q => @q}, :method => :post, :filter => @filter, :confirm => _("Do you want to remove this software?") %> -
-
- -<%= pagination_links @collection, {:param_name => 'npage', :page_links => true} %> diff --git a/views/mpog_software_plugin/_softwares_search_form.html.erb b/views/mpog_software_plugin/_softwares_search_form.html.erb deleted file mode 100644 index be5d8ec..0000000 --- a/views/mpog_software_plugin/_softwares_search_form.html.erb +++ /dev/null @@ -1,6 +0,0 @@ -
- - <%= text_field_tag 'q', @q, :title => _("Find software") %> - -<%= submit_button(:search, _('Search')) %> -
\ No newline at end of file diff --git a/views/search/search_community_filter.html.erb b/views/search/search_community_filter.html.erb deleted file mode 100644 index faefb28..0000000 --- a/views/search/search_community_filter.html.erb +++ /dev/null @@ -1,36 +0,0 @@ -
-
- -
- - - - -
- <%= label_tag("type_Community", _("Community")) %> - <%= radio_button_tag(:type, "Community", (true if @active_type == "community")) %> - <%= label_tag("type_Software", _("Software")) %> - <%= radio_button_tag(:type, "Software", (true if @active_type == "software")) %> - <%= label_tag("type_Institution", _("Institution")) %> - <%= radio_button_tag(:type, "Institution", (true if @active_type == "institution")) %> -
-
- -
- <%= expanded_template "search/search_forms/_community_fields.html.erb" %> -
- -
- <%= expanded_template "search/search_forms/_software_fields.html.erb" %> -
- -
- <%= expanded_template "search/search_forms/_institution_fields.html.erb" %> -
- -
- <%= submit_button(:search, _('Search')) %> -
-
- -
-- libgit2 0.21.2