diff options
| author | Julian Hurst <ark@mansus.space> | 2023-01-25 01:23:58 +0100 |
|---|---|---|
| committer | Julian Hurst <ark@mansus.space> | 2023-01-25 01:23:58 +0100 |
| commit | f416775268085c7fb7f90cf54ea2149267b960e6 (patch) | |
| tree | d7e38e94795368f39cda882cd61c16b01eb56dd3 /templates/imgs_page.html | |
| parent | e7a3649280d20d9b4f68572721684a01049ec40f (diff) | |
| download | docspace-f416775268085c7fb7f90cf54ea2149267b960e6.tar.gz | |
Add user impersonation support for admins
Diffstat (limited to 'templates/imgs_page.html')
| -rw-r--r-- | templates/imgs_page.html | 6 |
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}} |
