cosmetic updates to Topic page

This commit is contained in:
2026-01-13 23:11:29 -07:00
parent 4c1f2184df
commit 01345e0d38
4 changed files with 32 additions and 26 deletions
+2 -1
View File
@@ -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")))
+4 -2
View File
@@ -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:
+2 -2
View File
@@ -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 @@
</div>
</div>
<div class="mb-2">
<strong class="text-lg">{{ post_cur.Pseud }}</strong>
<strong class="text-lg">{{ post_cur.Pseud | raw }}</strong>
<span class="text-gray-600 text-sm ml-2">(<em>
<a href="/user/{{ post_userName }}" target="_blank" class="text-blue-700 hover:text-blue-900">{{ post_userName }}</a>,
{{ DisplayDateTime(post_cur.Posted, .) }}</em>)
+19 -16
View File
@@ -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
</a>
{{ if canCreate }}
<a href="{{ urlStem }}/new_topic"
class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded text-sm font-medium transition-colors">
Add Topic
</a>
{{ end }}
<a href="/TODO/find"
class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded text-sm font-medium transition-colors">
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
</a>
</div>
<div class="text-xs text-gray-600">
<a href="{{ permalink }}"
class="text-blue-700 hover:text-blue-900">
[Permalink to this conference]
{{ if false }}{* TODO *}
<a href="/TODO{{ urlStem }}/hotlist"
class="bg-orange-600 hover:bg-orange-700 text-black px-4 py-2 rounded text-sm font-medium transition-colors">
Add to Hotlist
</a>
{{ end }}
<a class="text-xl" href="{{ permalink }}" title="Permalink to this conference">🔗</a>
</div>
</div>
<!-- Topics Table -->
<div class="max-w-6xl">
<div class="max-w-7xl">
<div class="bg-white border border-gray-300 rounded-lg overflow-hidden">
<table class="w-full">
<thead class="bg-gray-100 border-b border-gray-300">
<tr>
{{ sp := iif(sort == 1, -1, 1) }}
<th class="px-4 py-3 text-left text-xs font-bold text-gray-700 uppercase tracking-wider">
<a href="{{ urlStem }}?sort={{ sp }}"
class="text-blue-700 hover:text-blue-900">#</a>
<a href="{{ urlStem }}?sort={{ sp }}" class="text-blue-700 hover:text-blue-900">#</a>
{{ if sort == 1 }}🔼{{ else if sort == -1 }}🔽{{ end }}
</th>
{{ sp = iif(sort == 2, -2, 2) }}
<th class="px-4 py-3 text-left text-xs font-bold text-gray-700 uppercase tracking-wider">
<a href="{{ urlStem }}?sort={{ sp }}"
class="text-blue-700 hover:text-blue-900">Topic Name</a>
<a href="{{ urlStem }}?sort={{ sp }}" class="text-blue-700 hover:text-blue-900">Topic Name</a>
{{ if sort == 2 }}🔼{{ else if sort == -2 }}🔽{{ end }}
</th>
{{ sp = iif(sort == 3, -3, 3) }}
<th class="px-4 py-3 text-right text-xs font-bold text-gray-700 uppercase tracking-wider">
<a href="{{ urlStem }}?sort={{ sp }}"
class="text-blue-700 hover:text-blue-900">New</a>
<a href="{{ urlStem }}?sort={{ sp }}" class="text-blue-700 hover:text-blue-900">New</a>
{{ if sort == -3 }}🔼{{ else if sort == 3 }}🔽{{ end }}
</th>
{{ sp = iif(sort == 4, -4, 4) }}
<th class="px-4 py-3 text-right text-xs font-bold text-gray-700 uppercase tracking-wider">
<a href="{{ urlStem }}?sort={{ sp }}"
class="text-blue-700 hover:text-blue-900">Total</a>
<a href="{{ urlStem }}?sort={{ sp }}" class="text-blue-700 hover:text-blue-900">Total</a>
{{ if sort == -4 }}🔼{{ else if sort == 4 }}🔽{{ end }}
</th>
{{ sp = iif(sort == 5, -5, 5) }}
<th class="px-4 py-3 text-left text-xs font-bold text-gray-700 uppercase tracking-wider">
<a href="{{ urlStem }}?sort={{ sp }}"
class="text-blue-700 hover:text-blue-900">Last Response</a>
<a href="{{ urlStem }}?sort={{ sp }}" class="text-blue-700 hover:text-blue-900">Last Response</a>
{{ if sort == -5 }}🔼{{ else if sort == 5 }}🔽{{ end }}
</th>
</tr>
</thead>