-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to the result listing and result view
- Align the filter form with the rest of the layout - Add number of results to the listing view - Small styling fixes
- Loading branch information
Showing
8 changed files
with
56 additions
and
50 deletions.
There are no files selected for viewing
48 changes: 15 additions & 33 deletions
48
app/views/decidim/accountability/results/_filters.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 |
---|---|---|
@@ -1,54 +1,36 @@ | ||
<%= filter_form_for filter do |form| %> | ||
<div class="row columns show-for-medium"> | ||
<div class="filters__section filters__section--title"> | ||
<div class="row"> | ||
<div class="columns mediumlarge-6 large-8"> | ||
<h3><%= t(".title") %></h3> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<%= filter_form_for filter, results_path, "aria-label": t(".label") do |form| %> | ||
<div class="row medium-unstack"> | ||
<div class="columns mediumlarge-6 large-4"> | ||
<div class="filters__section text_filter"> | ||
<fieldset> | ||
<legend class="mini-title"><%= t(".search") %></legend> | ||
<%= form.search_field :search_text_cont, label: false, placeholder: t(".search"), title: t(".search"), "aria-label": t(".search"), data: { disable_dynamic_change: true } %> | ||
</fieldset> | ||
<div class="columns"> | ||
<div class="filters__control text_filter"> | ||
<%= form.search_field :search_text_cont, label: t(".term"), placeholder: t(".term"), data: { disable_dynamic_change: true } %> | ||
</div> | ||
</div> | ||
|
||
<% if current_participatory_space.has_subscopes? %> | ||
<div class="columns mediumlarge-6 large-4 <%= " end" if !current_component.categories.any? %>"> | ||
<div class="filters__section with_scope_filter"> | ||
<fieldset> | ||
<legend class="mini-title"><%= t(".scope") %></legend> | ||
<% scopes = current_component.scope&.children || current_participatory_space.scope&.children || current_organization.scopes.top_level %> | ||
<%= form.select(:with_scope, scope_picker_options(scopes, form.object.send(:with_scope)), { label: false, include_blank: t("forms.scopes_picker.prompt", item_name: t(".scope").downcase) }, "aria-label": t(".scope"), data: { disable_dynamic_change: true }) %> | ||
</fieldset> | ||
<div class="columns"> | ||
<div class="filters__control with_scope_filter"> | ||
<% scopes = current_component.scope&.children || current_participatory_space.scope&.children || current_organization.scopes.top_level %> | ||
<%= form.select(:with_scope, scope_picker_options(scopes, form.object.send(:with_scope)), { label: t(".scope"), include_blank: t(".scopes_values.all", item_name: t(".scope").downcase) }, data: { disable_dynamic_change: true }) %> | ||
</div> | ||
</div> | ||
<% end %> | ||
|
||
<% if current_component.categories.any? %> | ||
<div class="columns mediumlarge-6 large-4 end"> | ||
<div class="filters__section with_category_filter"> | ||
<fieldset> | ||
<legend class="mini-title"><%= t(".category") %></legend> | ||
<%= form.select(:with_category, filter_categories_values, { label: false, include_blank: t(".category_prompt") }, "aria-label": t(".category"), data: { disable_dynamic_change: true }) %> | ||
</fieldset> | ||
<div class="columns"> | ||
<div class="filters__control category_id_filter"> | ||
<%= form.select(:with_category, filter_categories_values, { label: t(".category"), include_blank: t(".categories_values.all") }, data: { disable_dynamic_change: true }) %> | ||
</div> | ||
</div> | ||
<% end %> | ||
</div> | ||
|
||
<div class="row columns"> | ||
<div class="filters__section"> | ||
<button type="submit" class="button primary" aria-label="<%= t(".search") %>" aria-controls="projects-count projects" data-close> | ||
<div class="filters__actions"> | ||
<button type="submit" class="button button--icon" aria-label="<%= t(".search") %>" aria-controls="results-count results" data-close> | ||
<%= t(".search") %> | ||
<%= icon("magnifying-glass", role: "img", "aria-hidden": true) %> | ||
</button> | ||
<button type="reset" class="button clear"><%= t ".reset" %></button> | ||
<button type="reset" class="button clear text-lg"><%= t ".reset" %></button> | ||
</div> | ||
</div> | ||
<% end %> |
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
app/views/decidim/accountability_simple/shared/_results_count.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 @@ | ||
<p class="lead"><%= heading_parent_level_results(results.total_count) %></p> |
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