-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1211 from City-of-Helsinki/UHF-9568
UHF-9568: Added reusable template for unit search views
- Loading branch information
Showing
7 changed files
with
74 additions
and
98 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{% | ||
set classes = [ | ||
'views', | ||
'views--' ~ id|clean_class, | ||
'views--' ~ display_id|clean_class, | ||
dom_id ? 'js-view-dom-id-' ~ dom_id, | ||
'unit-search__content' | ||
] | ||
%} | ||
|
||
{% if modifier_class %} | ||
{% set classes = classes|merge(modifier_class) %} | ||
{% endif %} | ||
|
||
<div{{ attributes.addClass(classes) }}> | ||
{{ title_prefix }} | ||
{{ title }} | ||
{{ title_suffix }} | ||
|
||
{% if header %} | ||
<header> | ||
{{ header }} | ||
</header> | ||
{% endif %} | ||
|
||
{{ exposed }} | ||
{{ attachment_before }} | ||
|
||
<div class="unit-search__results" data-id-number="{{ dom_id }}"> | ||
<h3 class="unit-search__count-container"> | ||
{% block count_container%} | ||
{%- if total_rows -%} | ||
{{ total_rows }} {% trans with {'context': 'Unit search count'} %}result{% plural total_rows %}results{% endtrans %} | ||
{%- else -%} | ||
{{ 'No results'|t({}, {'context' : 'Unit search no results title'}) }} | ||
{%- endif -%} | ||
{% endblock %} | ||
</h3> | ||
|
||
{%- if empty -%} | ||
<p>{{ 'No results were found for the criteria you entered. Try changing your search criteria.'|t({}, {'context' : 'Unit search no results text'}) }}</p> | ||
{%- endif -%} | ||
|
||
{{ rows }} | ||
{{ pager }} | ||
</div> | ||
{{ attachment_after }} | ||
{{ more }} | ||
|
||
{% if footer %} | ||
<footer> | ||
{{ footer }} | ||
</footer> | ||
{% endif %} | ||
|
||
{{ feed_icons }} | ||
</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