digitalfabrik/integreat-cms

View on GitHub
integreat_cms/cms/templates/messages.html

Summary

Maintainability
Test Coverage
{% if messages %}
    <div id="messages" class="mb-8">
        {% for msg in messages %}
            {% if msg.level_tag == 'info' %}
                <div class="bg-blue-100 border-l-4 border-blue-500 text-blue-700 px-4 py-3 mb-5"
                     role="alert">
                    <p>
                        {{ msg.message }}
                    </p>
                </div>
            {% endif %}
            {% if msg.level_tag == 'success' %}
                <div class="bg-green-100 border-l-4 border-green-500 text-green-800 px-4 py-3 mb-5"
                     role="alert">
                    <p>
                        {{ msg.message }}
                    </p>
                </div>
            {% endif %}
            {% if msg.level_tag == 'warning' %}
                <div class="bg-yellow-100 border-l-4 border-yellow-500 text-orange-700 px-4 py-3 mb-5"
                     role="alert">
                    <p>
                        {{ msg.message }}
                    </p>
                </div>
            {% endif %}
            {% if msg.level_tag == 'error' %}
                <div class="bg-red-100 border-l-4 border-red-500 text-red-700 px-4 py-3 mb-5"
                     role="alert">
                    <p>
                        {{ msg.message }}
                    </p>
                </div>
            {% endif %}
        {% endfor %}
    </div>
{% endif %}