forked from NeoRazorX/facturascripts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMenuTemplate.html.twig
More file actions
190 lines (190 loc) · 9.6 KB
/
MenuTemplate.html.twig
File metadata and controls
190 lines (190 loc) · 9.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
{#
/**
* This file is part of FacturaScripts
* Copyright (C) 2017-2025 Carlos Garcia Gomez <carlos@facturascripts.com>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser 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 Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this program. If not, see http://www.gnu.org/licenses/.
*/
#}
{% import 'Macro/GoogleTagManager.html.twig' as GoogleTagManager %}
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="{{ constant('FS_LANG') | slice(0, 2) }}"
xml:lang="{{ constant('FS_LANG') | slice(0, 2) }}">
<head>
{{ GoogleTagManager.head() }}
{% for includeView in getIncludeViews('MenuTemplate', 'HeadFirst') %}
{% include includeView['path'] %}
{% endfor %}
{% block meta %}
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>{{ fsc.title | raw }}</title>
<meta name="description" content="{{ trans('meta-description') }}"/>
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<meta name="generator" content="FacturaScripts"/>
<meta name="robots" content="noindex"/>
{% endblock %}
{% block icons %}
<link rel="shortcut icon" href="{{ asset('Dinamic/Assets/Images/favicon.ico') }}"/>
<link rel="apple-touch-icon" sizes="180x180"
href="{{ asset('Dinamic/Assets/Images/apple-icon-180x180.png') }}"/>
{% endblock %}
{% for includeView in getIncludeViews('MenuTemplate', 'CssBefore') %}
{% include includeView['path'] %}
{% endfor %}
{% block css %}
<link rel="stylesheet" href="{{ asset('node_modules/bootstrap/dist/css/bootstrap.min.css') }}?v=5"/>
<link rel="stylesheet" href="{{ asset('node_modules/@fortawesome/fontawesome-free/css/all.min.css') }}?v=6"/>
<link rel="stylesheet" href="{{ asset('Dinamic/Assets/CSS/custom.css') }}?v=6"/>
{% endblock %}
{# Adds custom CSS assets #}
{% for css in assetManager.get('css') %}
<link rel="stylesheet" href="{{ css }}"/>
{% endfor %}
{% for includeView in getIncludeViews('MenuTemplate', 'CssAfter') %}
{% include includeView['path'] %}
{% endfor %}
{% for includeView in getIncludeViews('MenuTemplate', 'JsHeadBefore') %}
{% include includeView['path'] %}
{% endfor %}
{% block javascripts %}
<script src="{{ asset('node_modules/jquery/dist/jquery.min.js') }}"></script>
<script src="{{ asset('node_modules/bootstrap/dist/js/bootstrap.bundle.min.js') }}?v=5"></script>
<script src="{{ asset('node_modules/bootbox/dist/bootbox.min.js') }}"></script>
<script src="{{ asset('node_modules/bootbox/dist/bootbox.locales.min.js') }}"></script>
<script src="{{ asset('node_modules/pace-js/pace.min.js') }}"></script>
<script src="{{ asset('node_modules/@fortawesome/fontawesome-free/js/all.min.js') }}?v=6"></script>
<script src="{{ asset('Dinamic/Assets/JS/Custom.js') }}?v=6"></script>
{% endblock %}
{# Adds custom JS assets #}
{% for js in assetManager.get('js') %}
<script src="{{ js }}"></script>
{% endfor %}
{% for includeView in getIncludeViews('MenuTemplate', 'JsHeadAfter') %}
{% include includeView['path'] %}
{% endfor %}
{% if debugBarRender %}
{{ debugBarRender.renderHead() | raw }}
{% endif %}
{% for includeView in getIncludeViews('MenuTemplate', 'HeadEnd') %}
{% include includeView['path'] %}
{% endfor %}
</head>
{% block fullBody %}
<body>
{{ GoogleTagManager.body() }}
{% for includeView in getIncludeViews('MenuTemplate', 'BodyFirst') %}
{% include includeView['path'] %}
{% endfor %}
{% block navbar %}
<nav class="navbar navbar-expand navbar-dark bg-primary sticky-top d-print-none">
<div class="container-fluid">
{% block navbarContent %}
<a class="navbar-brand d-none d-sm-inline" href="{{ asset(fsc.user.homepage) }}" title="{{ trans('homepage') }}">
<img src="{{ asset('Dinamic/Assets/Images/logo-white.png') }}" width="30" height="30"
class="d-inline-block align-top" alt="FacturaScripts"/>
<span class="d-none d-xl-inline-block">{{ fsc.empresa.nombrecorto | raw }}</span>
</a>
<div class="navbar-collapse collapse">
<ul class="navbar-nav pt-1">
{% import 'Macro/Menu.html.twig' as macros %}
{% for menuItem in menuManager.getMenu() %}
{{ macros.showMenu(menuItem) }}
{% endfor %}
</ul>
<ul class="navbar-nav flex-row ms-auto">
{% block navbarMenuIcon %}
{% for includeView in getIncludeViews('MenuTemplate', 'MenuIconBefore') %}
{% include includeView['path'] %}
{% endfor %}
<li class="nav-item{{ template == 'MegaSearch.html.twig' ? ' active' : '' }}"
title="{{ trans('search') }}">
<a class="nav-link" href="MegaSearch" id="menuIconSearch">
<i class="fa-solid fa-search" aria-hidden="true"></i>
</a>
</li>
<li class="nav-item" title="{{ trans('help') }}">
<a class="nav-link" id="menuIconHelp" rel="nofollow" target="_blank"
href="https://facturascripts.com/ayuda?controller={{ controllerName }}">
<i class="fa-solid fa-question-circle" aria-hidden="true"></i>
</a>
</li>
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle mr-md-2" href="#" data-bs-toggle="dropdown"
aria-haspopup="true" aria-expanded="false" id="menuIconUser"
title="{{ trans('user') }}">
<i class="fa-solid fa-user-circle fa-fw" aria-hidden="true"></i>
</a>
<div class="dropdown-menu dropdown-menu-end" aria-labelledby="user-list">
<a class="dropdown-item" href="{{ fsc.user.url() }}">
<i class="fa-solid fa-user-circle fa-fw" aria-hidden="true"></i> {{ fsc.user.nick }}
</a>
<a class="dropdown-item send-email" href="SendMail">
<i class="fa-solid fa-envelope fa-fw" aria-hidden="true"></i>
{{ trans('send-mail') }}
</a>
{% for includeView in getIncludeViews('MenuTemplate', 'MenuIconUser') %}
{% include includeView['path'] %}
{% endfor %}
<div class="dropdown-divider"></div>
<a class="dropdown-item" href="{{ asset('login') }}?action=logout&multireqtoken={{ formToken(false) }}">
<i class="fa-solid fa-door-open fa-fw" aria-hidden="true"></i> {{ trans('logout') }}
</a>
</div>
</li>
{% for includeView in getIncludeViews('MenuTemplate', 'MenuIconAfter') %}
{% include includeView['path'] %}
{% endfor %}
{% endblock %}
</ul>
</div>
{% endblock %}
</div>
</nav>
{% endblock %}
<div class="pt-3">
{% block messages %}
{% include 'Macro/Toasts.html.twig' %}
{% from 'Macro/Utils.html.twig' import message as showMessage %}
<div class="container-fluid">
<div class="row">
<div class="col-12">
{{ showMessage(log, ['error', 'critical'], 'danger') }}
{{ showMessage(log, ['warning'], 'warning') }}
{{ showMessage(log, ['notice'], 'success') }}
{{ showMessage(log, ['info'], 'info') }}
</div>
</div>
</div>
{% endblock %}
{% block bodyHeaderOptions %}
{% endblock %}
</div>
{% block body %}
{% endblock %}
{% for includeView in getIncludeViews('MenuTemplate', 'JsFooter') %}
{% include includeView['path'] %}
{% endfor %}
{% for includeView in getIncludeViews('MenuTemplate', 'BodyEnd') %}
{% include includeView['path'] %}
{% endfor %}
{% if debugBarRender %}
{{ debugBarRender.render() | raw }}
{% endif %}
<br/>
<br/>
<br/>
<!-- execution time: {{ executionTime() }} s -->
</body>
{% endblock %}
</html>