<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:th="http://www.thymeleaf.org">

	<div class="bg-light border-right" id="sidebarResponsive" th:fragment="sidebar">
		<div class="sidebar-heading uv-sidebar-heading" th:text="${#authentication.principal.usuari}" th:attr="title=${#authentication.principal.nom}+' '+${#authentication.principal.cognoms}"></div>
		<div class="navbar uv-navbar-menu-text" id="navbarResponsive" style="margin-top:-10px;">
			<ul class="uv-navbar-nav navbar-nav ml-auto" style="flex-direction: row !important;">
				<li class="nav-item dropright uv-dropright" th:attr="title=#{global.lang}">
					<a class="nav-link nav-link-black dropdown-toggle"  href="#" id="navbarDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"><i class="fas fa-globe-africa"></i></a>
					<div class="dropdown-menu dropdown-menu-right uv-navbar-dropdown" aria-labelledby="navbarDropdown" style="position:absolute !important;">
						<a class="dropdown-item uv-dropdown-item" href="#" th:text="#{global.lang.va}" onclick="changeLocale('ca')"></a>
						<a class="dropdown-item uv-dropdown-item" href="#" th:text="#{global.lang.es}" onclick="changeLocale('es')"></a>
					</div>
				</li>
				<li class="uv-navbar-li-separator-black"></li>
				<li class="nav-item uv-sidebar-nav-item" style="padding-right: .7rem;" th:attr="title=#{global.help}">
					<a class="nav-link nav-link-black" target="_blank" href="https://www.uv.es/uq"><i class="far fa-question-circle"></i></a>
				</li>
				<li class="uv-navbar-li-separator-black"></li>
				<li class="nav-item uv-sidebar-nav-item" th:attr="title=#{global.exit}">
					<a href="/logout" class="nav-link nav-link-black"><i class="fas fa-sign-out-alt"> </i></a>
				</li>
			</ul>
		</div>
		<br>
		<div class="list-group list-group-flush" style="margin-top:-10px;">	 
			<a href="/dashboard" class="uv-list-group-item list-group-item list-group-item-action bg-light" th:text="#{global.menu.tits}"></a>	 
			<a href="/procedures" class="uv-list-group-item list-group-item list-group-item-action bg-light" th:text="#{global.menu.procedures}"></a>
			<a href="/supervision" class="uv-list-group-item list-group-item list-group-item-action bg-light" th:text="#{global.menu.supervision}"></a>
			<a href="/managers" class="uv-list-group-item list-group-item list-group-item-action bg-light" th:text="#{global.menu.managers}"></a>
		</div>
		<br>
		<div class="list-group list-group-flush" th:if="${#authentication.principal.isAdmin() or #authentication.principal.isDataTest()}">
			<div class="btn-group dropright">
				<strong type="button" class="uv-list-group-item list-group-item list-group-item-action bg-light dropdown-toggle" th:text="#{global.menu.data}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-offset="-200">
					Datos y plantillas
				</strong>
				<div class="dropdown-menu">
					<a href="/data/import" class="uv-list-group-item list-group-item list-group-item-action bg-light" th:text="#{global.menu.data.import}"></a>
					<a href="/data/current" class="uv-list-group-item list-group-item list-group-item-action bg-light" th:text="#{global.menu.data.data}"></a>
					<a href="/data/consolidate" class="uv-list-group-item list-group-item list-group-item-action bg-light" th:if="${#authentication.principal.isAdmin()}" th:text="#{global.menu.data.parse}"></a>
					<a href="/admin/templates" class="uv-list-group-item list-group-item list-group-item-action bg-light" th:text="#{global.menu.data.templates}"></a>
					<a href="/admin/editor" class="uv-list-group-item list-group-item list-group-item-action bg-light" th:text="#{global.menu.data.editor}"></a>
			  	</div>
			</div>
		</div>
		<div class="list-group list-group-flush" th:if="${#authentication.principal.isAdmin()}">
			<div class="btn-group dropright">
				<strong type="button" class="uv-list-group-item list-group-item list-group-item-action bg-light dropdown-toggle" th:text="#{global.menu.admin}" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" data-offset="-200">
					Administración
				</strong>
				<div class="dropdown-menu">
			  		<a href="/admin/instances" class="uv-list-group-item list-group-item list-group-item-action bg-light" th:text="#{global.menu.admin.instances}"></a>
					<a href="/admin/calendar" class="uv-list-group-item list-group-item list-group-item-action bg-light" th:text="#{global.menu.admin.calendar}"></a>
					<a href="/admin/procedures" class="uv-list-group-item list-group-item list-group-item-action bg-light" th:text="#{global.menu.admin.procedures}"></a>
					<a href="/admin/mailing" class="uv-list-group-item list-group-item list-group-item-action bg-light" th:text="#{global.menu.admin.mailing}"></a>
					<a href="/admin/stats" class="uv-list-group-item list-group-item list-group-item-action bg-light" th:text="#{global.menu.admin.stats}"></a>
			  	</div>
			</div>
		</div>
		<br>
		<div class="list-group uv-list-group-bottom list-group-flush" style="text-align:center;">
			<span class="uv-list-group-bottom-item bg-light">
				<a href="#" data-toggle="modal" data-target="#contactModal"><i class="far fa-envelope" style="font-size:120%"></i> <span th:text="#{global.menu.contact}">Contacto</span></a>
			</span>
			<br>
		</div>
	</div>
</html>
