2022-08-24 05:55:19 +00:00
|
|
|
{{define "title"}}{{.Forum.Title}}{{end}}
|
|
|
|
{{define "content"}}
|
|
|
|
<div class="block">
|
|
|
|
<section class="hero is-light is-success">
|
|
|
|
<div class="hero-body">
|
|
|
|
<div class="container">
|
2024-08-21 04:26:53 +00:00
|
|
|
<div class="level">
|
|
|
|
<div class="level-left mb-4">
|
|
|
|
<h1 class="title">
|
|
|
|
<span class="icon mr-4"><i class="fa fa-comments"></i></span>
|
|
|
|
<span>{{.Forum.Title}}</span>
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{if .FeatureUserForumsEnabled}}
|
|
|
|
<div class="level-right">
|
|
|
|
<!-- Follow/Unfollow This Forum -->
|
|
|
|
<form action="/forum/subscribe" method="POST" class="is-inline">
|
|
|
|
{{InputCSRF}}
|
|
|
|
<input type="hidden" name="fragment" value="{{.Forum.Fragment}}">
|
|
|
|
|
|
|
|
{{if .IsForumSubscribed}}
|
|
|
|
<button type="submit" class="button"
|
|
|
|
name="intent" value="unfollow"
|
|
|
|
onclick="return confirm('Do you want to remove this forum from your list?')">
|
|
|
|
<span class="icon"><i class="fa fa-bookmark"></i></span>
|
|
|
|
<span>Followed</span>
|
|
|
|
</button>
|
|
|
|
{{else}}
|
|
|
|
<button type="submit" class="button"
|
|
|
|
name="intent" value="follow">
|
|
|
|
<span class="icon"><i class="fa-regular fa-bookmark"></i></span>
|
|
|
|
<span>Follow</span>
|
|
|
|
</button>
|
|
|
|
{{end}}
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
2022-08-24 05:55:19 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{$Root := .}}
|
|
|
|
|
2022-08-26 02:58:43 +00:00
|
|
|
<div class="block p-4">
|
2022-08-24 05:55:19 +00:00
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
|
|
|
<nav class="breadcrumb" aria-label="breadcrumbs">
|
|
|
|
<ul>
|
|
|
|
<li><a href="/forum">Forums</a></li>
|
|
|
|
<li class="is-active">
|
|
|
|
<a href="{{.Request.URL.Path}}" aria-current="page">{{.Forum.Title}}</a>
|
|
|
|
</li>
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
<div class="column is-narrow">
|
2024-08-22 04:53:35 +00:00
|
|
|
<!-- Edit button for forum's settings -->
|
|
|
|
{{if or (eq .Forum.OwnerID .CurrentUser.ID) (.CurrentUser.HasAdminScope "admin.forum.manage")}}
|
|
|
|
<a href="/forum/admin/edit?id={{.Forum.ID}}" class="button mr-2">
|
|
|
|
<span class="icon"><i class="fa fa-gear"></i></span>
|
|
|
|
</a>
|
|
|
|
{{end}}
|
|
|
|
|
2022-08-25 04:17:34 +00:00
|
|
|
{{if or .CurrentUser.IsAdmin (not .Forum.Privileged) (eq .Forum.OwnerID .CurrentUser.ID)}}
|
2024-08-21 04:26:53 +00:00
|
|
|
<a href="/forum/post?to={{.Forum.Fragment}}" class="button is-info">
|
2022-08-24 05:55:19 +00:00
|
|
|
<span class="icon"><i class="fa fa-plus"></i></span>
|
|
|
|
<span>New Thread</span>
|
|
|
|
</a>
|
2022-08-25 04:17:34 +00:00
|
|
|
{{end}}
|
2022-08-24 05:55:19 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p class="block p-2">
|
|
|
|
Found <strong>{{.Pager.Total}}</strong> post{{Pluralize64 .Pager.Total}} on this forum
|
|
|
|
(page {{.Pager.Page}} of {{.Pager.Pages}}).
|
|
|
|
</p>
|
|
|
|
|
2022-08-25 04:17:34 +00:00
|
|
|
{{if .Forum.Privileged}}
|
|
|
|
<div class="block p-2 notification is-warning is-light">
|
2023-08-30 07:08:20 +00:00
|
|
|
<i class="fa fa-peace mr-1"></i>
|
2022-08-25 04:17:34 +00:00
|
|
|
Only moderators may create new threads on this forum. You may be able to reply to threads here.
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
2022-08-24 05:55:19 +00:00
|
|
|
<div class="block p-2">
|
2023-06-22 03:46:27 +00:00
|
|
|
{{SimplePager .Pager}}
|
2022-08-24 05:55:19 +00:00
|
|
|
</div>
|
|
|
|
|
2024-08-22 04:53:35 +00:00
|
|
|
<!-- If no posts at all? -->
|
|
|
|
{{if not .Threads}}
|
|
|
|
<div class="block p-2">
|
|
|
|
<div class="notification is-info is-light content">
|
|
|
|
<p>
|
|
|
|
There are no posts yet on this forum.
|
|
|
|
{{if not .Forum.Privileged}}
|
|
|
|
Why not <a href="/forum/post?to={{.Forum.Fragment}}">start the first thread?</a>
|
|
|
|
{{end}}
|
|
|
|
</p>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
2022-08-24 05:55:19 +00:00
|
|
|
{{$Root := .}}
|
|
|
|
<div class="block p-2">
|
|
|
|
{{range .Threads}}
|
|
|
|
{{$Stats := $Root.ThreadMap.Get .ID}}
|
2024-03-30 21:09:16 +00:00
|
|
|
<div class="box has-background-success-light has-text-dark">
|
2022-08-24 05:55:19 +00:00
|
|
|
<div class="columns">
|
2022-08-26 02:58:43 +00:00
|
|
|
<div class="column is-2 has-text-centered pt-0 pb-1">
|
2022-08-24 05:55:19 +00:00
|
|
|
<div>
|
|
|
|
<a href="/u/{{.Comment.User.Username}}">
|
2022-09-09 04:42:20 +00:00
|
|
|
{{template "avatar-64x64" .Comment.User}}
|
2022-08-24 05:55:19 +00:00
|
|
|
</a>
|
|
|
|
</div>
|
2023-12-21 23:09:23 +00:00
|
|
|
<a href="/u/{{.Comment.User.Username}}">{{.Comment.User.NameOrUsername}}</a>
|
2022-08-24 05:55:19 +00:00
|
|
|
</div>
|
2022-08-26 02:58:43 +00:00
|
|
|
<div class="column content pt-1 pb-0">
|
2022-09-01 05:58:32 +00:00
|
|
|
<a href="/forum/thread/{{.ID}}">
|
2024-03-30 21:09:16 +00:00
|
|
|
<h2 class="is-size-4 pt-0 has-text-dark">
|
2022-08-26 02:58:43 +00:00
|
|
|
{{if .Pinned}}<sup class="fa fa-thumbtack has-text-success mr-2 is-size-6" title="Pinned"></sup>{{end}}
|
2022-08-24 05:55:19 +00:00
|
|
|
{{or .Title "Untitled"}}
|
2022-08-26 02:58:43 +00:00
|
|
|
</h2>
|
2022-08-24 05:55:19 +00:00
|
|
|
{{TrimEllipses .Comment.Message 256}}
|
|
|
|
</a>
|
|
|
|
|
2022-08-26 02:58:43 +00:00
|
|
|
<hr class="has-background-success my-2">
|
2022-08-24 05:55:19 +00:00
|
|
|
<div>
|
2022-08-25 04:17:34 +00:00
|
|
|
{{if .Pinned}}
|
|
|
|
<span class="tag is-success is-light mr-2">
|
|
|
|
<span class="icon"><i class="fa fa-thumbtack"></i></span>
|
|
|
|
<span>Pinned</span>
|
|
|
|
</span>
|
|
|
|
{{end}}
|
|
|
|
|
2022-12-21 03:15:45 +00:00
|
|
|
{{if .PollID}}
|
|
|
|
<span class="tag is-info is-light mr-2">
|
|
|
|
<span class="icon"><i class="fa fa-poll"></i></span>
|
|
|
|
<span>Poll</span>
|
|
|
|
</span>
|
|
|
|
{{end}}
|
|
|
|
|
2022-08-25 04:17:34 +00:00
|
|
|
{{if .Explicit}}
|
|
|
|
<span class="tag is-danger is-light mr-2">
|
|
|
|
<span class="icon"><i class="fa fa-fire"></i></span>
|
|
|
|
<span>NSFW</span>
|
|
|
|
</span>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .NoReply}}
|
|
|
|
<span class="tag is-warning is-light mr-2" title="This thread can not be replied to.">
|
|
|
|
<span class="icon"><i class="fa fa-ban"></i></span>
|
|
|
|
<span>No Reply</span>
|
|
|
|
</span>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
<em title="{{.UpdatedAt.Format "2006-01-02 15:04:05"}}">Updated {{SincePrettyCoarse .UpdatedAt}} ago</em>
|
2022-08-24 05:55:19 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-26 02:58:43 +00:00
|
|
|
<div class="column is-narrow pb-1 pt-0 px-1">
|
2022-08-24 05:55:19 +00:00
|
|
|
<div class="columns is-mobile">
|
2022-08-26 02:58:43 +00:00
|
|
|
<div class="column has-text-centered pr-1">
|
|
|
|
<div class="box p-2">
|
2022-08-24 05:55:19 +00:00
|
|
|
<p class="is-size-7">Replies</p>
|
|
|
|
{{if $Stats}}
|
|
|
|
{{$Stats.Replies}}
|
|
|
|
{{else}}
|
|
|
|
err
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
2022-08-26 02:58:43 +00:00
|
|
|
<div class="column has-text-centered pl-1">
|
|
|
|
<div class="box p-2">
|
2022-08-24 05:55:19 +00:00
|
|
|
<p class="is-size-7">Views</p>
|
|
|
|
{{if $Stats}}
|
|
|
|
{{$Stats.Views}}
|
|
|
|
{{else}}
|
|
|
|
err
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
2023-09-30 22:24:14 +00:00
|
|
|
<div class="block p-2">
|
|
|
|
{{SimplePager .Pager}}
|
|
|
|
</div>
|
|
|
|
|
2024-08-22 04:53:35 +00:00
|
|
|
<!-- Info box: owner, moderators -->
|
|
|
|
<div class="block p-2">
|
|
|
|
<div class="box">
|
|
|
|
|
2024-08-22 06:06:06 +00:00
|
|
|
<label class="label"><i class="fa fa-info-circle"></i> Forum Info</label>
|
2024-08-22 04:53:35 +00:00
|
|
|
<div class="mb-4">
|
2024-08-22 06:06:06 +00:00
|
|
|
Created on: <span title="{{.Forum.CreatedAt}}">{{.Forum.CreatedAt.Format "Jan _2 2006"}}</span>
|
2024-08-22 04:53:35 +00:00
|
|
|
<div class="mt-2">
|
|
|
|
{{if .Forum.Explicit}}
|
|
|
|
<span class="tag is-danger is-light">
|
|
|
|
<span class="icon"><i class="fa fa-fire"></i></span>
|
|
|
|
<span>Explicit</span>
|
|
|
|
</span>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .Forum.Privileged}}
|
|
|
|
<span class="tag is-warning is-light">
|
|
|
|
<span class="icon"><i class="fa fa-peace"></i></span>
|
|
|
|
<span>Privileged</span>
|
|
|
|
</span>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .Forum.PermitPhotos}}
|
|
|
|
<span class="tag is-grey">
|
|
|
|
<span class="icon"><i class="fa fa-camera"></i></span>
|
|
|
|
<span>Photos</span>
|
|
|
|
</span>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .Forum.Private}}
|
|
|
|
<span class="tag is-private is-light">
|
|
|
|
<span class="icon"><i class="fa fa-lock"></i></span>
|
|
|
|
<span>Private</span>
|
|
|
|
</span>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2024-08-22 06:06:06 +00:00
|
|
|
<label class="label"><i class="fa fa-user-tie"></i> Forum Moderators</label>
|
2024-08-22 04:53:35 +00:00
|
|
|
|
|
|
|
<!-- The owner first -->
|
2024-08-24 04:21:42 +00:00
|
|
|
{{if .Forum.OwnerID}}
|
|
|
|
{{template "avatar-16x16" .Forum.Owner}}
|
|
|
|
<a href="/u/{{.Forum.Owner.Username}}">
|
|
|
|
{{.Forum.Owner.Username}}
|
|
|
|
</a>
|
|
|
|
<small class="has-text-grey pr-2">(owner)</small>
|
|
|
|
{{end}}
|
2024-08-22 04:53:35 +00:00
|
|
|
|
|
|
|
<!-- Additional moderators -->
|
|
|
|
{{range .ForumModerators}}
|
2024-08-24 04:21:42 +00:00
|
|
|
<span class="pr-2">
|
2024-08-22 04:53:35 +00:00
|
|
|
{{template "avatar-16x16" .}}
|
|
|
|
<a href="/u/{{.Username}}">
|
|
|
|
{{.Username}}
|
|
|
|
</a>
|
|
|
|
</span>
|
|
|
|
{{end}}
|
2024-08-22 06:06:06 +00:00
|
|
|
|
2024-08-24 04:21:42 +00:00
|
|
|
<!-- If there is no owner, show a petition notice. -->
|
|
|
|
{{if not .Forum.OwnerID}}
|
|
|
|
<div class="mt-4 is-size-7">
|
|
|
|
<i class="fa fa-info-circle has-text-success mr-1"></i>
|
|
|
|
This forum's owner has deleted their account, and this forum is in need of a new owner.
|
|
|
|
You may <a href="/contact?intent=contact&subject=forum.adopt&id={{.Forum.ID}}" class="has-text-success">petition to adopt</a>
|
|
|
|
this forum.
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
2024-08-22 06:06:06 +00:00
|
|
|
<div class="columns is-multiline is-mobile mt-4 is-size-7">
|
2024-08-24 04:21:42 +00:00
|
|
|
<!-- Adoption link -->
|
|
|
|
{{if not .Forum.OwnerID}}
|
|
|
|
<div class="column is-narrow">
|
|
|
|
<a href="/contact?intent=contact&subject=forum.adopt&id={{.Forum.ID}}" class="has-text-success">
|
|
|
|
<i class="fa fa-info-circle"></i> Adopt this forum
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
2024-08-22 06:06:06 +00:00
|
|
|
<div class="column is-narrow">
|
|
|
|
<a href="/contact?intent=report&subject=report.forum&id={{.Forum.ID}}" class="has-text-danger">
|
|
|
|
<i class="fa fa-flag"></i> Report this forum
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
2024-08-22 04:53:35 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2023-06-22 03:46:27 +00:00
|
|
|
{{end}}
|