mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-03-21 19:25:16 +00:00
webish: display timestamps
This commit is contained in:
parent
3a1db45579
commit
3d72d00826
@ -27,6 +27,7 @@
|
||||
<td>Filename</td>
|
||||
<td>Type</td>
|
||||
<td>Size</td>
|
||||
<td>Times</td>
|
||||
<td>other representations</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
@ -38,6 +39,7 @@
|
||||
<td><n:slot name="filename"/></td>
|
||||
<td><n:slot name="type"/></td>
|
||||
<td><n:slot name="size"/></td>
|
||||
<td><n:slot name="times"/></td>
|
||||
<td><n:slot name="data"/></td>
|
||||
<td><n:slot name="delete"/></td>
|
||||
<td><n:slot name="overwrite"/></td>
|
||||
|
@ -205,6 +205,21 @@ class Directory(rend.Page):
|
||||
ctx.fillSlots("overwrite", self.build_overwrite(ctx, (name, target)))
|
||||
ctx.fillSlots("check", check)
|
||||
|
||||
times = []
|
||||
TIME_FORMAT = "%H:%M:%S %d-%b-%Y"
|
||||
if "ctime" in metadata:
|
||||
ctime = time.strftime(TIME_FORMAT,
|
||||
time.localtime(metadata["ctime"]))
|
||||
times.append("c: " + ctime)
|
||||
if "mtime" in metadata:
|
||||
mtime = time.strftime(TIME_FORMAT,
|
||||
time.localtime(metadata["mtime"]))
|
||||
if times:
|
||||
times.append(T.br())
|
||||
times.append("m: " + mtime)
|
||||
ctx.fillSlots("times", times)
|
||||
|
||||
|
||||
# build the base of the uri_link link url
|
||||
uri_link = "/uri/" + urllib.quote(target.get_uri())
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user