all repos — honk @ 0f3f1c8deaf6cf735bcc2aa3a1ac758023e2dad5

my fork of honk

provide more info on pages
Ted Unangst tedu@tedunangst.com
Wed, 24 Apr 2019 03:16:43 -0400
commit

0f3f1c8deaf6cf735bcc2aa3a1ac758023e2dad5

parent

903fa55d6c9cb7ba7998daddf6e602e204332e1e

1 files changed, 7 insertions(+), 7 deletions(-)

jump to
M honk.gohonk.go

@@ -415,21 +415,21 @@ return

} honks := gethonksbyuser(name) u := GetUserInfo(r) - honkpage(w, r, u, user, honks) + honkpage(w, r, u, user, honks, "") } func viewhonker(w http.ResponseWriter, r *http.Request) { name := mux.Vars(r)["name"] u := GetUserInfo(r) honks := gethonksbyhonker(u.UserID, name) - honkpage(w, r, u, nil, honks) + honkpage(w, r, u, nil, honks, "honks by honker: " + name) } func viewcombo(w http.ResponseWriter, r *http.Request) { name := mux.Vars(r)["name"] u := GetUserInfo(r) honks := gethonksbycombo(u.UserID, name) - honkpage(w, r, u, nil, honks) + honkpage(w, r, u, nil, honks, "honks by combo: " + name) } func viewconvoy(w http.ResponseWriter, r *http.Request) { c := r.FormValue("c")

@@ -439,7 +439,7 @@ if u != nil {

userid = u.UserID } honks := gethonksbyconvoy(userid, c) - honkpage(w, r, u, nil, honks) + honkpage(w, r, u, nil, honks, "honks in convoy: " + c) } func fingerlicker(w http.ResponseWriter, r *http.Request) {

@@ -513,10 +513,10 @@ WriteJunk(w, j)

return } u := GetUserInfo(r) - honkpage(w, r, u, nil, []*Honk{h}) + honkpage(w, r, u, nil, []*Honk{h}, "one honk") } -func honkpage(w http.ResponseWriter, r *http.Request, u *UserInfo, user *WhatAbout, honks []*Honk) { +func honkpage(w http.ResponseWriter, r *http.Request, u *UserInfo, user *WhatAbout, honks []*Honk, infomsg string) { reverbolate(honks) templinfo := getInfo(r) if u != nil {

@@ -536,7 +536,7 @@ whatabout = obfusbreak(whatabout)

templinfo["WhatAbout"] = cleanstring(whatabout) } templinfo["Honks"] = honks - templinfo["ServerMessage"] = "(some info goes here)" + templinfo["ServerMessage"] = infomsg err := readviews.ExecuteTemplate(w, "honkpage.html", templinfo) if err != nil { log.Print(err)