aboutsummaryrefslogtreecommitdiff
path: root/templates/imgs.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.html
parente7a3649280d20d9b4f68572721684a01049ec40f (diff)
downloaddocspace-f416775268085c7fb7f90cf54ea2149267b960e6.tar.gz
Add user impersonation support for admins
Diffstat (limited to 'templates/imgs.html')
-rw-r--r--templates/imgs.html8
1 files changed, 8 insertions, 0 deletions
diff --git a/templates/imgs.html b/templates/imgs.html
index e747034..51b489d 100644
--- a/templates/imgs.html
+++ b/templates/imgs.html
@@ -4,13 +4,21 @@
{{template "imgspage" .}}
<noscript>
{{if ne .Page 0}}
+ {{if ne .UserImpersonation ""}}
+ <a href="/imgs?page={{add .Page -1}}&user={{.UserImpersonation}}">Previous page</a>
+ {{else}}
<a href="/imgs?page={{add .Page -1}}">Previous page</a>
+ {{end}}
{{if lt .End .NbFiles}}
|
{{end}}
{{end}}
{{if lt .End .NbFiles}}
+ {{if ne .UserImpersonation ""}}
+ <a href="/imgs?page={{add .Page 1}}&user={{.UserImpersonation}}">Next page</a>
+ {{else}}
<a href="/imgs?page={{add .Page 1}}">Next page</a>
+ {{end}}
{{end}}
</noscript>
<br/><span>{{.NbFiles}} images</span>