Author publish button.
authorRadek Czajka <rczajka@rczajka.pl>
Mon, 26 Sep 2022 10:55:03 +0000 (12:55 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Mon, 26 Sep 2022 10:55:03 +0000 (12:55 +0200)
src/catalogue/templates/admin/catalogue/author/change_form.html [new file with mode: 0644]
src/catalogue/templates/catalogue/author_description.html

diff --git a/src/catalogue/templates/admin/catalogue/author/change_form.html b/src/catalogue/templates/admin/catalogue/author/change_form.html
new file mode 100644 (file)
index 0000000..9b9cb4a
--- /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_author' original.pk %}">
+
+        {% csrf_token %}
+        <button type="submit">opublikuj</button>
+      </form>
+    </li>
+  {% endif %}
+  {{ block.super }}
+{% endblock %}