website/web/templates/partials/forum_tabs.html
Noah Petherbridge 28d1e284ab User Forums: Newest Tab, Moderators
* The "Newest" tab of the forum is updated with new filter options.
  * Which forums: All, Official, Community, My List
  * Show: By threads, All posts
  * The option for "Which forums" is saved in the user's preferences and set as
    their default on future visits, similar to the Site Gallery "Whose photos"
    option.
  * So users can subscribe to their favorite forums and always get their latest
    posts easily while filtering out the rest.
* Forum Moderators
  * Add the ability to add and remove moderators for your forum.
  * Users are notified when they are added as a moderator.
  * Moderators can opt themselves out by unfollowing the forum.
* ForumMembership: add unique constraint on user_id,forum_id.
2024-08-23 22:56:40 -07:00

38 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>
<li {{if eq .CurrentForumTab "explore" }}class="is-active"{{end}}>
<a href="/forum/explore">
Explore
</a>
</li>
<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}}