diff options
Diffstat (limited to 'bn_django/git_browse/templates/git_browse/tree.html')
-rw-r--r-- | bn_django/git_browse/templates/git_browse/tree.html | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/bn_django/git_browse/templates/git_browse/tree.html b/bn_django/git_browse/templates/git_browse/tree.html index 046d85c..3c8c294 100644 --- a/bn_django/git_browse/templates/git_browse/tree.html +++ b/bn_django/git_browse/templates/git_browse/tree.html @@ -2,19 +2,22 @@ {% block gitbrowse %} - {% if all_objs %} <h3>Tree sha1 hash:</h3><br /> {{ hash }}<br /> <h3>Directory listing:</h3> - {% for obj in all_objs %} -[{{obj.type}}] - {% ifequal obj.type 'blob'%} - <a href='/code/{{ object.slug }}/obj/{{ obj.id }}/'>{{obj.name}}</a> {% else %} - {% ifequal obj.type 'tree'%} - <a href='/code/{{object.slug}}/tree/{{ obj.id }}/'>{{obj.name}}</a> + {% include tree_table %} + {% if tree_objs %} + {% for o in tree_objs %} + [{{o.type}}] {{ o.mode }} + {% ifequal o.type 'blob' %} + <a href='/code/{{ object.slug }}/blob/{{ o.id }}/'>{{o.name}}</a> + {% else %} + {% ifequal o.type 'tree' %} + <a href='/code/{{object.slug}}/tree/{{ o.id }}/'>{{o.name}}</a> {% else %} - <a href='/code/{{object.slug}}/obj/{{ obj.id }}/'>{{obj.name}}</a> + <a href='/code/{{object.slug}}/obj/{{ o.id }}/'>{{o.name}}</a> {% endifequal %}{% endifequal %} <br /> {% endfor %} + {% else %}No contents! {% endif %} {% endblock %} |