From 1afd527efe4e2a1a481b9cf52cdd915356b1d58a Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sat, 3 Aug 2024 17:24:35 +0100 Subject: Adds ability to update the thumbnail/feature images --- .../templates/resources/resource_card.html | 2 ++ .../templates/resources/resource_detail.html | 3 --- .../templates/resources/update_thumbnails.html | 29 ++++++++++++++++++++++ 3 files changed, 31 insertions(+), 3 deletions(-) create mode 100644 pyblackbird_cc/templates/resources/update_thumbnails.html (limited to 'pyblackbird_cc/templates') diff --git a/pyblackbird_cc/templates/resources/resource_card.html b/pyblackbird_cc/templates/resources/resource_card.html index 67807cc..687438c 100644 --- a/pyblackbird_cc/templates/resources/resource_card.html +++ b/pyblackbird_cc/templates/resources/resource_card.html @@ -37,6 +37,8 @@ {% endif %} \ 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 f520340..4a513af 100644 --- a/pyblackbird_cc/templates/resources/resource_detail.html +++ b/pyblackbird_cc/templates/resources/resource_detail.html @@ -34,9 +34,6 @@
{% if request.user.is_authenticated %}Replace the PDFs{% endif %}
-
- {% if request.user.is_authenticated %}Replace the preview images{% endif %} -
diff --git a/pyblackbird_cc/templates/resources/update_thumbnails.html b/pyblackbird_cc/templates/resources/update_thumbnails.html new file mode 100644 index 0000000..e473a00 --- /dev/null +++ b/pyblackbird_cc/templates/resources/update_thumbnails.html @@ -0,0 +1,29 @@ +{% extends "base.html" %} +{% load static %} +{% load crispy_forms_tags %} + +{% block content %} +
+
+

Update feature images for {{ resource.name }} resource

+ +

The current thumbnails for this resource are:

+ +
    + {% for t in resource.thumbnail_filenames %} +
  • {{ t }}
  • + {% endfor %} +
+ +
+ {% csrf_token %} + {% crispy form form.helper %} +
+ + +
+
+ + +{% endblock %} -- cgit v1.2.3