From 973345ad50f9b237714fcb364cf7f665b3909f9d Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 8 May 2024 00:15:52 +0200 Subject: feat: paginate search results --- frontend/templates/blocks/options.gotmpl | 27 +++++++++++++++++++-------- 1 file changed, 19 insertions(+), 8 deletions(-) (limited to 'frontend/templates/blocks/options.gotmpl') diff --git a/frontend/templates/blocks/options.gotmpl b/frontend/templates/blocks/options.gotmpl index e39d60c..88553b2 100644 --- a/frontend/templates/blocks/options.gotmpl +++ b/frontend/templates/blocks/options.gotmpl @@ -1,8 +1,8 @@ -{{- template "results" .Results -}} +{{- template "results" . -}} {{- define "results" }} -
- {{- with . }} - {{- range .Results }} + {{- if gt .Results.Total 0 }} +
+ {{- range .Results.Results }}
{{ .Option }} @@ -53,9 +53,20 @@ {{- end }}
- {{- else }} - Nothing found {{- end }} - {{- end }} -
+ + + {{- else }} + Nothing found + {{- end }} {{- end }} -- cgit 1.4.1