aboutsummaryrefslogtreecommitdiff
path: root/views/tree-list.html
diff options
context:
space:
mode:
authorAlberto Bertogli <albertito@blitiri.com.ar>2017-08-27 20:17:26 +0200
committerAlberto Bertogli <albertito@blitiri.com.ar>2017-08-27 20:17:26 +0200
commit5def4c9e01c87073d743a71827fee1be0ee41881 (patch)
tree3dc436a17b12c94316d93d72011fea0f03878d2b /views/tree-list.html
parent891a9443817329492c75ad99b8ff8899c460dee1 (diff)
downloadgit-arr-fork-5def4c9e01c87073d743a71827fee1be0ee41881.zip
views: Include the root tree in the summary
Including the tree as part of the summary gives a bit more information and provides an easy path into the tree. It does clutter things a bit, so this is an experiment and may be removed later.
Diffstat (limited to 'views/tree-list.html')
-rw-r--r--views/tree-list.html16
1 files changed, 16 insertions, 0 deletions
diff --git a/views/tree-list.html b/views/tree-list.html
new file mode 100644
index 0000000..5eea1aa
--- /dev/null
+++ b/views/tree-list.html
@@ -0,0 +1,16 @@
+<table class="nice ls">
+% key_func = lambda (t, n, s): (t != 'tree', n.raw)
+% for type, name, size in sorted(tree.ls(dirname.raw), key = key_func):
+ <tr class="{{type}}">
+% if type == "blob":
+ <td class="name"><a href="{{treeroot}}/f={{name.url}}.html">
+ {{!name.html}}</a></td>
+ <td class="size">{{size}}</td>
+% elif type == "tree":
+ <td class="name">
+ <a class="explicit" href="{{treeroot}}/{{name.url}}/">
+ {{!name.html}}/</a></td>
+% end
+ </tr>
+% end
+</table>