aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/templates
diff options
context:
space:
mode:
Diffstat (limited to 'pyblackbird_cc/templates')
-rw-r--r--pyblackbird_cc/templates/resources/resource_card.html2
-rw-r--r--pyblackbird_cc/templates/resources/resource_detail.html3
-rw-r--r--pyblackbird_cc/templates/resources/update_pdfs.html29
3 files changed, 31 insertions, 3 deletions
diff --git a/pyblackbird_cc/templates/resources/resource_card.html b/pyblackbird_cc/templates/resources/resource_card.html
index 687438c..a7b03e3 100644
--- a/pyblackbird_cc/templates/resources/resource_card.html
+++ b/pyblackbird_cc/templates/resources/resource_card.html
@@ -39,6 +39,8 @@
class="btn btn-outline-primary btn-sm">Edit</a>
<a href="{% url 'resources:resource_update_thumbnails' resource.id %}"
class="btn btn-outline-primary btn-sm">Edit Feature Images</a>
+ <a href="{% url 'resources:resource_update_pdfs' resource.id %}"
+ class="btn btn-outline-primary btn-sm">Add PDFs</a>
</div>
{% endif %}
</div> \ No newline at end of file
diff --git a/pyblackbird_cc/templates/resources/resource_detail.html b/pyblackbird_cc/templates/resources/resource_detail.html
index 4a513af..67694fa 100644
--- a/pyblackbird_cc/templates/resources/resource_detail.html
+++ b/pyblackbird_cc/templates/resources/resource_detail.html
@@ -31,9 +31,6 @@
class="text-danger">Edit this resource</a>
{% endif %}
</div>
- <div>
- {% if request.user.is_authenticated %}<a href="#" class="text-danger">Replace the PDFs</a>{% endif %}
- </div>
</div>
</div>
</div>
diff --git a/pyblackbird_cc/templates/resources/update_pdfs.html b/pyblackbird_cc/templates/resources/update_pdfs.html
new file mode 100644
index 0000000..f5dab72
--- /dev/null
+++ b/pyblackbird_cc/templates/resources/update_pdfs.html
@@ -0,0 +1,29 @@
+{% extends "base.html" %}
+{% load static %}
+{% load crispy_forms_tags %}
+
+{% block content %}
+ <div class="row d-flex justify-content-center">
+ <div class="col bg-light mt-lg-4 p-4 border border-success border-opacity-25 rounded">
+ <h1>Update PDFs for <strong>{{ resource.name }}</strong> resource</h1>
+
+ <p>The current PDFs for this resource are:</p>
+
+ <ul>
+ {% for pdf in resource.get_pdf_file_names %}
+ <li><em>{{ pdf }}</em></li>
+ {% endfor %}
+ </ul>
+
+ <form action="{% url "resources:resource_update_pdfs" resource.id %}"
+ method="post" enctype="multipart/form-data">
+ {% csrf_token %}
+ {% crispy form form.helper %}
+ </form>
+
+ <button class="btn btn-danger" onclick="location.href='{{ resource.get_absolute_url }}';">Cancel</button>
+ </div>
+ </div>
+
+
+{% endblock %}