Skip to content

Commit

Permalink
Fix scopes in results (#5022)
Browse files Browse the repository at this point in the history
#### 🎩 What? Why?

We should also show the scope from the participatory space, otherwise you can filter results by their children only.

#### 📋 Subtasks
- [x] Add `CHANGELOG` entry
  • Loading branch information
oriolgual authored and mrcasals committed Mar 28, 2019
1 parent 69a820f commit d2768e6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -5,6 +5,7 @@
**Added**:

- **decidim-participatory_processes**: Add a select field for assign an area to participatory processes [#5011](https://github.com/decidim/decidim/pull/5011)
- **decidim-accountability**: Also display the main scope as a filter for accountability results [#5022](https://github.com/decidim/decidim/pull/5022)

**Changed**:

Expand Down
Expand Up @@ -5,6 +5,11 @@
<ul class="tags tags--action">
<li <%= active_class_if_current(nil) %>><%= link_to t("results.filters.all", scope: "decidim.accountability"), url_for(filter: { category_id: category.try(:id) }) %></li>

<% if current_participatory_space.scope %>
<li <%= active_class_if_current(current_participatory_space.scope.id) %>>
<%= link_to translated_attribute(current_participatory_space.scope.name), url_for(filter: { scope_id: current_participatory_space.scope.id, category_id: category.try(:id) }) %>
</li>
<% end %>
<% current_participatory_space.subscopes.each do |scope| %>
<li <%= active_class_if_current(scope.id) %>><%= link_to translated_attribute(scope.name), url_for(filter: { scope_id: scope.id, category_id: category.try(:id) }) %></li>
<% end %>
Expand Down

0 comments on commit d2768e6

Please sign in to comment.