Publish collection.
authorRadek Czajka <rczajka@rczajka.pl>
Thu, 27 Oct 2022 09:20:54 +0000 (11:20 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Thu, 27 Oct 2022 09:20:54 +0000 (11:20 +0200)
src/catalogue/templates/admin/catalogue/collection/change_form.html [new file with mode: 0644]

diff --git a/src/catalogue/templates/admin/catalogue/collection/change_form.html b/src/catalogue/templates/admin/catalogue/collection/change_form.html
new file mode 100644 (file)
index 0000000..3f98d67
--- /dev/null
@@ -0,0 +1,14 @@
+{% extends "admin/change_form.html" %}
+
+{% block object-tools-items %}
+  {% if change and original.slug %}
+    <li>
+      <form method='post' action="{% url 'catalogue_publish_collection' original.pk %}">
+
+        {% csrf_token %}
+        <button type="submit">opublikuj</button>
+      </form>
+    </li>
+  {% endif %}
+  {{ block.super }}
+{% endblock %}