Commit 097dee2e authored by Bryan  BRANCOTTE's avatar Bryan BRANCOTTE
Browse files

dismissible message, placved before title

parent 7518933e
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-01-04 10:43+0000\n"
"POT-Creation-Date: 2022-01-06 17:27+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -93,6 +93,9 @@ msgstr ""
msgid "Search"
msgstr ""
msgid "Close"
msgstr ""
msgid "L'Institut Pasteur"
msgstr ""
......
......@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2022-01-04 10:43+0000\n"
"POT-Creation-Date: 2022-01-06 17:27+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
......@@ -95,6 +95,9 @@ msgstr "Rechercher ici"
msgid "Search"
msgstr "Rechercher"
msgid "Close"
msgstr "Fermer"
msgid "L'Institut Pasteur"
msgstr "L'Institut Pasteur"
......
......@@ -87,12 +87,25 @@
<!-- Begin page content -->
<main role="main" class="flex-shrink-0">
<div class="{% block container-class %}container mb-4{% endblock %}">
<div class="row">
<div class="row pt-4">
{% block pre_content_page_title %}
{% include_if_exists "pre_content_page_title.html"|localize_template "basetheme_bootstrap/pre_content_page_title.example.html" %}
{% endblock pre_content_page_title %}
{% if messages %}
<div class="{% block messages_css_classes %}b-2 col-12{% endblock %}">
{% for message in messages %}
<p class="alert alert-{{ message.tags|tags_to_bootstrap }} alert-dismissible fade show" role="alert">
{% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}Important: {% endif %}
{{ message|linebreaksbr}}
<button type="button" class="close" data-dismiss="alert" aria-label="{%trans 'Close' %}">
<span aria-hidden="true">&times;</span>
</button>
</p>
{% endfor %}
</div>
{% endif %}
{% block whole_content_page_title %}
<div class="pb-2 mt-4 mb-2 col-12">
<div class="pb-2 mb-2 col-12">
{% block content_page_title %}
<div class="border-bottom content-page-title">
<h1>{% block page_title %}{% endblock %}</h1>
......@@ -101,18 +114,6 @@
{% endblock %}
</div>
{% endblock %}
{% if messages %}
<div class="{% block messages_css_classes %}pb-2 mb-2 col-12{% endblock %}">
<div class="border-bottom">
{% for message in messages %}
<p class="alert alert-{{ message.tags|tags_to_bootstrap }}">
{% if message.level == DEFAULT_MESSAGE_LEVELS.ERROR %}Important: {% endif %}
{{ message|linebreaksbr}}
</p>
{% endfor %}
</div>
</div>
{% endif %}
{% block content %}{% endblock %}
</div>
</div>
......
<p class="col-12 mt-2 mb-0 alert alert-warning text-center">
<div class="{{pre_content_css_classes|default:'col-12'}}"><p class="alert alert-warning text-center alert-dismissible fade show" role="alert">
You can put a message in pre_content_page_title.html say for example: <span class="border">
You are running branch <code>toto</code>, any data changes made here are not to be kept.</span>. You also can create an empty file.
</p>
\ No newline at end of file
<button type="button" class="close" data-dismiss="alert" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</p></div>
\ No newline at end of file
......@@ -7,7 +7,7 @@ readme = open('README.rst').read()
setup(
name='django-basetheme-bootstrap',
version='0.2.77',
version='0.2.78',
description='Django Basetheme Bootstrap',
long_description=readme,
author='Bryan Brancotte',
......
Supports Markdown
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