Refactor MenuComposer to improve type safety and simplify local menu builder integration

This commit is contained in:
2025-09-29 15:03:05 +00:00
parent 4f51ef81ad
commit 3928b2cc7a
6 changed files with 132 additions and 100 deletions

View File

@@ -1,34 +1,16 @@
{#
* Copyright (C) 2014-2015, Champs Libres Cooperative SCRLFS,
<info@champs-libres.coop> / <http://www.champs-libres.coop>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
#}
<li class="nav-item dropdown btn btn-primary nav-section">
<a id="menu-section"
class="nav-link dropdown-toggle"
type="button"
data-bs-toggle="dropdown"
aria-haspopup="true"
<a id="menu-section"
class="nav-link dropdown-toggle"
type="button"
data-bs-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
{{ 'Sections'|trans }}
</a>
<div class="dropdown-menu dropdown-menu-end dropdown-menu-dark" aria-labelledby="menu-section">
{% for menu in menus %}
<a class="dropdown-item list-group-item bg-dark text-white"
<a class="dropdown-item list-group-item bg-dark text-white"
href="{{ menu.uri }}">
{{ menu.label }}
{% apply spaceless %}