cosmetic updates to Topic page
This commit is contained in:
+2
-1
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Amsterdam Web Communities System
|
* 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
|
* 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
|
* 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))
|
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("conferenceName", conf.Name)
|
||||||
ctxt.VarMap().Set("urlBack", fmt.Sprintf("/comm/%s/conf", comm.Alias))
|
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")))
|
ctxt.VarMap().Set("urlStem", fmt.Sprintf("/comm/%s/conf/%s", comm.Alias, ctxt.URLParam("confid")))
|
||||||
|
|||||||
+4
-2
@@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Amsterdam Web Communities System
|
* 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
|
* 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
|
* 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 + ")"
|
tail = "(t.sticky = 1 OR " + tail + ")"
|
||||||
}
|
}
|
||||||
whereClause = "t.archived = 0 AND (s.hidden IS NULL OR s.hidden = 0) AND " + 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)"
|
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:
|
case TopicViewHidden:
|
||||||
whereClause = "s.hidden = 1"
|
whereClause = "s.hidden = 1"
|
||||||
case TopicViewArchive:
|
case TopicViewArchive:
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{*
|
{*
|
||||||
* Amsterdam Web Communities System
|
* 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
|
* 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
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
@@ -15,7 +15,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mb-2">
|
<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>
|
<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>,
|
<a href="/user/{{ post_userName }}" target="_blank" class="text-blue-700 hover:text-blue-900">{{ post_userName }}</a>,
|
||||||
{{ DisplayDateTime(post_cur.Posted, .) }}</em>)
|
{{ DisplayDateTime(post_cur.Posted, .) }}</em>)
|
||||||
|
|||||||
+19
-16
@@ -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">
|
class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded text-sm font-medium transition-colors">
|
||||||
Conference List
|
Conference List
|
||||||
</a>
|
</a>
|
||||||
|
{{ if canCreate }}
|
||||||
<a href="{{ urlStem }}/new_topic"
|
<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">
|
class="bg-green-600 hover:bg-green-700 text-white px-4 py-2 rounded text-sm font-medium transition-colors">
|
||||||
Add Topic
|
Add Topic
|
||||||
</a>
|
</a>
|
||||||
|
{{ end }}
|
||||||
<a href="/TODO/find"
|
<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">
|
class="bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded text-sm font-medium transition-colors">
|
||||||
Find
|
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">
|
class="bg-gray-600 hover:bg-gray-700 text-white px-4 py-2 rounded text-sm font-medium transition-colors">
|
||||||
Manage
|
Manage
|
||||||
</a>
|
</a>
|
||||||
</div>
|
{{ if false }}{* TODO *}
|
||||||
<div class="text-xs text-gray-600">
|
<a href="/TODO{{ urlStem }}/hotlist"
|
||||||
<a href="{{ permalink }}"
|
class="bg-orange-600 hover:bg-orange-700 text-black px-4 py-2 rounded text-sm font-medium transition-colors">
|
||||||
class="text-blue-700 hover:text-blue-900">
|
Add to Hotlist
|
||||||
[Permalink to this conference]
|
|
||||||
</a>
|
</a>
|
||||||
|
{{ end }}
|
||||||
|
<a class="text-xl" href="{{ permalink }}" title="Permalink to this conference">🔗</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Topics Table -->
|
<!-- Topics Table -->
|
||||||
<div class="max-w-6xl">
|
<div class="max-w-7xl">
|
||||||
<div class="bg-white border border-gray-300 rounded-lg overflow-hidden">
|
<div class="bg-white border border-gray-300 rounded-lg overflow-hidden">
|
||||||
<table class="w-full">
|
<table class="w-full">
|
||||||
<thead class="bg-gray-100 border-b border-gray-300">
|
<thead class="bg-gray-100 border-b border-gray-300">
|
||||||
<tr>
|
<tr>
|
||||||
{{ sp := iif(sort == 1, -1, 1) }}
|
{{ sp := iif(sort == 1, -1, 1) }}
|
||||||
<th class="px-4 py-3 text-left text-xs font-bold text-gray-700 uppercase tracking-wider">
|
<th class="px-4 py-3 text-left text-xs font-bold text-gray-700 uppercase tracking-wider">
|
||||||
<a href="{{ urlStem }}?sort={{ sp }}"
|
<a href="{{ urlStem }}?sort={{ sp }}" class="text-blue-700 hover:text-blue-900">#</a>
|
||||||
class="text-blue-700 hover:text-blue-900">#</a>
|
{{ if sort == 1 }}🔼{{ else if sort == -1 }}🔽{{ end }}
|
||||||
</th>
|
</th>
|
||||||
{{ sp = iif(sort == 2, -2, 2) }}
|
{{ sp = iif(sort == 2, -2, 2) }}
|
||||||
<th class="px-4 py-3 text-left text-xs font-bold text-gray-700 uppercase tracking-wider">
|
<th class="px-4 py-3 text-left text-xs font-bold text-gray-700 uppercase tracking-wider">
|
||||||
<a href="{{ urlStem }}?sort={{ sp }}"
|
<a href="{{ urlStem }}?sort={{ sp }}" class="text-blue-700 hover:text-blue-900">Topic Name</a>
|
||||||
class="text-blue-700 hover:text-blue-900">Topic Name</a>
|
{{ if sort == 2 }}🔼{{ else if sort == -2 }}🔽{{ end }}
|
||||||
</th>
|
</th>
|
||||||
{{ sp = iif(sort == 3, -3, 3) }}
|
{{ sp = iif(sort == 3, -3, 3) }}
|
||||||
<th class="px-4 py-3 text-right text-xs font-bold text-gray-700 uppercase tracking-wider">
|
<th class="px-4 py-3 text-right text-xs font-bold text-gray-700 uppercase tracking-wider">
|
||||||
<a href="{{ urlStem }}?sort={{ sp }}"
|
<a href="{{ urlStem }}?sort={{ sp }}" class="text-blue-700 hover:text-blue-900">New</a>
|
||||||
class="text-blue-700 hover:text-blue-900">New</a>
|
{{ if sort == -3 }}🔼{{ else if sort == 3 }}🔽{{ end }}
|
||||||
</th>
|
</th>
|
||||||
{{ sp = iif(sort == 4, -4, 4) }}
|
{{ sp = iif(sort == 4, -4, 4) }}
|
||||||
<th class="px-4 py-3 text-right text-xs font-bold text-gray-700 uppercase tracking-wider">
|
<th class="px-4 py-3 text-right text-xs font-bold text-gray-700 uppercase tracking-wider">
|
||||||
<a href="{{ urlStem }}?sort={{ sp }}"
|
<a href="{{ urlStem }}?sort={{ sp }}" class="text-blue-700 hover:text-blue-900">Total</a>
|
||||||
class="text-blue-700 hover:text-blue-900">Total</a>
|
{{ if sort == -4 }}🔼{{ else if sort == 4 }}🔽{{ end }}
|
||||||
</th>
|
</th>
|
||||||
{{ sp = iif(sort == 5, -5, 5) }}
|
{{ sp = iif(sort == 5, -5, 5) }}
|
||||||
<th class="px-4 py-3 text-left text-xs font-bold text-gray-700 uppercase tracking-wider">
|
<th class="px-4 py-3 text-left text-xs font-bold text-gray-700 uppercase tracking-wider">
|
||||||
<a href="{{ urlStem }}?sort={{ sp }}"
|
<a href="{{ urlStem }}?sort={{ sp }}" class="text-blue-700 hover:text-blue-900">Last Response</a>
|
||||||
class="text-blue-700 hover:text-blue-900">Last Response</a>
|
{{ if sort == -5 }}🔼{{ else if sort == 5 }}🔽{{ end }}
|
||||||
</th>
|
</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
|
|||||||
Reference in New Issue
Block a user