From 8087f3c877268b6672fa9fd489cca3b93008d863 Mon Sep 17 00:00:00 2001 From: Amy Gale Ruth Bowersox Date: Thu, 12 Feb 2026 23:06:34 -0700 Subject: [PATCH] display of conference reports page --- conferenceadmin.go | 28 ++++++++++++ main.go | 1 + ui/menudefs.yaml | 2 +- ui/views/conf_aliases.jet | 5 ++- ui/views/conf_members.jet | 11 ++++- ui/views/conf_reports.jet | 94 +++++++++++++++++++++++++++++++++++++++ ui/views/manage_conf.jet | 5 ++- ui/views/manage_topic.jet | 5 ++- 8 files changed, 145 insertions(+), 6 deletions(-) create mode 100644 ui/views/conf_reports.jet diff --git a/conferenceadmin.go b/conferenceadmin.go index 9ac1a44..9a8c9e0 100644 --- a/conferenceadmin.go +++ b/conferenceadmin.go @@ -436,6 +436,34 @@ func ConfCustom(ctxt ui.AmContext) (string, any) { return "redirect", fmt.Sprintf("/comm/%s/conf/%s/manage", comm.Alias, ctxt.GetScratch("currentAlias")) } +/* ConfReports displays conference activity reports. + * Parameters: + * ctxt - The AmContext for the request. + * Returns: + * Command string dictating what to be rendered. + * Data as a parameter for the command string. + */ +func ConfReports(ctxt ui.AmContext) (string, any) { + comm := ctxt.CurrentCommunity() + conf := ctxt.GetScratch("currentConference").(*database.Conference) + ctxt.VarMap().Set("confName", conf.Name) + ctxt.VarMap().Set("selfLink", fmt.Sprintf("/comm/%s/conf/%s/activity", comm.Alias, ctxt.GetScratch("currentAlias"))) + + if ctxt.HasParameter("r") { + // TODO: generate report here + return "error", nil + } else { + topicList, err := database.AmListTopics(ctxt.Ctx(), conf.ConfId, ctxt.CurrentUserId(), database.TopicViewAll, database.TopicSortNumber, true) + if err != nil { + return "error", err + } + ctxt.VarMap().Set("topics", topicList) + ctxt.VarMap().Set("backLink", fmt.Sprintf("/comm/%s/conf/%s/manage", comm.Alias, ctxt.GetScratch("currentAlias"))) + ctxt.SetFrameTitle(fmt.Sprintf("Conference Reports: %s", conf.Name)) + return "framed", "conf_reports.jet" + } +} + /* CreateConferenceForm displays the dialog for creating a new conference. * Parameters: * ctxt - The AmContext for the request. diff --git a/main.go b/main.go index 9e3f978..08d0fab 100644 --- a/main.go +++ b/main.go @@ -121,6 +121,7 @@ func setupEcho() *echo.Echo { confGroup.POST("/members", fn) confGroup.GET("/custom", ui.AmWrap(ConfCustomForm)) confGroup.POST("/custom", ui.AmWrap(ConfCustom)) + confGroup.GET("/activity", ui.AmWrap(ConfReports)) confGroup.GET("/hotlist", ui.AmWrap(AddToHotlist)) confGroup.GET("/invite", ui.AmWrap(InviteToConference)) confGroup.GET("/r/:topic", ui.AmWrap(ReadPosts), ui.SetTopic) diff --git a/ui/menudefs.yaml b/ui/menudefs.yaml index f64d595..3fde818 100644 --- a/ui/menudefs.yaml +++ b/ui/menudefs.yaml @@ -100,7 +100,7 @@ menudefs: - text: "Customize Conference Appearance" link: "/comm/[CID]/conf/[CONFID]/custom" - text: "Conference Activity Reports" - link: "/TODO/comm/[CID]/conf/[CONFID]/activity" + link: "/comm/[CID]/conf/[CONFID]/activity" - text: "Conference E-Mail" link: "/TODO/comm/[CID]/conf/[CONFID]/email" - text: "Export Messages" diff --git a/ui/views/conf_aliases.jet b/ui/views/conf_aliases.jet index 127ecaa..2f4643f 100644 --- a/ui/views/conf_aliases.jet +++ b/ui/views/conf_aliases.jet @@ -32,7 +32,10 @@
- Return to Manage Conference Menu + + + Return to Manage Conference Menu +
diff --git a/ui/views/conf_members.jet b/ui/views/conf_members.jet index 7b16d2d..1789434 100644 --- a/ui/views/conf_members.jet +++ b/ui/views/conf_members.jet @@ -18,8 +18,15 @@ diff --git a/ui/views/conf_reports.jet b/ui/views/conf_reports.jet new file mode 100644 index 0000000..54beb54 --- /dev/null +++ b/ui/views/conf_reports.jet @@ -0,0 +1,94 @@ +{* + * Amsterdam Web Communities System + * 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 + * file, You can obtain one at https://mozilla.org/MPL/2.0/. + *} +
+ +
+
+

Conference Reports:

+

{{ confName }}

+
+
+
+ + + + + +
+
+ 📊 +
+

About Activity Reports:

+

View detailed activity reports for each topic in this conference. The Posters report shows who has posted messages, + while the Readers/Lurkers report shows who has read topics.

+
+
+
+ + +
+
+ + + + + + + + + + + + + + + + + + {{ range _, top := topics }} + + + + + + + {{ end }} + + +
#Topic NameReports
 (Entire conference) + + 👥 + Posters + + + + 👀 + Readers/Lurkers + +
{{ top.Number }}{{ top.Name | raw }} + + 👥 + Posters + + + + 👀 + Readers/Lurkers + +
+
+
+
diff --git a/ui/views/manage_conf.jet b/ui/views/manage_conf.jet index 74a9f13..1396934 100644 --- a/ui/views/manage_conf.jet +++ b/ui/views/manage_conf.jet @@ -16,7 +16,10 @@ diff --git a/ui/views/manage_topic.jet b/ui/views/manage_topic.jet index f2e925c..dd5becf 100644 --- a/ui/views/manage_topic.jet +++ b/ui/views/manage_topic.jet @@ -16,7 +16,10 @@