website/web/templates/forum/admin.html

127 lines
4.4 KiB
HTML
Raw Normal View History

{{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"
href="{{.Request.URL.Path}}?{{QueryPlus "page" .Pager.Previous}}">Previous</a>
<a class="pagination-next{{if not .Pager.HasNext}} is-disabled{{end}}" title="Next"
href="{{.Request.URL.Path}}?{{QueryPlus "page" .Pager.Next}}">Next page</a>
<ul class="pagination-list">
{{$Root := .}}
{{range .Pager.Iter}}
<li>
<a class="pagination-link{{if .IsCurrent}} is-current{{end}}"
aria-label="Page {{.Page}}"
href="{{$Root.Request.URL.Path}}?{{QueryPlus "page" .Page}}">
{{.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>
2023-05-24 03:04:17 +00:00
{{if .InnerCircle}}
<div class="tag is-info is-light">
<span class="icon"><img src="/static/img/circle-10.png" width="9" height="9"></span>
InnerCircle
</div>
{{end}}
{{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}}