Add comment-related admin templates.
authorMatthijs Kooijman <matthijs@stdin.nl>
Tue, 4 Nov 2008 10:55:33 +0000 (11:55 +0100)
committerMatthijs Kooijman <matthijs@stdin.nl>
Tue, 4 Nov 2008 10:55:33 +0000 (11:55 +0100)
The change_form template adds a "comment" link to the influence admin
page, the comments template provides the content for that page.

templates/admin/influences/influence/change_form.html [new file with mode: 0644]
templates/admin/influences/influence/comments.html [new file with mode: 0644]

diff --git a/templates/admin/influences/influence/change_form.html b/templates/admin/influences/influence/change_form.html
new file mode 100644 (file)
index 0000000..7d1a794
--- /dev/null
@@ -0,0 +1,11 @@
+{% extends "admin/change_form.html" %}
+{% load i18n %}
+
+{% block object-tools %}
+{% if change %}{% if not is_popup %}
+  <ul class="object-tools"><li><a href="history/" class="historylink">{% trans "History" %}</a></li>
+  <li><a href="comments/" class="commentslink">{% trans "Comments" %}</a></li>
+  {% if has_absolute_url %}<li><a href="../../../r/{{ content_type_id }}/{{ object_id }}/" class="viewsitelink">{% trans "View on site" %}</a></li>{% endif%}
+  </ul>
+{% endif %}{% endif %}
+{% endblock %}
diff --git a/templates/admin/influences/influence/comments.html b/templates/admin/influences/influence/comments.html
new file mode 100644 (file)
index 0000000..f5343e6
--- /dev/null
@@ -0,0 +1,26 @@
+{% extends "admin/base_site.html" %}
+{% load i18n %}
+
+{% block extrahead %}{{ block.super }}
+{{ media }}
+{% endblock %}
+
+{% block breadcrumbs %}
+<div class="breadcrumbs">
+    <a href="../../../../">{% trans 'Home' %}</a> &rsaquo;
+    <a href="../../../">{{ app_label|capfirst }}</a> &rsaquo;
+    <a href="../../">{{ opts.verbose_name_plural|capfirst }}</a> &rsaquo;
+    <a href="../">{{ object|truncatewords:"18" }}</a> &rsaquo;
+    {% trans "Comments" %}
+</div>
+{% endblock %}
+
+{% block content %}
+<div id="content-main">
+<div class="module">
+{% block comments %}
+{% include "influences/influence_comments_block.html" %}
+{% endblock %}
+</div>
+</div>
+{% endblock %}