aboutsummaryrefslogtreecommitdiffstats
path: root/bn_django
diff options
context:
space:
mode:
Diffstat (limited to 'bn_django')
-rw-r--r--bn_django/git_wiki/templates/git_wiki/commit.html28
-rw-r--r--bn_django/git_wiki/templates/git_wiki/item.html21
-rw-r--r--bn_django/git_wiki/templates/git_wiki/tree.html17
-rw-r--r--bn_django/git_wiki/templates/git_wiki/tree_table29
4 files changed, 95 insertions, 0 deletions
diff --git a/bn_django/git_wiki/templates/git_wiki/commit.html b/bn_django/git_wiki/templates/git_wiki/commit.html
new file mode 100644
index 0000000..5eb5dd0
--- /dev/null
+++ b/bn_django/git_wiki/templates/git_wiki/commit.html
@@ -0,0 +1,28 @@
+{% extends "git_wiki/base.html" %}
+
+{% block gitwiki %} {% if commit %}
+ <h3>Commit sha1 hash</h3>
+ <span class="hash">{{ commit.id }}</span><br />
+ <h3>Parent sha1 hash</h3>
+ {% if commit.parenthash %}
+ <a href="/k/commit/{{ commit.parenthash }}/">
+ <span class="hash">{{ commit.parenthash }}</span></a>
+ {% else %}No parent... root commit?{% endif %}
+ <h3>Tree sha1 hash</h3>
+ {% if commit.treehash %}
+ <span class="hash">{{ commit.treehash }}</span>
+ {% else %}No tree hash?{% endif %}
+ <h3>Author</h3>
+ {{ commit.author }}<br />
+ <h3>Author Date</h3>
+ {{ commit.author_date }}<br />
+ <h3>Committer</h3>
+ {{ commit.committer }}<br />
+ <h3>Committer Date</h3>
+ {{ commit.committer_date }}<br />
+ {% if commit.rawdiff %}
+ <pre class="large">{{ commit.rawdiff }}</pre>
+ {% else %}No diff{% endif %}
+{% else %}
+ <h3>No such object: {{ hash }}</h3>
+{% endif %} {% endblock %}
diff --git a/bn_django/git_wiki/templates/git_wiki/item.html b/bn_django/git_wiki/templates/git_wiki/item.html
new file mode 100644
index 0000000..0df1b72
--- /dev/null
+++ b/bn_django/git_wiki/templates/git_wiki/item.html
@@ -0,0 +1,21 @@
+{% extends "git_wiki/base.html" %}
+
+{% block path %}{{ block.super }} &raquo; <a href="/k/{{ item.slug }}/">
+ {{ item.path }}</a>{% endblock %}
+
+{% block title %}Knowledge Item: {{ item.path }}{% endblock %}
+
+{% block gitwiki %}
+ <h3>Item name:</h3>
+ <span class="hash">{{ item.name }}</span>
+ <h3>Item sha1 hash:</h3>
+ <span class="hash">{{ item.id }}</span>
+ <h3>Raw Contents:</h3>
+ <pre class="large">{{ item.contents|escape|wordwrap:80 }}</pre>
+
+ <br />
+ <span class="righty">
+ <a href="/k/{{ item.slug }}/pdf/">pdf</a> - <a href="/k/{{ item.slug }}/log">log</a>
+ </span>
+ <br />
+{% endblock %}
diff --git a/bn_django/git_wiki/templates/git_wiki/tree.html b/bn_django/git_wiki/templates/git_wiki/tree.html
new file mode 100644
index 0000000..1c33a98
--- /dev/null
+++ b/bn_django/git_wiki/templates/git_wiki/tree.html
@@ -0,0 +1,17 @@
+{% extends "git_wiki/base.html" %}
+
+{% block path %}{{ block.super }} &raquo; <a href="/k/{{ tree.path }}/">
+ {{ tree.path }}</a>{% endblock %}
+
+{% block title %}Knowledge Category: {{ tree.path }}{% endblock %}
+
+{% block gitwiki %}
+ <h3>Tree sha1 hash:</h3>
+ <span class="hash">{{ tree.id }}</span>
+ <h3>Tree path:</h3>
+ <span class="hash">{{ tree.path }}</span>
+ <h3>Directory listing:</h3>
+ {% include "git_wiki/tree_table" %}
+ <h3>Shortlog:</h3>
+ {% include "git_wiki/shortlog_table" %}
+{% endblock %}
diff --git a/bn_django/git_wiki/templates/git_wiki/tree_table b/bn_django/git_wiki/templates/git_wiki/tree_table
new file mode 100644
index 0000000..82d169a
--- /dev/null
+++ b/bn_django/git_wiki/templates/git_wiki/tree_table
@@ -0,0 +1,29 @@
+{% if tree.all_objs %}
+<table class="gitbrowser">
+ {% for o in tree.all_objs %}
+ <tr> <td class="objtype">
+ {{o.type}}</td>
+ <td class="filename">
+ {% ifequal o.type 'blob' %}
+ <a href='/k/{{ o.slug }}/' class="item">
+ {{o.path}}</a>
+ </td><td type="links">
+ <a href='/k/{{ o.slug }}/pdf/'>pdf</a>
+ </td>
+ {% else %} {% ifequal o.type 'tree' %}
+ <a href='/k/{{ o.slug }}/' class="tree">
+ {{o.path}}/</a>
+ </td><td type="links">
+ <a href='/k/{{ o.slug }}/'>browse</a>
+ </td>
+ {% else %}
+ <a href='/k/{{ o.slug }}/' class="item">
+ {{o.name}}</a>
+ </td><td type="links">
+ </td>
+ {% endifequal %}{% endifequal %}
+ </tr>
+ {% endfor %}
+</table>
+{% else %}No contents!
+{% endif %}