23 lines
765 B
HTML
23 lines
765 B
HTML
{% macro flashed_messages() %}
|
|
{% with messages = get_flashed_messages(with_categories=true) %}
|
|
{% if messages %}
|
|
{% for category, message in messages %}
|
|
<div class="alert alert-{{ category }}">{{ message|safe }}</div>
|
|
{% endfor %}
|
|
{% endif %}
|
|
{% endwith %}
|
|
{% endmacro %}
|
|
|
|
{% macro back_link(url, text='Volver', icon='bi-arrow-left') %}
|
|
<a href="{{ url }}" class="btn btn-outline-secondary btn-sm mb-2">
|
|
<i class="bi {{ icon }}"></i> {{ text }}
|
|
</a>
|
|
{% endmacro %}
|
|
|
|
{% macro page_header(title, icon='', actions='') %}
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h2>{% if icon %}<i class="bi {{ icon }} me-2"></i>{% endif %}{{ title }}</h2>
|
|
{% if actions %}{{ actions|safe }}{% endif %}
|
|
</div>
|
|
{% endmacro %}
|