diff --git a/invites.go b/invites.go index 1dba7bd..e39ec3b 100644 --- a/invites.go +++ b/invites.go @@ -56,12 +56,19 @@ func handleViewUserInvites(app *App, u *User, w http.ResponseWriter, r *http.Req p := struct { *UserPage - Invites *[]Invite + Invites *[]Invite + Suspended bool }{ UserPage: NewUserPage(app, r, u, "Invite People", f), } var err error + + p.Suspended, err = app.db.IsUserSuspended(u.ID) + if err != nil { + log.Error("view invites: %v", err) + } + p.Invites, err = app.db.GetUserInvites(u.ID) if err != nil { return err diff --git a/templates/user/invite.tmpl b/templates/user/invite.tmpl index 4365e07..3d94392 100644 --- a/templates/user/invite.tmpl +++ b/templates/user/invite.tmpl @@ -20,6 +20,9 @@ table td {
+ {{if .Suspended}} + {{template "user-suspended"}} + {{end}}

Invite people

Invite others to join {{.SiteName}} by generating and sharing invite links below.

@@ -27,7 +30,7 @@ table td {
- @@ -39,7 +42,7 @@ table td {
- @@ -52,7 +55,7 @@ table td {
- +