- Added a context list (from picea-ui form) to the ControllerTrait

- Added some default i18n text
- Moved some reusable widget into lean view
This commit is contained in:
mcndave committed 2020-12-07 02:36:42 +00:00
1 parent abafee0b30
commit 4bd68a74f8
6 files changed
+75 -8

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
<ol class="breadcrumb ">
<li class="breadcrumb-item"><a href="{% url '' %}"><i class="fas fa-fw fa-tachometer-alt"></i> Tableau de bord</a></li>
{% foreach $this->breadcrumb ?? [] as $crumb %}
<li class="breadcrumb-item {{ ( $crumb['active'] ?? false ) ? 'active' : '' }}">
{% if ! ($crumb['active'] ?? false) %}
{? $last = $crumb ?}
<a href="{% url $crumb['url'] %}">
{% 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 %}
{% 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>
{% endif %}
</ol>
+7
View File
@@ -0,0 +1,7 @@
<div class="message-wrapper">
{% foreach array_filter(array_merge($this->contextList, [ $context ?? null ])) as $name => $context %}
{% foreach $context->messages ?? [] as $message %}
{{= $message->render() }}
{% endforeach %}
{% endforeach %}
</div>