forked from decidim/decidim
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve navigation and filters in proposals (decidim#13004)
* Store filters selections in session and allow removing all filters * Implement next and prev links from proposal show * Inspect session * Use with_indifferent_access with session admin_filters * Revert "Inspect session" This reverts commit 495a33b. * Refactor adjacents navigation links * Use spans and adjust margins * Fix wrong spelling * Fix spelling * Ensure the session filtered collection query returns an id * style filters bar * better space handling for containers * Add tests * Change remove all filters text * Remove font-normal class remove all filters tag * Fix expected text in tests * Add comment to adjacent_items method * Move method call to before_action filter * Define index method explicitly in controller * Change translation Co-authored-by: Andrés Pereira de Lucena <[email protected]> * Remove unnecessary method call Co-authored-by: Andrés Pereira de Lucena <[email protected]> --------- Co-authored-by: Hugoren Martinako <[email protected]> Co-authored-by: Andrés Pereira de Lucena <[email protected]> (cherry picked from commit 49bd028)
- Loading branch information
1 parent
334f82d
commit aa909c2
Showing
10 changed files
with
239 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -107,7 +107,7 @@ | |
} | ||
|
||
.fcell .label { | ||
@apply p-2 mb-2; | ||
@apply p-2; | ||
} | ||
|
||
.card-section-draggable-list { | ||
|
30 changes: 30 additions & 0 deletions
30
decidim-admin/app/views/decidim/admin/shared/_adjacent_navigation.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,30 @@ | ||
<% adjacent_paths ||= {} %> | ||
<div class="flex justify-between mb-4"> | ||
<span> | ||
<% if adjacent_paths["prev_item"].present? %> | ||
<%= link_to( | ||
adjacent_paths["prev_item"], | ||
class: "button button__sm button__text-secondary", | ||
title: t("previous_title", scope: "decidim.admin.shared.adjacent_navigation"), | ||
rel: "prev" | ||
) do %> | ||
<%= icon "arrow-left-s-line", class: "fill-current" %> | ||
<%= t("previous", scope: "decidim.admin.shared.adjacent_navigation") %> | ||
<% end %> | ||
<% end %> | ||
</span> | ||
|
||
<span> | ||
<% if adjacent_paths["next_item"].present? %> | ||
<%= link_to( | ||
adjacent_paths["next_item"], | ||
class: "button button__sm button__text-secondary", | ||
title: t("next_title", scope: "decidim.admin.shared.adjacent_navigation"), | ||
rel: "next" | ||
) do %> | ||
<%= t("next", scope: "decidim.admin.shared.adjacent_navigation") %> | ||
<%= icon "arrow-right-s-line", class: "fill-current" %> | ||
<% end %> | ||
<% end %> | ||
</span> | ||
</div> |
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
1 change: 1 addition & 0 deletions
1
decidim-proposals/app/views/decidim/proposals/admin/proposals/show.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
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