mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-27 21:39:32 +00:00
Toasts now work with turbo
This commit is contained in:
parent
3df6e18a83
commit
390deca544
6 changed files with 57 additions and 41 deletions
|
|
@ -55,20 +55,19 @@
|
|||
</head>
|
||||
<body data-base-url="{{ url('homepage', {'_locale': app.request.locale}) }}">
|
||||
{% block body %}
|
||||
|
||||
<header>
|
||||
|
||||
<turbo-frame id="navbar-frame" target="content" data-turbo-action="advance">
|
||||
{% include "_navbar.html.twig" %}
|
||||
</turbo-frame>
|
||||
|
||||
{% include "_flash.html.twig" %}
|
||||
|
||||
</header>
|
||||
|
||||
<main>
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
|
||||
{% include "_toast_container.html.twig" %}
|
||||
|
||||
<div class="collapse d-md-block bg-light" id="sidebar-container">
|
||||
<nav class="fixed-sidebar col-md-3 col-lg-2 " id="fixed-sidebar">
|
||||
<turbo-frame id="sidebar" target="content" data-turbo-action="advance">
|
||||
|
|
@ -89,6 +88,16 @@
|
|||
{% block content %}
|
||||
{% endblock %}
|
||||
|
||||
<div class="toasts-global d-none">
|
||||
{% for label, messages in app.flashes() %}
|
||||
{% for message in messages %}
|
||||
{{ include('_toast.html.twig', {
|
||||
'label': label,
|
||||
'message': message
|
||||
}) }}
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</turbo-frame>
|
||||
|
||||
{% block scripts %}
|
||||
|
|
@ -108,7 +117,6 @@
|
|||
<i class="fas fa-angle-up fa-fw"></i>
|
||||
</a>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
</body>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue