Skip to content
Snippets Groups Projects
Unverified Commit 62143401 authored by Alexis BENOIT's avatar Alexis BENOIT Committed by GitHub
Browse files

Hotfix : fermeture du tag de pagination (#802)

parent 195c00aa
No related branches found
No related tags found
No related merge requests found
......@@ -14,93 +14,93 @@
<!-- If there's more than one page. -->
{{- if gt $paginator.TotalPages 1 -}}
<nav aria-label="{{ i18n "commons.pagination.label" }}">
<ul class="pagination">
<!-- First page. -->
<li{{ if eq $paginator.PageNumber 1 }} class="disabled"{{ end }}>
<a href="{{ $paginator.First.URL }}"
aria-label="{{ i18n "commons.pagination.first" }}"
{{- if eq $paginator.PageNumber 1 }} aria-disabled="true" role="button" tabindex="-1"{{ end }}>
</a>
</li>
<!-- Previous page. -->
<li{{ if eq $paginator.HasPrev false }} class="disabled"{{ end }}>
<a href="{{ if $paginator.HasPrev }}{{ $paginator.Prev.URL }}{{ else }}{{ $paginator.First.URL }}{{ end }}"
aria-label="{{ i18n "commons.pagination.previous" }}"
{{- if eq $paginator.HasPrev false }} aria-disabled="true" role="button" tabindex="-1"{{ end }}>
</a>
</li>
<!-- Page numbers. -->
{{- range $paginator.Pagers -}}
{{- $.Scratch.Set "page_number_flag" false -}}
<!-- Advanced page numbers. -->
{{- if gt $paginator.TotalPages $max_links -}}
<!-- Lower limit pages. -->
<!-- If the user is on a page which is in the lower limit. -->
{{- if le $paginator.PageNumber $lower_limit -}}
<!-- If the current loop page is less than max_links. -->
{{- if le .PageNumber $max_links -}}
{{- $.Scratch.Set "page_number_flag" true -}}
{{- end -}}
<!-- Upper limit pages. -->
<!-- If the user is on a page which is in the upper limit. -->
{{- else if ge $paginator.PageNumber $upper_limit -}}
<nav aria-label="{{ i18n "commons.pagination.label" }}">
<ul class="pagination">
<!-- First page. -->
<li{{ if eq $paginator.PageNumber 1 }} class="disabled"{{ end }}>
<a href="{{ $paginator.First.URL }}"
aria-label="{{ i18n "commons.pagination.first" }}"
{{- if eq $paginator.PageNumber 1 }} aria-disabled="true" role="button" tabindex="-1"{{ end }}>
</a>
</li>
<!-- Previous page. -->
<li{{ if eq $paginator.HasPrev false }} class="disabled"{{ end }}>
<a href="{{ if $paginator.HasPrev }}{{ $paginator.Prev.URL }}{{ else }}{{ $paginator.First.URL }}{{ end }}"
aria-label="{{ i18n "commons.pagination.previous" }}"
{{- if eq $paginator.HasPrev false }} aria-disabled="true" role="button" tabindex="-1"{{ end }}>
</a>
</li>
<!-- Page numbers. -->
{{- range $paginator.Pagers -}}
{{- $.Scratch.Set "page_number_flag" false -}}
<!-- Advanced page numbers. -->
{{- if gt $paginator.TotalPages $max_links -}}
<!-- Lower limit pages. -->
<!-- If the user is on a page which is in the lower limit. -->
{{- if le $paginator.PageNumber $lower_limit -}}
<!-- If the current loop page is less than max_links. -->
{{- if le .PageNumber $max_links -}}
{{- $.Scratch.Set "page_number_flag" true -}}
{{- end -}}
<!-- Upper limit pages. -->
<!-- If the user is on a page which is in the upper limit. -->
{{- else if ge $paginator.PageNumber $upper_limit -}}
<!-- If the current loop page is greater than total pages minus $max_links -->
{{- if gt .PageNumber (sub $paginator.TotalPages $max_links) -}}
{{- $.Scratch.Set "page_number_flag" true -}}
{{- end -}}
<!-- Middle pages. -->
{{- else -}}
{{- if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) -}}
{{- $.Scratch.Set "page_number_flag" true -}}
{{- end -}}
<!-- If the current loop page is greater than total pages minus $max_links -->
{{- if gt .PageNumber (sub $paginator.TotalPages $max_links) -}}
{{- $.Scratch.Set "page_number_flag" true -}}
{{- end -}}
<!-- Middle pages. -->
<!-- Simple page numbers. -->
{{- else -}}
{{- if and ( ge .PageNumber (sub $paginator.PageNumber $adjacent_links) ) ( le .PageNumber (add $paginator.PageNumber $adjacent_links) ) -}}
{{- $.Scratch.Set "page_number_flag" true -}}
{{- end -}}
{{- $.Scratch.Set "page_number_flag" true -}}
{{- end -}}
<!-- Simple page numbers. -->
{{- else -}}
{{- $.Scratch.Set "page_number_flag" true -}}
{{- end -}}
<!-- Output page numbers. -->
{{- if eq ($.Scratch.Get "page_number_flag") true -}}
<li{{ if eq . $paginator }} class="active"{{ end }}>
<a href="{{ .URL }}" aria-label="{{ i18n "commons.pagination.page" (dict "Number" .PageNumber) }}">
{{- .PageNumber -}}
</a>
</li>
{{- end -}}
<!-- Output page numbers. -->
{{- if eq ($.Scratch.Get "page_number_flag") true -}}
<li{{ if eq . $paginator }} class="active"{{ end }}>
<a href="{{ .URL }}" aria-label="{{ i18n "commons.pagination.page" (dict "Number" .PageNumber) }}">
{{- .PageNumber -}}
</a>
</li>
{{- end -}}
{{- end -}}
<!-- Next page. -->
<li{{ if eq $paginator.HasNext false }} class="disabled"{{ end }}>
<a href="{{ if $paginator.HasNext }}{{ $paginator.Next.URL }}{{else}}{{ $paginator.Last.URL }}{{ end }}"
aria-label="{{ i18n "commons.pagination.next" }}"
{{- if eq $paginator.HasNext false }} aria-disabled="true" role="button" tabindex="-1"{{ end }}>
</a>
</li>
<!-- Last page. -->
<li{{ if eq $paginator.PageNumber $paginator.TotalPages }} class="disabled"{{ end }}>
<a href="{{ $paginator.Last.URL }}"
aria-label="{{ i18n "commons.pagination.last" }}"
{{- if eq $paginator.PageNumber $paginator.TotalPages }} aria-disabled="true" role="button" tabindex="-1"{{ end }}>
</a>
</li>
</ul><!-- .pagination -->
<!-- Next page. -->
<li{{ if eq $paginator.HasNext false }} class="disabled"{{ end }}>
<a href="{{ if $paginator.HasNext }}{{ $paginator.Next.URL }}{{else}}{{ $paginator.Last.URL }}{{ end }}"
aria-label="{{ i18n "commons.pagination.next" }}"
{{- if eq $paginator.HasNext false }} aria-disabled="true" role="button" tabindex="-1"{{ end }}>
</a>
</li>
<!-- Last page. -->
<li{{ if eq $paginator.PageNumber $paginator.TotalPages }} class="disabled"{{ end }}>
<a href="{{ $paginator.Last.URL }}"
aria-label="{{ i18n "commons.pagination.last" }}"
{{- if eq $paginator.PageNumber $paginator.TotalPages }} aria-disabled="true" role="button" tabindex="-1"{{ end }}>
</a>
</li>
</ul><!-- .pagination -->
</nav>
{{- end -}}
</nav>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment