aboutsummaryrefslogtreecommitdiff
path: root/templates/imgs_page.html
diff options
context:
space:
mode:
authorJulian Hurst <ark@mansus.space>2023-01-26 22:25:50 +0100
committerJulian Hurst <ark@mansus.space>2023-01-26 22:25:50 +0100
commit12f7cf21265d7d6c9d1d60e2ae63753846a58c4b (patch)
tree8bcc6179362138b471a8ddb197fbd6e8f136ce8f /templates/imgs_page.html
parent39d0c249498fdb924697647d0bafbf324b01d3cc (diff)
downloaddocspace-12f7cf21265d7d6c9d1d60e2ae63753846a58c4b.tar.gz
Wrap template data to always pass the User
Diffstat (limited to 'templates/imgs_page.html')
-rw-r--r--templates/imgs_page.html10
1 files changed, 5 insertions, 5 deletions
diff --git a/templates/imgs_page.html b/templates/imgs_page.html
index 3f1ce58..3aa6bfa 100644
--- a/templates/imgs_page.html
+++ b/templates/imgs_page.html
@@ -1,12 +1,12 @@
{{define "imgspage"}}
-{{range $i, $img := .Imgs}}
- {{if eq (add $i $.Start) $.End}}
- {{if ne $.UserImpersonation ""}}
- <div hx-get="/imgs?page={{add $.Page 1}}&fragment&user={{$.UserImpersonation}}"
+{{range $i, $img := .Data.Imgs}}
+ {{if eq (add $i $.Data.Start) $.Data.End}}
+ {{if ne $.Data.UserImpersonation ""}}
+ <div hx-get="/imgs?page={{add $.Data.Page 1}}&fragment&user={{$.Data.UserImpersonation}}"
hx-trigger="revealed"
hx-swap="afterend">
{{else}}
- <div hx-get="/imgs?page={{add $.Page 1}}&fragment"
+ <div hx-get="/imgs?page={{add $.Data.Page 1}}&fragment"
hx-trigger="revealed"
hx-swap="afterend">
{{end}}