diff --git a/conference.go b/conference.go index 2cc4811..fef0b15 100644 --- a/conference.go +++ b/conference.go @@ -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 diff --git a/docs/MISSINGFUNCS.md b/docs/MISSINGFUNCS.md index ef6154d..d842140 100644 --- a/docs/MISSINGFUNCS.md +++ b/docs/MISSINGFUNCS.md @@ -23,7 +23,7 @@ _(italicized items can be deferred)_ - ~~Find~~ - Manage (reorder/show/hide/delete) - ~~Create New~~ -- Conferences List honor "hide in list" flag +- ~~Conferences List honor "hide in list" flag~~ - Community Admin Menu: - Set Community Category - Set Community Services diff --git a/ui/views/conflist.jet b/ui/views/conflist.jet index 068ef00..7f5669f 100644 --- a/ui/views/conflist.jet +++ b/ui/views/conflist.jet @@ -1,6 +1,6 @@ {* * Amsterdam Web Communities System - * Copyright (c) 2025 Erbosoft Metaverse Design Solutions, All Rights Reserved + * Copyright (c) 2025-2026 Erbosoft Metaverse Design Solutions, All Rights Reserved * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this @@ -18,7 +18,7 @@
- {{ range _, c := conferences }} + {{ range i, c := conferences }}
🟣
@@ -26,6 +26,9 @@ {{ c.Name }} - Latest activity: {{ DisplayActivity(c.LastUpdate, .) }} + {{ if newflag[i] }} + 🔔 + {{ end }}
{{ hl := c.HostsQ(.Ctx()) }} @@ -35,8 +38,8 @@ Hosts: {{ end }} {{ if len(hl) > 0 }} - {{ range i, u := hl }} - {{ if i > 0 }}, {{ end }} + {{ range j, u := hl }} + {{ if j > 0 }}, {{ end }} {{ u.Username }} {{ end }} {{ else }}