2022-08-24 05:55:19 +00:00
|
|
|
{{define "title"}}Forums{{end}}
|
|
|
|
{{define "content"}}
|
|
|
|
<div class="block">
|
|
|
|
<section class="hero is-light is-danger">
|
|
|
|
<div class="hero-body">
|
|
|
|
<div class="container">
|
|
|
|
<h1 class="title">
|
|
|
|
<span class="icon mr-4"><i class="fa fa-gavel"></i></span>
|
|
|
|
<span>Forum Administration</span>
|
|
|
|
</h1>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</section>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{$Root := .}}
|
|
|
|
|
|
|
|
<div class="block p-2">
|
|
|
|
<a href="/forum/admin/edit" class="button is-success">
|
|
|
|
<span class="icon"><i class="fa fa-plus"></i></span>
|
|
|
|
<span>Create New Forum</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p class="block p-2">
|
|
|
|
Found <strong>{{.Pager.Total}}</strong> forum{{Pluralize64 .Pager.Total}} you can manage
|
|
|
|
(page {{.Pager.Page}} of {{.Pager.Pages}}).
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<div class="block p-2">
|
|
|
|
<nav class="pagination" role="navigation" aria-label="pagination">
|
|
|
|
<a class="pagination-previous{{if not .Pager.HasPrevious}} is-disabled{{end}}" title="Previous"
|
2022-09-10 19:09:46 +00:00
|
|
|
href="{{.Request.URL.Path}}?{{QueryPlus "page" .Pager.Previous}}">Previous</a>
|
2022-08-24 05:55:19 +00:00
|
|
|
<a class="pagination-next{{if not .Pager.HasNext}} is-disabled{{end}}" title="Next"
|
2022-09-10 19:09:46 +00:00
|
|
|
href="{{.Request.URL.Path}}?{{QueryPlus "page" .Pager.Next}}">Next page</a>
|
2022-08-24 05:55:19 +00:00
|
|
|
<ul class="pagination-list">
|
|
|
|
{{$Root := .}}
|
|
|
|
{{range .Pager.Iter}}
|
|
|
|
<li>
|
|
|
|
<a class="pagination-link{{if .IsCurrent}} is-current{{end}}"
|
|
|
|
aria-label="Page {{.Page}}"
|
2022-09-10 19:09:46 +00:00
|
|
|
href="{{$Root.Request.URL.Path}}?{{QueryPlus "page" .Page}}">
|
2022-08-24 05:55:19 +00:00
|
|
|
{{.Page}}
|
|
|
|
</a>
|
|
|
|
</li>
|
|
|
|
{{end}}
|
|
|
|
</ul>
|
|
|
|
</nav>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="block p-2">
|
|
|
|
{{range .Forums}}
|
|
|
|
<div class="box">
|
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
|
|
|
<h1 class="title">{{.Title}}</h1>
|
|
|
|
<h2 class="subtitle">
|
|
|
|
/f/{{.Fragment}}
|
|
|
|
{{if .Category}}<span class="ml-4">{{.Category}}</span>{{end}}
|
|
|
|
<span class="ml-4">
|
|
|
|
by <strong><a href="/u/{{.Owner.Username}}">{{.Owner.Username}}</a></strong>
|
|
|
|
{{if .Owner.IsAdmin}}<i class="fa fa-gavel has-text-danger ml-1"></i>{{end}}
|
|
|
|
</span>
|
|
|
|
</h2>
|
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
<p>
|
|
|
|
|
|
|
|
</p>
|
|
|
|
|
|
|
|
{{if eq .Description ""}}
|
|
|
|
<p><em>No description</em></p>
|
|
|
|
{{else}}
|
|
|
|
{{ToMarkdown .Description}}
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div>
|
|
|
|
{{if .Explicit}}
|
|
|
|
<div class="tag is-danger is-light">
|
|
|
|
<span class="icon"><i class="fa fa-fire"></i></span>
|
|
|
|
Explicit
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .Privileged}}
|
|
|
|
<div class="tag is-warning is-light">
|
|
|
|
<span class="icon"><i class="fa fa-gavel"></i></span>
|
|
|
|
Privileged
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
{{if .PermitPhotos}}
|
|
|
|
<div class="tag is-info is-light">
|
|
|
|
<span class="icon"><i class="fa fa-camera"></i></span>
|
|
|
|
PermitPhotos
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
|
|
|
|
<div class="tag is-light">
|
|
|
|
Created {{.CreatedAt.Format "2006-01-02 15:04:05"}}
|
|
|
|
</div>
|
|
|
|
<div class="tag is-light">
|
|
|
|
Updated {{.UpdatedAt.Format "2006-01-02 15:04:05"}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="column is-narrow">
|
|
|
|
<a href="/forum/admin/edit?id={{.ID}}" class="button has-text-success">
|
|
|
|
<span class="icon"><i class="fa fa-edit"></i></span>
|
|
|
|
<span>Edit</span>
|
|
|
|
</a>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|