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/base.html31
-rw-r--r--bn_django/git_browse/templates/git_browse/full_log.html14
-rw-r--r--bn_django/git_browse/templates/git_browse/obj.html12
-rw-r--r--bn_django/git_browse/templates/git_browse/repository_info.html8
-rw-r--r--bn_django/git_browse/templates/git_browse/repository_raw_output.html23
-rw-r--r--bn_django/git_browse/templates/git_browse/tree.html10
6 files changed, 76 insertions, 22 deletions
diff --git a/bn_django/git_browse/templates/git_browse/base.html b/bn_django/git_browse/templates/git_browse/base.html
index 94d9808..0edb5a7 100644
--- a/bn_django/git_browse/templates/git_browse/base.html
+++ b/bn_django/git_browse/templates/git_browse/base.html
@@ -1 +1,32 @@
{% extends "base.html" %}
+
+{% block path %}
+ <a href="/code/">code</a> &raquo;
+{% if object %}
+ <a href="/code/{{ object.slug }}/">{{ object.name }}</a>
+{% endif %}
+{% endblock %}
+
+{% block title %}
+{% if object %}
+{{ object.name }}
+{% endif %}
+{% endblock %}
+
+{% block content %}
+{% if object %}
+ {% block gitbrowse %}
+ {% endblock %}
+ <br />
+ <span class="righty">
+ <a href="/code/{{ object.slug }}/tree/">browse tree</a> - <a href="/code/{{ object.slug }}/log">full log</a>
+ </span>
+ <br />
+ {% if raw %}
+ <pre>{{raw}}</pre>
+ {% endif %}
+{% else %}
+<p>No such repository!</p>
+{% endif %}
+
+{% endblock %}
diff --git a/bn_django/git_browse/templates/git_browse/full_log.html b/bn_django/git_browse/templates/git_browse/full_log.html
new file mode 100644
index 0000000..a467ae8
--- /dev/null
+++ b/bn_django/git_browse/templates/git_browse/full_log.html
@@ -0,0 +1,14 @@
+{% extends "git_browse/base.html" %}
+
+{% block gitbrowse %}
+{% if log_objs %}
+ <h3>Full Log</h3><br />
+ {% for item in log_objs %}
+ <hr>
+ <b>Hash: </b>{{ item.hash }}
+ <br /><b>Author: </b>{{ item.author }}
+ <br /><b>Date: </b>{{ item.date }}
+ <br /><b>Comment: </b><pre>{{ item.comment }}</pre>
+ {% endfor %}
+{% endif %}
+{% endblock %}
diff --git a/bn_django/git_browse/templates/git_browse/obj.html b/bn_django/git_browse/templates/git_browse/obj.html
new file mode 100644
index 0000000..be0b556
--- /dev/null
+++ b/bn_django/git_browse/templates/git_browse/obj.html
@@ -0,0 +1,12 @@
+{% extends "git_browse/base.html" %}
+
+{% block gitbrowse %}
+ {% if contents %}
+ <h3>Object sha1 hash: {{ hash }}<br />
+ Size: {{ size }} kB<br />
+ Type: "{{ type }}"</h3>
+ <pre>{{ contents }}</pre>
+ {% else %}
+ <h3>No such object: {{ hash }}</h3>
+ {% endif %}
+{% endblock %}
diff --git a/bn_django/git_browse/templates/git_browse/repository_info.html b/bn_django/git_browse/templates/git_browse/repository_info.html
new file mode 100644
index 0000000..bec150c
--- /dev/null
+++ b/bn_django/git_browse/templates/git_browse/repository_info.html
@@ -0,0 +1,8 @@
+{% extends "git_browse/base.html" %}
+
+{% block gitbrowse %}
+{% if shortlog %}
+<h3>Shortlog</h3>
+<pre>{{ shortlog }}</pre>
+{% endif %}
+{% endblock %}
diff --git a/bn_django/git_browse/templates/git_browse/repository_raw_output.html b/bn_django/git_browse/templates/git_browse/repository_raw_output.html
index 3ce6894..ee1c8e0 100644
--- a/bn_django/git_browse/templates/git_browse/repository_raw_output.html
+++ b/bn_django/git_browse/templates/git_browse/repository_raw_output.html
@@ -1,29 +1,8 @@
{% extends "git_browse/base.html" %}
-{% block path %}
- <a href="../">code</a> &raquo;
-{% if object %}
- <a href="/code/{{ object.slug }}/">{{ object.name }}</a>
-{% endif %}
-{% endblock %}
-
-{% block title %}
-{% if object %}
-Repository: {{ object.name }}
-{% endif %}
-{% endblock %}
-
{% block content %}
-{% if object %}
{% if raw_content %}
<br />
- <pre>
-
-{{ raw_content }}
- </pre>
+ <pre> {{ raw_content }} </pre>
{% endif %}
-{% else %}
-<p>No such repository!</p>
-{% endif %}
-
{% endblock %}
diff --git a/bn_django/git_browse/templates/git_browse/tree.html b/bn_django/git_browse/templates/git_browse/tree.html
new file mode 100644
index 0000000..22162da
--- /dev/null
+++ b/bn_django/git_browse/templates/git_browse/tree.html
@@ -0,0 +1,10 @@
+{% extends "git_browse/base.html" %}
+
+{% block gitbrowse %}
+ {% if all_objs %}
+ <h3>Directory listing:</h3>
+ {% for obj in all_objs %}
+[{{obj.type}}] <a href='../obj/{{ obj.id }}/'>{{obj.name}}</a> <br />
+ {% endfor %}
+ {% endif %}
+{% endblock %}