diff --git a/conference.go b/conference.go index a874d86..f5797a9 100644 --- a/conference.go +++ b/conference.go @@ -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 @@ -106,6 +106,7 @@ func Topics(ctxt ui.AmContext) (string, any, error) { fdate[i] = loc.Strftime("%x %X", t.LastUpdate.In(tz)) } + ctxt.VarMap().Set("canCreate", conf.TestPermission("Conference.Create", myLevel)) ctxt.VarMap().Set("conferenceName", conf.Name) ctxt.VarMap().Set("urlBack", fmt.Sprintf("/comm/%s/conf", comm.Alias)) ctxt.VarMap().Set("urlStem", fmt.Sprintf("/comm/%s/conf/%s", comm.Alias, ctxt.URLParam("confid"))) diff --git a/database/topic.go b/database/topic.go index 3e9e9ce..25ff2da 100644 --- a/database/topic.go +++ b/database/topic.go @@ -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 @@ -230,8 +230,10 @@ func AmListTopics(ctx context.Context, confid int32, uid int32, viewOption int, tail = "(t.sticky = 1 OR " + tail + ")" } whereClause = "t.archived = 0 AND (s.hidden IS NULL OR s.hidden = 0) AND " + tail - case TopicViewActive, TopicViewAllVisible: + case TopicViewActive: whereClause = "t.archived = 0 AND (s.hidden IS NULL OR s.hidden = 0)" + case TopicViewAllVisible: + whereClause = "(s.hidden IS NULL OR s.hidden = 0)" case TopicViewHidden: whereClause = "s.hidden = 1" case TopicViewArchive: diff --git a/ui/views/singlepost.jet b/ui/views/singlepost.jet index 0fd7486..8ef8419 100644 --- a/ui/views/singlepost.jet +++ b/ui/views/singlepost.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 @@ -15,7 +15,7 @@
- {{ post_cur.Pseud }} + {{ post_cur.Pseud | raw }} ( {{ post_userName }}, {{ DisplayDateTime(post_cur.Posted, .) }}) diff --git a/ui/views/topiclist.jet b/ui/views/topiclist.jet index b0f8f8f..bcc983f 100644 --- a/ui/views/topiclist.jet +++ b/ui/views/topiclist.jet @@ -20,10 +20,12 @@ class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded text-sm font-medium transition-colors"> Conference List - - Add Topic - + {{ if canCreate }} + + Add Topic + + {{ end }} Find @@ -32,45 +34,46 @@ class="bg-gray-600 hover:bg-gray-700 text-white px-4 py-2 rounded text-sm font-medium transition-colors"> Manage -
-
- - [Permalink to this conference] - + {{ if false }}{* TODO *} + + Add to Hotlist + + {{ end }} + 🔗
-
+
{{ sp := iif(sort == 1, -1, 1) }} {{ sp = iif(sort == 2, -2, 2) }} {{ sp = iif(sort == 3, -3, 3) }} {{ sp = iif(sort == 4, -4, 4) }} {{ sp = iif(sort == 5, -5, 5) }}
- # + # + {{ if sort == 1 }}🔼{{ else if sort == -1 }}🔽{{ end }} - Topic Name + Topic Name + {{ if sort == 2 }}🔼{{ else if sort == -2 }}🔽{{ end }} - New + New + {{ if sort == -3 }}🔼{{ else if sort == 3 }}🔽{{ end }} - Total + Total + {{ if sort == -4 }}🔼{{ else if sort == 4 }}🔽{{ end }} - Last Response + Last Response + {{ if sort == -5 }}🔼{{ else if sort == 5 }}🔽{{ end }}