Commit 2a738bf8 authored by BERJON Matthieu's avatar BERJON Matthieu

Add of messages management system

I added in the base template the possibility to display any type of
message returned by Django to the user. I added as well the jquery
library to be able to remove selected messages if the user wants.
Signed-off-by: BERJON Matthieu's avatarMatthieu Berjon <matthieu.berjon@inria.fr>
parent cc23367f
......@@ -21,12 +21,24 @@
<div class="container">
{% include 'partials/_messages.html' %}
{% if messages %}
{% for message in messages %}
<div class="alert alert-{% if message.tags %}{{ message.tags }}{% endif %} alert-dismissible fade in" role="alert">
{{ message }}
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
{% endfor %}
{% endif %}
{% block content %}
{% endblock %}
</div>
{% include "partials/_footer.html" %}
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
<script defer src="{% static 'fonts/fontawesome/svg-with-js/js/fontawesome-all.js' %}"></script>
</body>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment