aboutsummaryrefslogtreecommitdiff
path: root/templates/imgs_page.html
diff options
context:
space:
mode:
authorJulian Hurst <ark@mansus.space>2023-01-25 01:23:58 +0100
committerJulian Hurst <ark@mansus.space>2023-01-25 01:23:58 +0100
commitf416775268085c7fb7f90cf54ea2149267b960e6 (patch)
treed7e38e94795368f39cda882cd61c16b01eb56dd3 /templates/imgs_page.html
parente7a3649280d20d9b4f68572721684a01049ec40f (diff)
downloaddocspace-f416775268085c7fb7f90cf54ea2149267b960e6.tar.gz
Add user impersonation support for admins
Diffstat (limited to 'templates/imgs_page.html')
-rw-r--r--templates/imgs_page.html6
1 files changed, 6 insertions, 0 deletions
diff --git a/templates/imgs_page.html b/templates/imgs_page.html
index 665daf3..3f1ce58 100644
--- a/templates/imgs_page.html
+++ b/templates/imgs_page.html
@@ -1,9 +1,15 @@
{{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}}"
+ hx-trigger="revealed"
+ hx-swap="afterend">
+ {{else}}
<div hx-get="/imgs?page={{add $.Page 1}}&fragment"
hx-trigger="revealed"
hx-swap="afterend">
+ {{end}}
<span>{{$img.Name}}</span><br/>
<a href="{{$img.Link}}"><img src="{{$img.Link}}" /></a><br/>
{{else}}