From 268a177412be70e0ab99a0a507756c9836d4751f Mon Sep 17 00:00:00 2001 From: Noah Petherbridge Date: Thu, 4 Apr 2024 22:48:46 -0700 Subject: [PATCH] Handy contextual links on the admin change log page --- web/templates/admin/change_log.html | 52 +++++++++++++++++++++++++++ web/templates/admin/user_actions.html | 2 +- web/templates/photo/permalink.html | 9 +++++ 3 files changed, 62 insertions(+), 1 deletion(-) diff --git a/web/templates/admin/change_log.html b/web/templates/admin/change_log.html index e2cc474..319ea72 100644 --- a/web/templates/admin/change_log.html +++ b/web/templates/admin/change_log.html @@ -180,9 +180,61 @@ {{.TableName}} + + + {{if eq .TableName "blocks"}} + + + + {{end}} {{.TableID}} + + + {{if eq .TableName "photos"}} + + + + {{else if eq .TableName "comments"}} + + + + {{else if eq .TableName "blocks"}} + + + + + + + + {{else if eq .TableName "friends"}} + + + + + + + + {{else if and (eq .TableName "certification_photos") .AboutUserID}} + {{$User := $Root.UserMap.Get .AboutUserID}} + + + + {{else if eq .TableName "users"}} + + + + {{end}}
diff --git a/web/templates/admin/user_actions.html b/web/templates/admin/user_actions.html index 40f0618..60bb406 100644 --- a/web/templates/admin/user_actions.html +++ b/web/templates/admin/user_actions.html @@ -1,4 +1,4 @@ -{{define "title"}}Compose a Message{{end}} +{{define "title"}}Admin Action: {{.User.Username}}{{end}} {{define "content"}}
diff --git a/web/templates/photo/permalink.html b/web/templates/photo/permalink.html index 7df607c..6abbd40 100644 --- a/web/templates/photo/permalink.html +++ b/web/templates/photo/permalink.html @@ -350,6 +350,15 @@
{{end}}
+ + {{if $Root.CurrentUser.IsAdmin}} +
+ + + ID: {{.ID}} + +
+ {{end}}