diff options
author | bnewbold <bnewbold@manus.(none)> | 2007-02-22 00:14:43 -0800 |
---|---|---|
committer | bnewbold <bnewbold@manus.(none)> | 2007-02-22 00:14:43 -0800 |
commit | c620485c01ca577980792b24e9e2fa8c7e5eed31 (patch) | |
tree | b08e650ff45c5beb3a0b98cea7fcc53a9e9918dd /bn_django/git_wiki | |
parent | c719dcba2d37f1814aa2bae55947d77453f70b9c (diff) | |
download | bnewnet-c620485c01ca577980792b24e9e2fa8c7e5eed31.tar.gz bnewnet-c620485c01ca577980792b24e9e2fa8c7e5eed31.zip |
major progress on git_wiki
Diffstat (limited to 'bn_django/git_wiki')
-rw-r--r-- | bn_django/git_wiki/templates/git_wiki/commit.html | 28 | ||||
-rw-r--r-- | bn_django/git_wiki/templates/git_wiki/item.html | 21 | ||||
-rw-r--r-- | bn_django/git_wiki/templates/git_wiki/tree.html | 17 | ||||
-rw-r--r-- | bn_django/git_wiki/templates/git_wiki/tree_table | 29 |
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 }} » <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 }} » <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 %} |