Commit 342ae8dfaace6ecdae62a6e280e8a1a182cfdeb5
Committed by
David Silva
1 parent
2d15d8cf
Exists in
master
and in
79 other branches
Remove unnecessary views and test
Signed-off-by: Gabriela Navarro <navarro1703@gmail.com> Signed-off-by: Luciano Prestes <lucianopcbr@gmail.com>
Showing
5 changed files
with
0 additions
and
131 deletions
Show diff stats
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
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> |