aboutsummaryrefslogtreecommitdiff
path: root/backend/templates/components.html
diff options
context:
space:
mode:
authorWilliam Hergès <william@herges.fr>2025-10-27 14:40:26 +0100
committerWilliam Hergès <william@herges.fr>2025-10-27 14:40:26 +0100
commit8d000018e132583bf4797ac9cb4ce2c4e96ed8ba (patch)
tree1e9838911d78009a3f34f65408003ece00890ed7 /backend/templates/components.html
parentef3f8de38795a92dfc5d232a533c37d53794f1c8 (diff)
feat(section): display paginate in full list
Diffstat (limited to 'backend/templates/components.html')
-rw-r--r--backend/templates/components.html14
1 files changed, 13 insertions, 1 deletions
diff --git a/backend/templates/components.html b/backend/templates/components.html
index 8f1bcc2..72bf40e 100644
--- a/backend/templates/components.html
+++ b/backend/templates/components.html
@@ -1,4 +1,4 @@
-{{define "logs_display"}}
+{{define "section_display"}}
<article>
{{ $uri := .URI }} {{ range .Data }}
<article>
@@ -11,7 +11,19 @@
</article>
{{ end }}
<div class="pagination">
+ {{ if .Paginate }}
+ <nav>
+ {{ if ne .CurrentPage 1 }}<a href="?page={{ before .CurrentPage }}">Précédent</a>{{else}}
+ <p></p>
+ {{end}}
+ <p>{{ .CurrentPage }}/{{ .PagesNumber }}</p>
+ {{ if ne .CurrentPage .PagesNumber }}<a href="?page={{ next .CurrentPage }}">Suivant</a>{{else}}
+ <p></p>
+ {{end}}
+ </nav>
+ {{ else }}
<a href="/{{ $uri }}/">Voir plus</a>
+ {{ end }}
</div>
</article>
{{end}}