mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-24 18:39:35 +00:00
39 lines
1.6 KiB
Twig
39 lines
1.6 KiB
Twig
{% block flashes %}
|
|
{# Insert flashes #}
|
|
<turbo-stream action="replace" action="morph" target="toast-container">
|
|
<template>
|
|
<div class="toast-container" id="toast-container">
|
|
{% for label, messages in app.flashes() %}
|
|
{% for message in messages %}
|
|
{{ include('_toast.html.twig', {
|
|
'label': label,
|
|
'message': message
|
|
}) }}
|
|
{% endfor %}
|
|
{% endfor %}
|
|
</div>
|
|
</template>
|
|
</turbo-stream>
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{# Insert info about when the sidebar trees were updated last time, so the sidebar_tree_controller can decide if it needs to reload the tree #}
|
|
<span id="sidebar-last-time-updated" style="display: none;" data-last-update="{{ sidebar_tree_updater.lastTreeUpdate.format("Y-m-d\\TH:i:sP") }}"></span>
|
|
|
|
<turbo-stream action="update" target="locale-select-menu">
|
|
<template>
|
|
{% set locales = settings_instance('localization').languageMenuEntries %}
|
|
{% if locales is empty %}
|
|
{% set locales = locale_menu %}
|
|
{% endif %}
|
|
|
|
{% for locale in locales %}
|
|
<a class="dropdown-item" data-turbo="false" data-turbo-frame="_top" href="{{ path(app.request.attributes.get('_route'),
|
|
app.request.query.all|merge(app.request.attributes.get('_route_params'))|merge({'_locale': locale})) }}">
|
|
{{ locale|language_name }} ({{ locale|upper }})</a>
|
|
{% endfor %}
|
|
</template>
|
|
</turbo-stream>
|
|
|
|
|