--- a/templates/inventory.html Thu Dec 24 00:49:28 2015 +0100
+++ b/templates/inventory.html Thu Dec 24 01:26:00 2015 +0100
@@ -1,36 +1,45 @@
-[% PROCESS header.tt -%]
-<html>
-<head>
-<title>[% product %]</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<style type="text/css">
- th { text-align: left; }
-</style>
-</head>
-<body>
+[% WRAPPER once.tt %]
<h1>Ansicht: [% view %]</h1>
-<p>
-Der gültige Download-Link ist die Link-Adresse, die sich hinter
-dem Datei-Namen verbirgt. (Firefox: Rechte Maustaste,
-Link-Location). Nach Ablauf des <a href="http://de.wikipedia.org/wiki/Mindesthaltbarkeitsdatum">MHD</a>
-wird die Datei automatisch gelöscht.
-</p>
+
+[% IF files %]
+ <p>
+ Der gültige Download-Link ist die Link-Adresse, die sich hinter
+ dem Datei-Namen verbirgt. (Firefox: Rechte Maustaste,
+ Link-Location). Nach Ablauf des <a href="http://de.wikipedia.org/wiki/Mindesthaltbarkeitsdatum">MHD</a>
+ wird die Datei automatisch gelöscht.
+ </p>
+
+ <hr />
+
+ [%# Table for the files, our repository %]
-<hr />
+ <table>
+ <tr><th>Name</th><th>Größe</th><th>Hochgeladen</th><th>Löschung</hr><th>Aktion</th>
+ </tr>
+ [% FOREACH file IN files %]
+ <tr>
+ <td><a href="[% file.link %]">[% file.name %]</a></td>
+ <td align="right">[% file.size %]</td>
+ <td>[% date.format(file.uploaded, "%c") %]</td>
+ <td>[% file.removal.type %]</td>
+ <td><a href="[% file.removal.link %]">remove</a></td>
+ </td>
+ [% END # foreach %]
+ </table>
+[% END # files %]
+[%# Formular for upload %]
+<form enctype="multipart/form-data">
<table>
-<tr><th>Name</th><th>Größe</th><th>Hochgeladen</th><th>Löschung</hr><th>Aktion</th>
+<tr><td>Dateiname: </td>
+ <td><input type="file" name="upload" value="nothing" /></td>
+</tr><tr>
+ <td>Löschen in: </td><td><input type="text" name="expires" value="0" /></td>
+ <td>Tagen (0: unmittelbar nach Download, -1: manuell)</td>
+</tr><tr>
+ <td /><td><input type="submit" name=".submit" value="Hochladen" /></td>
</tr>
-[% FOREACH file IN files %]
-<tr>
- <td><a href="[% file.link %]">[% file.name %]</a></td>
- <td align="right">[% file.size %]</td>
- <td>[% date.format(file.uploaded, "%c") %]</td>
- <td>[% file.removal.type %]</td>
- <td><a href="[% file.removal.link %]">remove</a></td>
-</td>
+</table>
+</form>
+
[% END %]
-</table>
-[% INCLUDE footer.html %]
-</body>
-</html>