diff options
Diffstat (limited to 'views')
-rw-r--r-- | views/layouts/main.html | 2 | ||||
-rw-r--r-- | views/manage.html | 19 |
2 files changed, 20 insertions, 1 deletions
diff --git a/views/layouts/main.html b/views/layouts/main.html index 5bc2ead..f5f446d 100644 --- a/views/layouts/main.html +++ b/views/layouts/main.html @@ -54,7 +54,7 @@ {{ end }} </ul> {{ if .page.Board.ModCred }} - {{ if eq .page.Board.ModCred .page.Board.Domain .page.Board.Actor.Id }} + {{ if or (eq .page.Board.ModCred .page.Board.Domain) (eq .page.Board.ModCred .page.Board.Actor.Id) }} <span id="manageboard">[<a href="/{{ .page.Key }}/{{ .page.Board.Name }}">Manage Board</a>]</span> {{ end }} {{ end }} diff --git a/views/manage.html b/views/manage.html index da59340..e3c03a0 100644 --- a/views/manage.html +++ b/views/manage.html @@ -7,6 +7,9 @@ <li style="display: inline-block;">[<a href="#followers"> Subscribers </a>]</li> {{ end }} <li style="display: inline-block;">[<a href="#reported"> Reported </a>]</li> + {{ if eq .page.Board.ModCred "admin" }} + <li style="display: inline-block;">[<a href="#jannies"> Janitor Managment </a>]</li> + {{ end }} </ul> </div> [<a href="/{{ .page.Board.Name }}">Return</a>] @@ -59,6 +62,22 @@ </ul> </div> +{{ if eq .page.Board.ModCred "admin" }} +<div id="jannies" class="box2" style="margin-bottom: 25px; padding: 12px;"> + <h4 style="margin: 0; margin-bottom: 5px;">Janitor Managment</h4> + <form id="janny-form" action="/{{ .page.Key }}/{{ .page.Board.Name }}/addjanny" method="post" enctype="application/x-www-form-urlencoded" style="margin-top: 5px;"> + <input id="label" name="label" style="margin-bottom: 5px;" size="35" placeholder="Label i.e Janny Alias"></input> + <input type="submit" value="Add Janitor"><br> + <input type="hidden" name="actor" value="{{ $board.Actor.Id }}"> + </form> + <ul style="display: inline-block; padding: 0; margin: 0; list-style-type: none;"> + {{ range .jannies }} + <li>{{ .Label }} - <b>Login:</b> {{ .Identifier }} <b>Code:</b> {{ .Code }} <a href="/{{ $key }}/{{ $board.Name }}/deletejanny?code={{ .Code }}">[Revoke]</a></li> + {{ end }} + </ul> +</div> +{{ end }} + {{ template "partials/footer" .page }} {{ template "partials/general_scripts" .page }} |