From 516b7a6c028dca5e7d1f48ea845f9814a407af72 Mon Sep 17 00:00:00 2001 From: Ted Unangst Date: Sun, 26 Apr 2020 15:12:37 -0400 Subject: [PATCH] need to include user options in the frags page too --- views/honkfrags.html | 3 ++- web.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/views/honkfrags.html b/views/honkfrags.html index 5ed9985..82f58f8 100644 --- a/views/honkfrags.html +++ b/views/honkfrags.html @@ -1,9 +1,10 @@
{{ .TopHID }}
{{ $BonkCSRF := .HonkCSRF }} {{ $MapLink := .MapLink }} +{{ $Badonk := .User.Options.Reaction }}

{{ .ServerMessage }}

{{ range .Honks }} -{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF }} +{{ template "honk.html" map "Honk" . "MapLink" $MapLink "BonkCSRF" $BonkCSRF "Badonk" $Badonk }} {{ end }}
diff --git a/web.go b/web.go index 75a29b4..7459c7a 100644 --- a/web.go +++ b/web.go @@ -2205,6 +2205,7 @@ func webhydra(w http.ResponseWriter, r *http.Request) { reverbolate(userid, honks) templinfo["Honks"] = honks templinfo["MapLink"] = getmaplink(u) + templinfo["User"], _ = butwhatabout(u.Username) w.Header().Set("Content-Type", "text/html; charset=utf-8") err := readviews.Execute(w, "honkfrags.html", templinfo) if err != nil {