Skip to content

Commit

Permalink
fix: results count ui
Browse files Browse the repository at this point in the history
  • Loading branch information
hellodeloo committed Aug 23, 2024
1 parent 28b5c44 commit 2660408
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 16 deletions.
6 changes: 3 additions & 3 deletions itou/templates/apply/includes/list_counter.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load str_filters %}

<h3 class="h4 mb-0" id="apply-list-count"{% if request.htmx %} hx-swap-oob="true"{% endif %}>
<p class="mb-0" id="apply-list-count"{% if request.htmx %} hx-swap-oob="true"{% endif %}>
{% with job_applications_page.paginator.count as counter %}
{{ counter }} <strong>résultat{{ counter|pluralizefr }}</strong>
{{ counter }} résultat{{ counter|pluralizefr }}
{% endwith %}
</h3>
</p>
6 changes: 3 additions & 3 deletions itou/templates/approvals/includes/list_counter.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load str_filters %}

<h3 class="h4 mb-0" id="approvals-list-count"{% if request.htmx %} hx-swap-oob="true"{% endif %}>
{% with paginator.count as counter %}<strong>{{ counter }} résultat{{ counter|pluralizefr }}</strong>{% endwith %}
</h3>
<p class="mb-0" id="approvals-list-count"{% if request.htmx %} hx-swap-oob="true"{% endif %}>
{% with paginator.count as counter %}{{ counter }} résultat{{ counter|pluralizefr }}{% endwith %}
</p>
4 changes: 2 additions & 2 deletions itou/templates/employee_record/includes/list_counter.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% load str_filters %}

{% with navigation_pages.paginator.count as counter %}
<h3 class="h4 m-0 me-auto" id="employee-record-list-count"{% if request.htmx %} hx-swap-oob="true"{% endif %}>
<p class="m-0 me-auto" id="employee-record-list-count"{% if request.htmx %} hx-swap-oob="true"{% endif %}>
{{ counter }} résultat{{ counter|pluralizefr }}
</h3>
</p>
{% endwith %}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% load str_filters %}
<p class="mb-3 mb-md-4" id="prescribers-search-summary"{% if request.htmx %} hx-swap-oob="true"{% endif %}>
<strong>{{ prescriber_orgs_page.paginator.count }} résultat{{ prescriber_orgs_page.paginator.count|pluralizefr }}</strong>
{{ prescriber_orgs_page.paginator.count }} résultat{{ prescriber_orgs_page.paginator.count|pluralizefr }}
</p>
8 changes: 2 additions & 6 deletions itou/templates/search/includes/siaes_search_top.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
<div id="job-search-top"{% if request.htmx %} hx-swap-oob="true"{% endif %}>
{% if request.resolver_match.view_name == "search:employers_results" or job_app_to_transfer|default:False %}
<div class="d-flex flex-column flex-lg-row align-items-lg-center justify-content-lg-between mb-3 mb-md-4">
<p class="mb-0">
<strong>{{ siaes_count }} résultat{{ siaes_count|pluralizefr }}</strong>
</p>
<p class="mb-0">{{ siaes_count }} résultat{{ siaes_count|pluralizefr }}</p>
<div class="d-lg-flex">
{% if siaes_count %}
<div>
Expand Down Expand Up @@ -52,9 +50,7 @@ <h3 class="modal-title" id="companiesSortingTipModalLabel">Comment sont triés c
</div>
{% else %}
<div class="d-flex flex-column flex-md-row align-items-md-center justify-content-md-between mb-3 mb-md-4">
<p class="mb-0">
<strong>{{ job_descriptions_count }} résultat{{ job_descriptions_count|pluralizefr }}</strong>
</p>
<p class="mb-0">{{ job_descriptions_count }} résultat{{ job_descriptions_count|pluralizefr }}</p>
{% if job_descriptions_count %}
<button class="btn btn-ico btn-link text-nowrap" data-bs-toggle="modal" data-bs-target="#jobDescriptionsSortingTipModal">
<i class="ri-information-line font-weight-medium" aria-hidden="true"></i>
Expand Down
2 changes: 1 addition & 1 deletion tests/www/apply/test_process_external_transfer.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def test_step_1(client, snapshot):
# search is centered on job app company city : only vannes companies should be displayed
assertContains(
response,
'<p class="mb-0"><strong>2 résultats</strong></p>',
'<p class="mb-0">2 résultats</p>',
html=True,
count=1,
)
Expand Down

0 comments on commit 2660408

Please sign in to comment.