diff --git a/packetserver/http/templates/objects.html b/packetserver/http/templates/objects.html index fe25933..5e772dd 100644 --- a/packetserver/http/templates/objects.html +++ b/packetserver/http/templates/objects.html @@ -62,7 +62,15 @@ {% for obj in objects %} {{ obj.name }} - {{ "%0.1f KB" | format(obj.size / 1024) if obj.size > 1024 else obj.size ~ " bytes" }} + + {% if obj.size < 1024 %} + {{ obj.size }} bytes + {% elif obj.size < 1048576 %} + {{ "%0.1f" | format(obj.size / 1024) }} KB + {% else %} + {{ "%0.1f" | format(obj.size / 1048576) }} MB + {% endif %} + {% if obj.binary %} Binary @@ -70,7 +78,7 @@ Text {% endif %} - {{ obj.created_at[:10] }} + {{ obj.created_at.strftime('%b %d, %Y') }} {% if obj.private %} Private @@ -78,14 +86,14 @@ Public {% endif %} - + {% if not obj.binary %} - View Text + View Text {% endif %} - Download -
+ Download + - +