aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorJulian Hurst <ark@mansus.space>2023-01-13 12:03:54 +0100
committerJulian Hurst <ark@mansus.space>2023-01-13 12:03:54 +0100
commit061b0402fcee0763b2eb87e5ad2a31687f95b307 (patch)
tree328b4e4b6e65a74f418db2be9f8d4b3fa4ec0b72 /templates
parentc3de52dff91b81cfd07e00fb7fc6dd701bf8b7d7 (diff)
downloaddocspace-061b0402fcee0763b2eb87e5ad2a31687f95b307.tar.gz
Add support for downloading files in zip
Diffstat (limited to 'templates')
-rw-r--r--templates/user.html55
1 files changed, 31 insertions, 24 deletions
diff --git a/templates/user.html b/templates/user.html
index 5e0aa57..f37c2fb 100644
--- a/templates/user.html
+++ b/templates/user.html
@@ -2,34 +2,41 @@
{{define "content"}}
<h1>Espace utilisateur</h1>
<h2>Documents</h2>
+{{if .Error}}
+<p class="error">{{.Error}}</p>
+{{end}}
<div>
<form action="/upload" method="POST" enctype="multipart/form-data">
<input type="file" name="files" multiple />
<input type="submit" value="Upload" />
</form>
- <table>
- <tr>
- <th></th>
- <th>Nom du fichier</th>
- <th>Date de modification</th>
- <th>Taille</th>
- </tr>
- {{range .Docs}}
- <tr>
- <td>
- <input type="checkbox">
- </td>
- <td>
- <a href="{{.Link}}">{{.Name}}</a>
- </td>
- <td>
- {{.ModTime}}
- </td>
- <td>
- {{.Size}}
- </td>
- </tr>
- {{end}}
- </table>
+ <form action="/download" method="POST">
+ <table>
+ <tr>
+ <th></th>
+ <th>Nom du fichier</th>
+ <th>Date de modification</th>
+ <th>Taille</th>
+ </tr>
+ {{range .Docs}}
+ <tr>
+ <td>
+ <input type="checkbox" name="selection" value="{{.Link}}">
+ </td>
+ <td>
+ <a href="{{.Link}}">{{.Name}}</a>
+ </td>
+ <td>
+ {{.ModTime}}
+ </td>
+ <td>
+ {{.Size}}
+ </td>
+ </tr>
+ {{end}}
+ </table>
+ <br/>
+ <input type="submit" value="Télécharger les fichiers sélectionnés">
+ </form>
</div>
{{end}}