Commit 068e891e3a14725d3dff30b0b07019d387e32fdb
Exists in
master
and in
40 other branches
Merge branch 'fix_categories_and_tags_block' into 'master'
Fix categories and tags block Arrumado o link das categorias no bloco "categories_and_tags" do plugin software_communities ISSUE: https://softwarepublico.gov.br/gitlab/softwarepublico/softwarepublico/issues/618 See merge request !121
Showing
2 changed files
with
37 additions
and
2 deletions
Show diff stats
src/noosfero-spb/software_communities/features/categories_and_tags_block.feature
0 → 100644
... | ... | @@ -0,0 +1,35 @@ |
1 | +Feature: go to software search when click on category | |
2 | + As a user | |
3 | + I want to select a category | |
4 | + to see the softwares with the same category | |
5 | + | |
6 | + Background: | |
7 | + Given "SoftwareCommunitiesPlugin" plugin is enabled | |
8 | + And I am logged in as mpog_admin | |
9 | + And I go to /admin/plugins | |
10 | + And I check "SoftwareCommunitiesPlugin" | |
11 | + And I press "Save changes" | |
12 | + And the following categories | |
13 | + | name | display_in_menu | | |
14 | + | Software | true | | |
15 | + And the following categories | |
16 | + | parent | name | display_in_menu | | |
17 | + | Software | Health | true | | |
18 | + | Software | Education | true | | |
19 | + And the following softwares | |
20 | + | name | public_software | categories | finality | | |
21 | + | Software One | true | Health | some finality | | |
22 | + | Software Two | true | Health, Education | some finality | | |
23 | + | Software Three | false | Education | some finality | | |
24 | + | |
25 | + Scenario: Search softwares by education category | |
26 | + Given I am logged in as mpog_admin | |
27 | + And I go to software-three's control panel | |
28 | + And I follow "Edit sideboxes" | |
29 | + And I follow "Add a block" | |
30 | + And I choose "Categories and Tags" | |
31 | + And I press "Add" | |
32 | + And I go to /software-three | |
33 | + When I follow "Education" | |
34 | + Then I should see "Software Two" | |
35 | + And I should see "Software Three" | ... | ... |
src/noosfero-spb/software_communities/views/blocks/categories_and_tags.html.erb
... | ... | @@ -3,7 +3,7 @@ |
3 | 3 | |
4 | 4 | <div class="category_cloud"> |
5 | 5 | <% block.owner.categories.each do |category| %> |
6 | - <%= link_to category.name , category.path, :id => "select-category-1-link", :class => "select-subcategory-link", :target => "_blank" %> | |
6 | + <%= link_to category.name, {:controller => :search, :action => :software_infos, :selected_categories_id => [category.id], :software_type => 'all'}, :id => "select-category-1-link", :class => "select-subcategory-link", :target => "_blank" %> | |
7 | 7 | <% end %> |
8 | 8 | </div><!-- end class='category_cloud' --> |
9 | 9 | <% end %> |
... | ... | @@ -16,4 +16,4 @@ |
16 | 16 | <%= link_to tag , "#", :id => "select-category-1-link", :class => "select-subcategory-link"%> |
17 | 17 | <% end %> |
18 | 18 | </div> |
19 | -<% end %> | |
20 | 19 | \ No newline at end of file |
20 | +<% end %> | ... | ... |