aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django/git_browse/templates
diff options
context:
space:
mode:
Diffstat (limited to 'bn_django/git_browse/templates')
-rw-r--r--bn_django/git_browse/templates/git_browse/obj.html2
-rw-r--r--bn_django/git_browse/templates/git_browse/repository_info.html52
2 files changed, 51 insertions, 3 deletions
diff --git a/bn_django/git_browse/templates/git_browse/obj.html b/bn_django/git_browse/templates/git_browse/obj.html
index be0b556..0170eab 100644
--- a/bn_django/git_browse/templates/git_browse/obj.html
+++ b/bn_django/git_browse/templates/git_browse/obj.html
@@ -3,7 +3,7 @@
{% block gitbrowse %}
{% if contents %}
<h3>Object sha1 hash: {{ hash }}<br />
- Size: {{ size }} kB<br />
+ Size: {{ size|filesizeformat }}<br />
Type: "{{ type }}"</h3>
<pre>{{ contents }}</pre>
{% else %}
diff --git a/bn_django/git_browse/templates/git_browse/repository_info.html b/bn_django/git_browse/templates/git_browse/repository_info.html
index 72f30b1..b3028a2 100644
--- a/bn_django/git_browse/templates/git_browse/repository_info.html
+++ b/bn_django/git_browse/templates/git_browse/repository_info.html
@@ -5,7 +5,55 @@
{% if shortlog %}
<h3>Shortlog (<a href="/code/{{object.slug}}/log/">full log</a>)</h3>
<pre>{{ shortlog }}</pre>
-<h3>Filelist (<a href="/code/{{object.slug}}/tree/">browse</a>)</h3>
-<pre>{{ filelist }}</pre>
+<h3>Heads (<a href="/code/{{object.slug}}/tree/">browse</a>)</h3>
+{% if heads %}
+<table class="gitbrowser">
+{% for h in heads.iteritems %}
+<tr>
+ <td class="head">
+ <a href="/code/{{object.slug}}/commit/{{ h.1 }}" class="subtle">
+ {{ h.0 }}</a></td>
+ <td class="links">
+ <a href="/code/{{object.slug}}/commit/{{ h.1 }}">commit</a> |
+ <a href="/code/{{object.slug}}/commit/{{ h.1 }}/zip"> zip </a></td>
+ <td class="commit_hash">
+ <a href="/code/{{object.slug}}/obj/{{ h.1 }}" class="subtle">
+ {{ h.1 }}</a>
+ {% for t in tags.iteritems %}
+ {% ifequal h.1 t.1 %}
+ <a href="/code/{{object.slug}}/tag/{{ h.1 }}/" class="tag">
+ [{{ t.0 }}]</a>
+ {% endifequal %}{% endfor %}
+ </td></tr>
+{% endfor %}
+</table>
+{% else %}No heads!{% endif %}
+<h3>Tags (<a href="/code/{{object.slug}}/tree/">browse</a>)</h3>
+{% if tags %}
+<table class="gitbrowser">
+{% for t in tags.iteritems %}
+<tr>
+ <td class="tag">
+ <a href="/code/{{object.slug}}/tag/{{ h.1 }}" class="subtle">
+ {{ t.0 }}</a></td>
+ <td class="links">
+ <a href="/code/{{object.slug}}/tag/{{ t.1 }}">tag</a> |
+ <a href="/code/{{object.slug}}/commit/{{ t.1 }}">commit</a> |
+ <a href="/code/{{object.slug}}/commit/{{ t.1 }}/zip"> zip </a></td>
+ <td class="commit_hash">
+ <a href="/code/{{object.slug}}/obj/{{ t.1 }}" class="subtle">
+ <span class="hash">{{ t.1 }}</span></a>
+ {% for t in tags.iteritems %}
+ {% ifequal h.1 t.1 %}
+ <a href="/code/{{object.slug}}/tag/{{ h.1 }}/" class="tag">
+ [{{ t.0 }}]</a>
+ {% endifequal %}</td></tr>
+ {% endfor %}
+{% endfor %}
+</table>
+{% else %}No tags!{% endif %}
+<h3>Filelist (<a href="/code/{{object.slug}}/tree/">browse tree</a>)</h3>
+{% if filelist %} <pre class="large">{{ filelist }}</pre>
+{% else %}No files!{% endif %}
{% endif %}
{% endblock %}