summaryrefslogtreecommitdiffstats
path: root/gitsrht/templates/tree.html
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-09-21 18:21:32 -0400
committerDrew DeVault <sir@cmpwn.com>2018-09-21 18:21:32 -0400
commit35854188daf6f2ec4ff77ff63e795b0c7d89da9b (patch)
tree404a24327a15232c55e6b83c1e6600a287bec798 /gitsrht/templates/tree.html
parent662257ff3ecef739375524649265a3938a81faf8 (diff)
Implement tree annotation
Diffstat (limited to 'gitsrht/templates/tree.html')
-rw-r--r--gitsrht/templates/tree.html11
1 files changed, 8 insertions, 3 deletions
diff --git a/gitsrht/templates/tree.html b/gitsrht/templates/tree.html
index 3e79a26..d2d4df0 100644
--- a/gitsrht/templates/tree.html
+++ b/gitsrht/templates/tree.html
@@ -27,11 +27,16 @@
<a href="#">{{entry.name}}{% if entry.type == "tree" %}/{% endif %}</a>
</div>
<div class="commit">
- <a href="#">{{trim_commit(commit.message)}}</a> &mdash;
- {{ commit_time(commit) | date }}
+ {% if entry.commit %}
+ <a href="#">{{trim_commit(entry.commit.message)}}</a> &mdash;
+ {{ commit_time(entry.commit) | date }}
+ {% endif %}
</div>
<div class="size">
- 1234 bytes
+ {% if entry.type == "blob" %}
+ {{humanize.naturalsize(entry.blob.size,
+ binary=True).replace("Byte", "byte")}}
+ {% endif %}
</div>
{% endfor %}
</div>