41 lines
1.7 KiB
HTML
41 lines
1.7 KiB
HTML
{% import "fragments/_icon_fragment.html" as icons %}
|
|
|
|
{% macro breadcrumb_header(breadcrumbs=[], title=None, save_button=False, delete_button=False) %}
|
|
<!-- Breadcrumb Fragment -->
|
|
|
|
<nav class="row d-flex mb-3 justify-content-between">
|
|
<div class="col">
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item">
|
|
<a href="{{ url_for('main.index') }}" class="link-success link-underline-opacity-0">
|
|
{{ icons.render_icon('house', 16) }}
|
|
</a>
|
|
</li>
|
|
{% for crumb in breadcrumbs %}
|
|
<li class="breadcrumb-item">
|
|
{% if crumb.url %}
|
|
<a href="{{ crumb.url }}" class="link-success link-underline-opacity-0">{{ crumb.label }}</a>
|
|
{% else %}
|
|
{{ crumb.label }}
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
{% if title %}
|
|
<li class="breadcrumb-item active">{{ title }}</li>
|
|
{% endif %}
|
|
</ol>
|
|
</div>
|
|
{% if save_button or delete_button %}
|
|
<div class="col text-end">
|
|
<div class="btn-group">
|
|
{% if save_button %}
|
|
<button type="submit" class="btn btn-primary" id="saveButton">{{ icons.render_icon('floppy', 16) }}</button>
|
|
{% endif %}
|
|
{% if delete_button %}
|
|
<button type="submit" class="btn btn-danger" id="deleteButton">{{ icons.render_icon('trash', 16) }}</button>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
{% endif %}
|
|
</nav>
|
|
{% endmacro %}
|