display the new-message bells in the community conference list

This commit is contained in:
2026-02-02 22:33:54 -07:00
parent a7dc4f9902
commit ccfe430e03
3 changed files with 19 additions and 5 deletions
+11
View File
@@ -46,6 +46,17 @@ func Conferences(ctxt ui.AmContext) (string, any, error) {
return ui.ErrorPage(ctxt, err)
}
ctxt.VarMap().Set("conferences", clist)
if len(clist) > 0 {
newflag := make([]bool, len(clist))
for i, conf := range clist {
msgCount, err := conf.UnreadMessages(ctxt.Ctx(), ctxt.CurrentUser())
if err != nil {
return ui.ErrorPage(ctxt, err)
}
newflag[i] = msgCount > 0
}
ctxt.VarMap().Set("newflag", newflag)
}
ctxt.VarMap().Set("canCreate", comm.TestPermission("Community.Create", ctxt.EffectiveLevel()))
ctxt.VarMap().Set("canManage", comm.TestPermission("Community.Create", ctxt.EffectiveLevel()))
return "framed_template", "conflist.jet", err