46 lines
1.9 KiB
Plaintext
46 lines
1.9 KiB
Plaintext
{*
|
|
* Amsterdam Web Communities System
|
|
* Copyright (c) 2025 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/.
|
|
*}
|
|
<!-- Communities sidebox -->
|
|
{{ sb := .GetScratch("__sidebox") }}
|
|
<div class="mb-4">
|
|
<div class="bg-blue-600 px-2 py-1 rounded-t">
|
|
<h3 class="text-white font-bold text-base">{{ sb.Title }}</h3>
|
|
</div>
|
|
<div class="bg-blue-400 px-2 py-2 rounded-b">
|
|
<div class="space-y-2">
|
|
{{ if len(sb.Items) > 0 }}
|
|
{{ range sb.Items }}
|
|
<div class="flex items-center">
|
|
<span class="mr-2">🟣</span>
|
|
<a href="{{ .Link }}" class="text-blue-700 hover:text-blue-900 font-bold text-sm">{{ .Text }}</a>
|
|
{{ if .Flags["admin"] }}<span class="ml-1">👑</span>{{ end }}
|
|
</div>
|
|
{{ end }}
|
|
{{ else }}
|
|
<div class="text-small">You are not a member of any communities.</div>
|
|
{{ end }}
|
|
</div>
|
|
{{ if sb.Flags["canManage"] || sb.Flags["canCreate"] }}
|
|
<div class="mt-3 text-center">
|
|
<span class="text-black text-xs font-bold">
|
|
[
|
|
{{ if sb.Flags["canManage"] }}
|
|
<a href="/TODO/manage_comms" class="text-blue-700 hover:text-blue-900">Manage</a>
|
|
{{ if sb.Flags["canCreate"] }}|{{ end }}
|
|
{{ end }}
|
|
{{ if sb.Flags["canCreate"] }}
|
|
<a href="/TODO/create_comm" class="text-blue-700 hover:text-blue-900">Create New</a>
|
|
{{ end }}
|
|
]
|
|
</span>
|
|
</div>
|
|
{{ end }}
|
|
</div>
|
|
</div>
|