diff options
| author | Julian Hurst <ark@mansus.space> | 2023-01-26 22:25:50 +0100 |
|---|---|---|
| committer | Julian Hurst <ark@mansus.space> | 2023-01-26 22:25:50 +0100 |
| commit | 12f7cf21265d7d6c9d1d60e2ae63753846a58c4b (patch) | |
| tree | 8bcc6179362138b471a8ddb197fbd6e8f136ce8f /templates/imgs.html | |
| parent | 39d0c249498fdb924697647d0bafbf324b01d3cc (diff) | |
| download | docspace-12f7cf21265d7d6c9d1d60e2ae63753846a58c4b.tar.gz | |
Wrap template data to always pass the User
Diffstat (limited to 'templates/imgs.html')
| -rw-r--r-- | templates/imgs.html | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/templates/imgs.html b/templates/imgs.html index 51b489d..edbb0fd 100644 --- a/templates/imgs.html +++ b/templates/imgs.html @@ -3,23 +3,23 @@ <h1>Images</h1> {{template "imgspage" .}} <noscript> - {{if ne .Page 0}} - {{if ne .UserImpersonation ""}} - <a href="/imgs?page={{add .Page -1}}&user={{.UserImpersonation}}">Previous page</a> + {{if ne .Data.Page 0}} + {{if ne .Data.UserImpersonation ""}} + <a href="/imgs?page={{add .Data.Page -1}}&user={{.UserImpersonation}}">Previous page</a> {{else}} - <a href="/imgs?page={{add .Page -1}}">Previous page</a> + <a href="/imgs?page={{add .Data.Page -1}}">Previous page</a> {{end}} - {{if lt .End .NbFiles}} + {{if lt .Data.End .Data.NbFiles}} | {{end}} {{end}} - {{if lt .End .NbFiles}} - {{if ne .UserImpersonation ""}} - <a href="/imgs?page={{add .Page 1}}&user={{.UserImpersonation}}">Next page</a> + {{if lt .Data.End .Data.NbFiles}} + {{if ne .Data.UserImpersonation ""}} + <a href="/imgs?page={{add .Data.Page 1}}&user={{.Data.UserImpersonation}}">Next page</a> {{else}} - <a href="/imgs?page={{add .Page 1}}">Next page</a> + <a href="/imgs?page={{add .Data.Page 1}}">Next page</a> {{end}} {{end}} </noscript> - <br/><span>{{.NbFiles}} images</span> + <br/><span>{{.Data.NbFiles}} images</span> {{end}} |
