changeset 323:34b8de7be336

bulma (base): show breadcrumbs
author Goffi <goffi@goffi.org>
date Thu, 29 Apr 2021 20:52:17 +0200
parents 11ed664a309c
children 580fa5482e88
files sat_templates/templates/bulma/base/base.html
diffstat 1 files changed, 18 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/sat_templates/templates/bulma/base/base.html	Thu Apr 29 20:43:53 2021 +0200
+++ b/sat_templates/templates/bulma/base/base.html	Thu Apr 29 20:52:17 2021 +0200
@@ -104,6 +104,24 @@
     {% endif %}
     {% block body_wrapper %}
     <div id="body" class="container">
+        {% if breadcrumbs and not no_breadcrumps and breadcrumbs|length > 1 %}
+            <nav class="breadcrumb is-medium" aria-label="breadcrumbs">
+                <ul>
+                    {% for crumb in breadcrumbs %}
+                        <li {% if loop.last %}class="is-active"{% endif %}>
+                            <a href="{{crumb.url or '#'}}">
+                                {% if crumb.icon %}
+                                    <span class="icon is-medium">
+                                        <i class="icon-{{crumb.icon}}"></i>
+                                    </span>
+                                {% endif %}
+                                <span>{{crumb.label}}</span>
+                            </a>
+                        </li>
+                    {% endfor %}
+                </ul>
+            </nav>
+        {% endif %}
         {% if confirm %}
             <article class="message is-success mt-4">
                 <div class="message-header">