Commit 342ae8dfaace6ecdae62a6e280e8a1a182cfdeb5

Authored by Luciano Prestes
Committed by David Silva
1 parent 2d15d8cf
Exists in master and in 79 other branches add_sisp_to_chef, add_super_archives_plugin, api_for_colab, automates_core_packing, backup_not_prod, changes_in_buttons_on_content_panel, colab_automated_login, colab_spb_plugin_recipe, colab_widgets_settings, design_validation, dev_env_minimal, disable_email_dev, fix_breadcrumbs_position, fix_categories_software_link, fix_edit_institution, fix_edit_software_with_another_license, fix_get_license_info, fix_gitlab_assets_permission, fix_list_style_inside_article, fix_list_style_on_folder_elements, fix_members_pagination, fix_merge_request_url, fix_models_translations, fix_no_license, fix_software_api, fix_software_block_migration, fix_software_communities_translations, fix_software_communities_unit_test, fix_style_create_institution_admin_panel, fix_superarchives_imports, fix_sym_links_noosfero, focus_search_field_theme, gov-user-refactoring, gov-user-refactoring-rails4, header_fix, institution_modal_on_rating, kalibro-conf-refactoring, kalibro-processor-package, lxc_settings, margin_fix, mezuro_cookbook, prezento, refactor_download_block, refactor_software_communities, refactor_software_for_sisp, register_page, release-process, release-process-v2, remove-unused-images, remove_broken_theme, remove_secondary_email_from_user, remove_sisp_buttons, removing_super_archives_email, review_message, scope2method, signals_user_noosfero, sisp_catalog_header, sisp_colab_config, sisp_dev, sisp_dev_master, sisp_simple_version, software_as_organization, software_catalog_style_fix, software_communities_html_refactor, software_infos_api, spb_minimal_env, spb_to_rails4, spec_refactor, stable-4.1, stable-4.2, stable-4.x, temp_soft_comm_refactoring, theme_header, theme_javascript_refactory, thread_dropdown, thread_page, update_search_by_categories, update_software_api, update_softwares_boxes

Remove unnecessary views and test

Signed-off-by: Gabriela Navarro <navarro1703@gmail.com>
Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com>
test/unit/search_person_test.rb
@@ -1,53 +0,0 @@ @@ -1,53 +0,0 @@
1 -require File.dirname(__FILE__) + '/../../../../test/test_helper'  
2 -require File.dirname(__FILE__) + '/../helpers/plugin_test_helper'  
3 -  
4 -  
5 -class SearchPersonTest < ActiveSupport::TestCase  
6 - include PluginTestHelper  
7 - def setup  
8 - create_person("Jose_Augusto", "jose_augusto@email.com", "aaaaaaa", "aaaaaaa", "jose_silva@email.com", "DF", "Gama")  
9 - create_person("Maria_cunha", "maria_cunha@email.com", "aaaaaaa", "aaaaaaa", "maria_silva@email.com" , "RJ", "Rio de Janeiro")  
10 - create_person("Joao_da_silva_costa_cunha", "joao_da_silva_costa_cunha@email.com", "aaaaaaa", "aaaaaaa", "joao_cunha@email.com" ,"RJ", "Rio de Janeiro")  
11 - end  
12 -  
13 - def teardown  
14 - Person.destroy_all  
15 - end  
16 -  
17 - should "Find people with Jo in name" do  
18 - people_list = Person.search("Jo")  
19 -  
20 - assert_equal 2, people_list.count  
21 - end  
22 -  
23 - should "Find people with RJ in state" do  
24 - people_list = Person.search("", "RJ")  
25 -  
26 - assert_equal 2, people_list.count  
27 - end  
28 -  
29 - should "Find people with Gama in city" do  
30 - people_list = Person.search("", "", "Gama")  
31 -  
32 - assert_equal 1, people_list.count  
33 - end  
34 -  
35 - should "Find people with jose in email" do  
36 - people_list = Person.search("", "", "", "jose")  
37 -  
38 - assert_equal 1, people_list.count  
39 - end  
40 -  
41 - should "Find people with Jo in name and j in email" do  
42 - people_list = Person.search("Jo", "", "", "j")  
43 -  
44 - assert_equal 2, people_list.count  
45 - end  
46 -  
47 - should "Find people with Ma in name and email and RJ in state and Rio in city" do  
48 - people_list = Person.search("Ma", "RJ", "Rio", "ma")  
49 -  
50 - assert_equal 1, people_list.count  
51 - end  
52 -  
53 -end  
views/mpog_software_plugin/_index_buttons.html.erb
@@ -1,5 +0,0 @@ @@ -1,5 +0,0 @@
1 -<% button_bar do %>  
2 - <%= button :'text-plain', _('Software list as [CSV]'), :action => 'download.csv' %>  
3 - <%= button :'text-html', _('Software list as [XML]'), :action => 'download.xml' %>  
4 - <%= button :back, _('Back'), :controller => 'admin_panel' %>  
5 -<% end %>  
6 \ No newline at end of file 0 \ No newline at end of file
views/mpog_software_plugin/_software_list.html.erb
@@ -1,31 +0,0 @@ @@ -1,31 +0,0 @@
1 -<div class="environment-softwares-results-header">  
2 - <div style="clear: both"></div>  
3 -</div>  
4 -  
5 -<table>  
6 - <colgroup>  
7 - <col width="80%">  
8 - <col width="20%">  
9 - </colgroup>  
10 - <tr>  
11 - <th><%= _('Software') %></th>  
12 - <th><%= _('Actions') %></th>  
13 - </tr>  
14 - <% @collection.each do |s| %>  
15 - <tr title="<%= s.name %>">  
16 - <td><%= link_to_profile s.short_name, s.identifier, :title => s.name %> </td>  
17 - <td class='actions'>  
18 - <div class="members-buttons-cell">  
19 - <% if !s.visible? %>  
20 - <%= button_without_text :'activate-user', _('Activate Software'), {:action => 'activate', :id => s, :q => @q}, :filter => @filter, :confirm => _("Do you want to activate this software?") %>  
21 - <% else %>  
22 - <%= 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?") %>  
23 - <% end %>  
24 - <%= button_without_text :'delete', _('Remove'), {:action => :destroy_user, :id => s, :q => @q}, :method => :post, :filter => @filter, :confirm => _("Do you want to remove this software?") %>  
25 - </div>  
26 - </td>  
27 - </tr>  
28 - <% end %>  
29 -</table>  
30 -  
31 -<%= pagination_links @collection, {:param_name => 'npage', :page_links => true} %>  
views/mpog_software_plugin/_softwares_search_form.html.erb
@@ -1,6 +0,0 @@ @@ -1,6 +0,0 @@
1 -<div class="search-field">  
2 -<span class="formfield">  
3 - <%= text_field_tag 'q', @q, :title => _("Find software") %>  
4 -</span>  
5 -<%= submit_button(:search, _('Search')) %>  
6 -</div>  
7 \ No newline at end of file 0 \ No newline at end of file
views/search/search_community_filter.html.erb
@@ -1,36 +0,0 @@ @@ -1,36 +0,0 @@
1 -<form action="<%= Noosfero.root%>/search/communities" name="community_filter" method="get" class="search_form">  
2 - <div id="search_content">  
3 -  
4 - <div class="search_options">  
5 - <table class="mpog_search_form_table formfield type-radio search_type">  
6 - <tr>  
7 - <td>  
8 - <%= label_tag("type_Community", _("Community")) %>  
9 - <%= radio_button_tag(:type, "Community", (true if @active_type == "community")) %>  
10 - <%= label_tag("type_Software", _("Software")) %>  
11 - <%= radio_button_tag(:type, "Software", (true if @active_type == "software")) %>  
12 - <%= label_tag("type_Institution", _("Institution")) %>  
13 - <%= radio_button_tag(:type, "Institution", (true if @active_type == "institution")) %>  
14 - </td>  
15 - </tr>  
16 - </table>  
17 - </div>  
18 -  
19 - <div class="community_fields mpog_search_form_fields">  
20 - <%= expanded_template "search/search_forms/_community_fields.html.erb" %>  
21 - </div>  
22 -  
23 - <div class="software_fields mpog_search_form_fields">  
24 - <%= expanded_template "search/search_forms/_software_fields.html.erb" %>  
25 - </div>  
26 -  
27 - <div class="institution_fields mpog_search_form_fields">  
28 - <%= expanded_template "search/search_forms/_institution_fields.html.erb" %>  
29 - </div>  
30 -  
31 - <div class="mpog_search_form_button">  
32 - <%= submit_button(:search, _('Search')) %>  
33 - </div>  
34 - </div>  
35 -  
36 -</form>