website/web/templates/partials/forum_tabs.html
Noah Petherbridge 8a321eb8d2 User-owned Forum Improvements
* Private forums: CanBeSeenBy moderators, approved followers, its owner and
  admin users.
  * Note: the endpoint to subscribe to the forum won't allow users to follow
    the private forum, so approved followers can not be created at this time,
    except by adding them as moderators.
* Admins: when creating a forum they can choose "no category" to create it as
  an unofficial community forum.
* Code cleanup
  * More feature flag checking
2024-08-23 22:56:40 -07:00

40 lines
1.1 KiB
HTML

<!--
Reusable Forums tab bar.
Usage: [[ForumTabs .]]
Variables that your template should set:
- CurrentForumTab (string): one of categories, newest, search.
-->
{{define "ForumTabs"}}
<div class="block p-4 mb-0">
<div class="tabs is-boxed">
<ul>
<li {{if or (eq .CurrentForumTab "categories") (not .CurrentForumTab) }}class="is-active"{{end}}>
<a href="/forum">
Categories
</a>
</li>
{{if .FeatureUserForumsEnabled}}
<li {{if eq .CurrentForumTab "explore" }}class="is-active"{{end}}>
<a href="/forum/explore">
Explore
</a>
</li>
{{end}}
<li {{if eq .CurrentForumTab "newest" }}class="is-active"{{end}}>
<a href="/forum/newest">
Newest
</a>
</li>
<li {{if eq .CurrentForumTab "search" }}class="is-active"{{end}}>
<a href="/forum/search">
<i class="fa fa-search mr-2"></i> Search
</a>
</li>
</ul>
</div>
</div>
{{end}}