- WIP on Kernel loading and Lean's autoload. Fixed some breadcrumb inconsistencies also
This commit is contained in:
1 parent
45ffc6e128
commit
730ce7474e
3 files changed
+46
-66
No files matched your search
@@ -1,28 +1,33 @@
|
||||
<ol class="breadcrumb ">
|
||||
<li class="breadcrumb-item"><a href="{% url '' %}"><i class="fas fa-fw fa-tachometer-alt"></i> Tableau de bord</a></li>
|
||||
{% if isset($this->breadcrumb) %}
|
||||
{% php $routeTree = $this->breadcrumb->getRouteTree($this->session->get('lean.route')) %}
|
||||
|
||||
{% foreach $this->breadcrumb ?? [] as $crumb %}
|
||||
<li class="breadcrumb-item {{ ( $crumb['active'] ?? false ) ? 'active' : '' }}">
|
||||
{% if ! ($crumb['active'] ?? false) %}
|
||||
{? $last = $crumb ?}
|
||||
{% if count($routeTree) %}
|
||||
<ol class="breadcrumb mb-4 px-3 py-2">
|
||||
{% foreach $routeTree as $index => $crumb %}
|
||||
<li class="breadcrumb-item {% if $crumb->current %}active{% endif %}">
|
||||
{% if ! $crumb->current %}
|
||||
{% php $last = $crumb %}
|
||||
|
||||
<a href="{% url $crumb['url'] %}">
|
||||
{% if $crumb['icon'] ?? false %}
|
||||
<i class="fa fa-{{ $crumb['icon'] }}"></i>
|
||||
{% endif %}
|
||||
<a href="{% route $crumb->routeAnnotation->name %}">
|
||||
{% if $crumb->icon ?? false %}
|
||||
<i class="fa fa-{{ $crumb->icon }}"></i>
|
||||
{% endif %}
|
||||
|
||||
{{ $crumb['title'] }}
|
||||
</a>
|
||||
{% else %}
|
||||
{% if $crumb['icon'] ?? false %}
|
||||
<i class="fa fa-{{ $crumb['icon'] }}"></i>
|
||||
{% endif %}
|
||||
<span>{{ $crumb['title'] }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endforeach %}
|
||||
<span>{{ lang($crumb->lang, get_defined_vars()) }}</span>
|
||||
</a>
|
||||
{% else %}
|
||||
{% if $crumb->icon ?? false %}
|
||||
<i class="fa fa-{{ $crumb->icon }}"></i>
|
||||
{% endif %}
|
||||
|
||||
{% if $last ?? false %}
|
||||
<li class="breadcrumb-last-item ml-auto"><a href="{{ url( $last['url']) }}"><i class="fas fa-chevron-circle-left"></i> Retour</a></li>
|
||||
<span>{{ lang($crumb->lang, get_defined_vars()) }}</span>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endforeach %}
|
||||
|
||||
{# if $last ?? false %}
|
||||
<li class="breadcrumb-last-item ml-auto"><a href="{{ ( $last['route'] ?? false ) ? $last['route'] : url($last['url']) }}"><i class="fas fa-chevron-circle-left"></i> Retour</a></li>
|
||||
{% endif #}
|
||||
</ol>
|
||||
{% endif %}
|
||||
</ol>
|
||||
{% endif %}
|
||||
Reference in new issue
Block a user