rearrangements: new core app, templates in apps, split settings;
[wolnelektury.git] / apps / wolnelektury_core / templates / admin / catalogue / book / change_form.html
diff --git a/apps/wolnelektury_core/templates/admin/catalogue/book/change_form.html b/apps/wolnelektury_core/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 %}
+
+
+
+