Skip to content

Commit

Permalink
Merge pull request #8639 from cfpb/ans_pagination_order
Browse files Browse the repository at this point in the history
Pagination: Swap order of buttons
  • Loading branch information
anselmbradford authored Nov 14, 2024
2 parents b831739 + 85a9b11 commit 332a8b7
Showing 1 changed file with 17 additions and 14 deletions.
31 changes: 17 additions & 14 deletions cfgov/v1/jinja2/v1/includes/molecules/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
<nav class="m-pagination"
role="navigation"
aria-label="{{ _('Pagination') }}">

{%- if current_page > 1 %}
<a class="a-btn
m-pagination__btn-prev"
Expand All @@ -45,20 +46,7 @@
{{- svg_icon('left') -}}
<span>{{ _('Previous') }}</span>
</a>
{%- if current_page < total_pages %}
<a class="a-btn
m-pagination__btn-next"
href="?page={{ (current_page + 1) ~
url_parameters(request.GET) ~
fragment_id }}">
{%- else %}
<a class="a-btn
a-btn--disabled
m-pagination__btn-next">
{% endif -%}
<span>{{ _('Next') }}</span>
{{- svg_icon('right') -}}
</a>

<form class="m-pagination__form" action="{{ fragment_id }}">
{% for (key, value_as_list) in request.GET.lists() %}
{% for list_item in value_as_list %}
Expand Down Expand Up @@ -92,6 +80,21 @@
{{ _('Go') }}
</button>
</form>

{%- if current_page < total_pages %}
<a class="a-btn
m-pagination__btn-next"
href="?page={{ (current_page + 1) ~
url_parameters(request.GET) ~
fragment_id }}">
{%- else %}
<a class="a-btn
a-btn--disabled
m-pagination__btn-next">
{% endif -%}
<span>{{ _('Next') }}</span>
{{- svg_icon('right') -}}
</a>
</nav>
{% endif %}
{% endmacro %}

0 comments on commit 332a8b7

Please sign in to comment.