aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc/templates/resources
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-05-26 20:47:03 +0100
committerMatthew Lemon <y@yulqen.org>2024-05-26 20:47:03 +0100
commitd421e56e0924487861e6cf5300f462c9e66fd376 (patch)
tree5340955b351772dfc9ec38c7a80035b5781cc93a /pyblackbird_cc/templates/resources
parent610177be35ec791edae9577f104d0132f2a28364 (diff)
Correctly handles the unique constraint on feature_slot
Diffstat (limited to 'pyblackbird_cc/templates/resources')
-rw-r--r--pyblackbird_cc/templates/resources/create_featured_resource.html35
1 files changed, 20 insertions, 15 deletions
diff --git a/pyblackbird_cc/templates/resources/create_featured_resource.html b/pyblackbird_cc/templates/resources/create_featured_resource.html
index e98b2ba..19022fc 100644
--- a/pyblackbird_cc/templates/resources/create_featured_resource.html
+++ b/pyblackbird_cc/templates/resources/create_featured_resource.html
@@ -1,21 +1,26 @@
{% extends "base.html" %}
-{% load static %}
-{% block title %}Add featured resource{% endblock title %}
+{% load static %}
+{% block title %}
+ Add featured resource
+{% endblock title %}
{% block content %}
-
-{% if request.user.is_authenticated and request.user.is_staff %}
- <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">
- <h2>Configure featured resources</h2>
- <p>You can select three resources to be "featured" on the main page</p>
+ {% if messages %}
+ <ul class="messages">
+ {% for message in messages %}
+ <li {% if message.tags %}class="{{ message.tags }}"{% endif %}>{{ message }}</li>
+ {% endfor %}
+ </ul>
+ {% endif %}
+ {% if request.user.is_authenticated and request.user.is_staff %}
+ <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">
+ <h2>Configure featured resources</h2>
+ <p>You can select three resources to be "featured" on the main page</p>
+ </div>
</div>
- </div>
-{% else %}
- <p>You must be a super-user to access this page.</p>
-{% endif %}
-
-
+ {% else %}
+ <p>You must be a super-user to access this page.</p>
+ {% endif %}
{% endblock content %}
-