aboutsummaryrefslogtreecommitdiff
path: root/static
diff options
context:
space:
mode:
authorknotteye <knotteye@airmail.cc>2021-07-02 15:10:49 -0500
committerknotteye <knotteye@airmail.cc>2021-07-02 15:10:49 -0500
commitfab8de7187571a4f3f8a30966057d661a858b645 (patch)
treed050426e46e47c6d4e4e8951dcd5bf914e919fc8 /static
parentfaae38726dd804e3246514d88f93794c23a0cdb2 (diff)
add deletion of news items
Diffstat (limited to 'static')
-rw-r--r--static/anews.html4
-rw-r--r--static/index.html3
2 files changed, 5 insertions, 2 deletions
diff --git a/static/anews.html b/static/anews.html
index 6527ce5..127760a 100644
--- a/static/anews.html
+++ b/static/anews.html
@@ -26,7 +26,9 @@
{{ range $i, $e := .NewsItems }}
<tr>
- <td><a href="/news/{{.Time}}">{{unixtoreadable $e.Time}} - {{$e.Title}}</a>
+ <td>
+ {{ if $.Board.ModCred }}<a href="/{{ $.Key }}/newsdelete/{{ $e.Time }}">[Delete] </a>{{end}}
+ <a href="/news/{{.Time}}">{{unixtoreadable $e.Time}} - {{$e.Title}}</a>
{{ if eq $i 0 }}
<br><p>{{$e.Content}}</p>
{{ end }}
diff --git a/static/index.html b/static/index.html
index 106a6b3..61aeab8 100644
--- a/static/index.html
+++ b/static/index.html
@@ -44,7 +44,8 @@
{{ range $i, $e := .NewsItems }}
<tr>
- <td><a href="/news/{{.Time}}">{{unixtoreadable $e.Time}} - {{$e.Title}}</a>
+ <td>{{ if $.Board.ModCred }}<a href="/{{ $.Key }}/newsdelete/{{ $e.Time }}">[Delete] </a>{{end}}
+ <a href="/news/{{.Time}}">{{unixtoreadable $e.Time}} - {{$e.Title}}</a>
{{ if eq $i 0 }}
<br><p>{{$e.Content}}</p>
{{ end }}