more precise file removal information mfoerste
authorMatthias Förste <foerste@schlittermann.de>
Thu, 02 Oct 2014 15:57:18 +0200
branchmfoerste
changeset 25 7799907aaa32
parent 24 b136280295a2
child 26 74eb20ec1538
more precise file removal information
upload.pl
--- a/upload.pl	Thu Oct 02 15:48:44 2014 +0200
+++ b/upload.pl	Thu Oct 02 15:57:18 2014 +0200
@@ -165,11 +165,20 @@
                 next;
             }
 
+            my $d;
+            if ($delete eq 'l') {
+                $d = localtime ${expires};
+            } elsif ($delete eq 'd') {
+                $d = 'unmittelbar nach Download';
+            } else {
+                $d = 'nur manuell';
+            }
+
             print Tr(
                 td(a { href => "$DIR_URI/$dir/$file" }, $file),
                 td({ align => "right" }, human((stat $_)[7])),
                 td(scalar localtime +(stat $_)[9]),
-                td($delete eq 'l' ? scalar localtime ${expires} : 'nicht verfügbar'),
+                td($d),
                 td(a({ href => "?delete=$dir" }, "remove"))
             );
         }
@@ -182,7 +191,7 @@
         td(filefield(-name => "upload", -default => "nothing")),
       ),
       Tr(td("Löschen in: "), td(textfield(-name => "expires", -default => 10)),
-        td("Tagen (0: beim ersten Download; -1: nur manuell)")),
+        td("Tagen (0: unmittelbar nach Download; -1: nur manuell)")),
       Tr(td(), td(submit(-value => "Hochladen")),),
       end_table,
       end_multipart_form;