From c620485c01ca577980792b24e9e2fa8c7e5eed31 Mon Sep 17 00:00:00 2001 From: bnewbold Date: Thu, 22 Feb 2007 00:14:43 -0800 Subject: major progress on git_wiki --- bn_django/git_wiki/templates/git_wiki/commit.html | 28 ++++++++++++++++++++++ bn_django/git_wiki/templates/git_wiki/item.html | 21 ++++++++++++++++ bn_django/git_wiki/templates/git_wiki/tree.html | 17 +++++++++++++ bn_django/git_wiki/templates/git_wiki/tree_table | 29 +++++++++++++++++++++++ 4 files changed, 95 insertions(+) create mode 100644 bn_django/git_wiki/templates/git_wiki/commit.html create mode 100644 bn_django/git_wiki/templates/git_wiki/item.html create mode 100644 bn_django/git_wiki/templates/git_wiki/tree.html create mode 100644 bn_django/git_wiki/templates/git_wiki/tree_table (limited to 'bn_django/git_wiki') 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 %} +

Commit sha1 hash

+ {{ commit.id }}
+

Parent sha1 hash

+ {% if commit.parenthash %} + + {{ commit.parenthash }} + {% else %}No parent... root commit?{% endif %} +

Tree sha1 hash

+ {% if commit.treehash %} + {{ commit.treehash }} + {% else %}No tree hash?{% endif %} +

Author

+ {{ commit.author }}
+

Author Date

+ {{ commit.author_date }}
+

Committer

+ {{ commit.committer }}
+

Committer Date

+ {{ commit.committer_date }}
+ {% if commit.rawdiff %} +
{{ commit.rawdiff }}
+ {% else %}No diff{% endif %} +{% else %} +

No such object: {{ hash }}

+{% 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 }} » + {{ item.path }}{% endblock %} + +{% block title %}Knowledge Item: {{ item.path }}{% endblock %} + +{% block gitwiki %} +

Item name:

+ {{ item.name }} +

Item sha1 hash:

+ {{ item.id }} +

Raw Contents:

+
{{ item.contents|escape|wordwrap:80 }}
+ +
+ + pdf - log + +
+{% 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 }} » + {{ tree.path }}{% endblock %} + +{% block title %}Knowledge Category: {{ tree.path }}{% endblock %} + +{% block gitwiki %} +

Tree sha1 hash:

+ {{ tree.id }} +

Tree path:

+ {{ tree.path }} +

Directory listing:

+ {% include "git_wiki/tree_table" %} +

Shortlog:

+ {% 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 %} + + {% for o in tree.all_objs %} + + + {% else %} {% ifequal o.type 'tree' %} + + {{o.path}}/ + + {% else %} + + {{o.name}} + + {% endifequal %}{% endifequal %} + + {% endfor %} +
+ {{o.type}} + {% ifequal o.type 'blob' %} + + {{o.path}} + + pdf + + browse + +
+{% else %}No contents! +{% endif %} -- cgit v1.2.3