summaryrefslogtreecommitdiff
path: root/srv/src/api/tpl
diff options
context:
space:
mode:
Diffstat (limited to 'srv/src/api/tpl')
-rw-r--r--srv/src/api/tpl/assets.html (renamed from srv/src/api/tpl/admin-assets.html)11
-rw-r--r--srv/src/api/tpl/redirect.html9
2 files changed, 17 insertions, 3 deletions
diff --git a/srv/src/api/tpl/admin-assets.html b/srv/src/api/tpl/assets.html
index 036002e..5ed6515 100644
--- a/srv/src/api/tpl/admin-assets.html
+++ b/srv/src/api/tpl/assets.html
@@ -1,5 +1,7 @@
{{ define "body" }}
+{{ $csrfFormInput := .CSRFFormInput }}
+
<h2>Upload Asset</h2>
<p>
@@ -7,8 +9,8 @@
overwritten.
</p>
-<form action={{ BlogURL "assets" }} method="POST" enctype="multipart/form-data">
- {{ .CSRFFormInput }}
+<form action="{{ BlogURL "assets/" }}" method="POST" enctype="multipart/form-data">
+ {{ $csrfFormInput }}
<div class="row">
<div class="four columns">
<input type="text" placeholder="Unique ID" name="id" />
@@ -30,7 +32,10 @@
<tr>
<td><a href="{{ AssetURL . }}" target="_blank">{{ . }}</a></td>
<td>
- Delete (TODO)
+ <form action="{{ BlogURL "assets/" }}{{ . }}?method=delete" method="POST">
+ {{ $csrfFormInput }}
+ <input type="submit" value="Delete" />
+ </form>
</td>
</tr>
{{ end }}
diff --git a/srv/src/api/tpl/redirect.html b/srv/src/api/tpl/redirect.html
new file mode 100644
index 0000000..ed12a2e
--- /dev/null
+++ b/srv/src/api/tpl/redirect.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta http-equiv="refresh" content="0; url='{{ BlogURL .Payload.Path }}'" />
+ </head>
+ <body>
+ <p>Redirecting...</p>
+ </body>
+</html>