BUGFIX: Paginierung Bände

This commit is contained in:
Simon Martens
2025-03-07 16:39:19 +01:00
parent 8409b4fcfb
commit 88bba693df
8 changed files with 139 additions and 49 deletions

View File

@@ -229,7 +229,7 @@
{{- if $model.result.Hits -}}
<div class="flex flex-row justify-end items-start border-t border-zinc-300 pt-4">
{{- template "pagination" $model -}}
{{- template "_pagination" Arr $model "beitraege" -}}
</div>
{{- else -}}
<div class="mt-4">Kein Beitrag gefunden.</div>

View File

@@ -1,23 +0,0 @@
{{ $model := . }}
{{- if gt (len $model.result.Pages) 1 }}
<div class="[&>_a]:no-underline">
{{ if gt $model.parameters.Page 1 -}}
<a
href="{{- $model.parameters.ToQueryParamsBeitraege -}}&page={{ $model.parameters.Prev }}"
hx-indicator="body"
class="mr-1.5 text-stone-500 hover:text-slate-900">
<i class="ri-arrow-left-long-line"></i>
</a>
{{- end -}}
Seite
<b>{{ $model.parameters.Page }}&thinsp;/&thinsp;{{ $model.result.PagesCount }}</b>
{{ if lt $model.parameters.Page ($model.result.PagesCount) -}}
<a
href="{{- $model.parameters.ToQueryParamsBeitraege -}}&page={{ $model.parameters.Next }}"
hx-indicator="body"
class="ml-1.5 text-stone-500 hover:text-slate-900">
<i class="ri-arrow-right-long-line"></i>
</a>
{{- end -}}
</div>
{{- end -}}

View File

@@ -49,7 +49,7 @@
{{- if gt (len $model.result.Pages) 1 }}
<div>&middot;</div>
{{- end -}}
{{ template "pagination" $model }}
{{ template "_pagination" Arr $model "beitraege" }}
</div>
{{- if not $isAlm -}}