Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix assemblies filter by type (#4778)
* Move code parent assemblies from index to partial * Refactor filtered assemblies query * Refactor filter assemblies helper and partial * Change tests * Add CHANGELOG entry
- Loading branch information
Showing
11 changed files
with
63 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
decidim-assemblies/app/views/decidim/assemblies/assemblies/_parent_assemblies.html.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<section id="parent-assemblies" class="section row collapse"> | ||
<div class="row column"> | ||
<div class="flex--sbe"> | ||
<h2 id="assemblies-count" class="section-heading collapse"> | ||
<%= render partial: "count" %> | ||
</h2> | ||
<%= render partial: "decidim/assemblies/filter_by_type" %> | ||
</div> | ||
<hr class="reset mt-s mb-s" /> | ||
</div> | ||
<div class="row small-up-1 medium-up-2 large-up-3 card-grid"> | ||
<%= render(collection) %> | ||
</div> | ||
</section> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 3 additions & 1 deletion
4
decidim-assemblies/app/views/decidim/assemblies/assemblies/index.js.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
var $grid = $('#assemblies-grid'); | ||
var $grid = $('#parent-assemblies'); | ||
var $assembliesCount = $('#assemblies-count'); | ||
var $assembliesFilter = $('#assemblies-filter'); | ||
|
||
$grid.find('.card-grid').html('<%= j(render(collection)).strip.html_safe %>'); | ||
$assembliesCount.html('<%= j(render partial: "count").strip.html_safe %>'); | ||
$assembliesFilter.html('<%= j(render partial: "decidim/assemblies/filter_by_type") %>'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters