book change form admin template - added forgotten file
authorRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Fri, 28 Jan 2011 16:13:18 +0000 (17:13 +0100)
committerRadek Czajka <radoslaw.czajka@nowoczesnapolska.org.pl>
Fri, 28 Jan 2011 16:13:18 +0000 (17:13 +0100)
wolnelektury/templates/admin/catalogue/book/change_form.html [new file with mode: 0644]

diff --git a/wolnelektury/templates/admin/catalogue/book/change_form.html b/wolnelektury/templates/admin/catalogue/book/change_form.html
new file mode 100644 (file)
index 0000000..819ab62
--- /dev/null
@@ -0,0 +1,46 @@
+{% extends "admin/change_form.html" %}
+{% load i18n %}
+
+{% block content_title %}
+    {% if change and 'advanced' in request.GET %}
+        <h1>{{ title }} &mdash; {% trans "advanced" %} </h1>
+    {% else %}
+        {{ block.super }}
+    {% endif %}
+{% endblock %}
+
+
+{# add an "Advanced" button to tools #}
+
+{% block extrastyle %}
+    {% if change and not is_popup %}
+        {{ block.super }}
+        <style>
+            .object-tools {margin-bottom:0; margin-top:0;}
+            .advancedlink {text-transform: capitalize;}
+        </style>
+    {% else %}
+        {{ block.super }}
+    {% endif %}
+{% endblock %}
+
+{% block object-tools %}
+    {% if change and not is_popup %}
+        <div style='margin-bottom: -2em; margin-top: -2.4em; float:right; '>
+        {{ block.super }}
+        <ul class="object-tools"><li>
+        {% if 'advanced' in request.GET %}
+            <a href="." class="advancedlink">{% trans "simplified" %}</a>
+        {% else %}
+            <a href="?advanced" class="advancedlink">{% trans "advanced" %}</a>
+        {% endif %}
+        </li></ul>
+        </div>
+    {% else %}
+        {{ block.super }}
+    {% endif %}
+{% endblock %}
+
+
+
+