Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
Theme
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
osuny
Theme
Commits
62143401
Unverified
Commit
62143401
authored
5 months ago
by
Alexis BENOIT
Committed by
GitHub
5 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Hotfix : fermeture du tag de pagination (#802)
parent
195c00aa
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
layouts/partials/commons/pagination.html
+78
-78
78 additions, 78 deletions
layouts/partials/commons/pagination.html
with
78 additions
and
78 deletions
layouts/partials/commons/pagination.html
+
78
−
78
View file @
62143401
...
...
@@ -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 -}}
<!--
Midd
le pages. -->
<!--
Simp
le page
number
s. -->
{{- 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>
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment