{% set current = app.request.attributes.get('_route') %}
{# Styles du nouveau menu #}
{% block stylesheets %}
<style>
:root {
--primary: #3D7299;
--secondary: #a4286d;
}
*, ::before, ::after {
box-sizing: inherit;
}
#navbar-container {
bottom: 0;
align-items: center;
display: flex;
height: 100vh;
justify-content: center;
left: 0;
padding: 3rem 3rem;
position: fixed;
width: 330px;
}
#navbar {
background: #fff;
border-radius: 20px;
box-shadow: 15px 15px 10px #00000029;
display: flex;
flex-direction: column;
height: 100%;
align-items: center;
color: var(--primary);
width: 100%;
}
header {
align-items: center;
display: flex;
padding: 1.5rem 2rem;
width: 100%;
}
header svg {
fill: var(--primary);
}
header #header-title {
display: flex;
flex-direction: column;
height: 100%;
justify-content: center;
margin-left: 1rem;
position: relative;
}
header #header-title #hello {
font-size: 1.6em;
font-weight: 400;
}
header #header-title #app-version {
bottom: -5px;
font-size: .9em;
font-weight: 100;
left: 0;
position: absolute;
}
.nav {
height: 100%;
padding: 2rem 0;
width: 100%;
}
.nav ul {
list-style: none;
display: flex;
flex-direction: column;
height: 100%;
margin: 0;
padding: 0;
}
#nav-item-end {
margin-top: auto;
}
.nav li {
display: flex;
flex-direction: column;
padding: .2rem 2rem;
}
.nav li:hover .link-bottom {
background: var(--secondary);
width: 100%;
}
.nav li .link-bottom {
background: var(--primary);
border-radius: 6px;
height: .2rem;
transition: .2s linear;
width: 0;
}
.nav li .nav-link {
color: var(--primary);
display: flex;
align-items: center;
width: 100%;
}
.nav li .icon-container {
align-items: center;
display: flex;
height: 50px;
justify-content: center;
width: 50px;
}
.nav li .nav-icon {
align-items: center;
color: var(--primary);
display: flex;
font-size: 2.25em;
justify-content: center;
}
.nav li .nav-link-content {
display: flex;
align-items: center;
}
.nav li .nav-link-content .link-text {
font-size: 1.1em;
font-weight: 500;
margin-left: 1rem;
}
.nav li .router-link-active + .link-bottom {
width: 100%;
}
.nav li .router-link-active + .link-bottom:hover {
color: #065580;
font-weight: 400;
}
</style>
{% endblock %}
{% if (is_granted('ROLE_SURVEY')) %}
{% if app.user.hasGroup('GROUP_LANDLORD') %}
{% set hasAdministrativeInterface = app.user.organization.isAdminInterfaceVisible %}
{% set hasPrivateMessage = app.user.organization.hasPrivateMessage %}
{% set isManager = app.user.isManager %}
{% set hasIncident = false %}
{% set hasSocialAd = false %}
{% set batiConnect = app.user.organization.corporateName | lower == "noralsy" %}
{% elseif app.user.hasGroup('GROUP_RESIDENT') %}
{% set isManager = false %}
{% set hasAdministrativeInterface = app.user.organization.isAdminInterfaceVisible %}
{% set hasPrivateMessage = app.user.apartment.entrance.residence.hasPrivateMessage %}
{% set hasIncident = app.user.apartment.entrance.residence.hasIncident %}
{% set hasSocialAd = app.user.apartment.entrance.residence.hasSocialAd %}
{% set batiConnect = false %}
{% elseif app.user.hasGroup('GROUP_ADMIN') %}
{% set hasPrivateMessage = false %}
{% set hasIncident = false %}
{% set hasSocialAd = false %}
{% set isManager = app.user.isManager %}
{% set batiConnect = false %}
{% endif %}
<div id="navbar-container">
<div id="navbar">
<header>
<svg xmlns="http://www.w3.org/2000/svg"
width="50"
height="50"
viewBox="0 0 100 100"
role="presentation">
<title id="logo-oecko" lang="en">oecko icon</title>
<g>
<path d="M49.52,45.77a3,3,0,1,0,4.29.34,3.05,3.05,0,0,0-4.29-.34Z"/>
<path d="M74.11,32.28,60.72,73.53a3.48,3.48,0,0,1-6.62,0L47.84,54a3.44,3.44,0,0,0-1.94-2.13L26.66,43.5a3.48,3.48,0,0,1,.66-6.6l42.75-9.1a3.49,3.49,0,0,1,4,4.48ZM40.41,54.36a3,3,0,1,1-.34,4.29,3,3,0,0,1,.34-4.29Zm5.41,13.77L27,72.68a1.55,1.55,0,0,1-1.85-1.94l5.44-18.43a1.54,1.54,0,0,1,2.93-.07l3,8.59a1.54,1.54,0,0,0,.88.92L46,65.2a1.54,1.54,0,0,1-.22,2.93Zm3.44-64A46.5,46.5,0,1,0,95.92,50.45,46.49,46.49,0,0,0,49.26,4.12Z"/>
</g>
</svg>
<div id="header-title">
<span id="hello">OECKO</span>
<span id="app-version">βeta</span>
</div>
</header>
<div class="nav">
<ul>
<li>
<a href="{{ path('front_homepage', { _locale: app.request.locale }) }}" class="nav-link {{ current == 'front_homepage' ? "router-link-active" }}">
<span class="nav-link-content">
<div class="icon-container">
<span class="material-symbols-outlined nav-icon">home</span>
</div>
<span class="link-text">{{ 'navbar.home' | trans }}</span>
</span>
</a>
<div class="link-bottom"></div>
</li>
{% if (is_granted('ROLE_READ_MESSAGE')) and hasPrivateMessage %}
<li>
<a href="{{ path('app_privatemessage_showmessages', { _locale: app.request.locale }) }}" class="nav-link {{ current == 'app_privatemessage_showmessages' ? "router-link-active" }}">
<span class="nav-link-content">
<div class="icon-container">
<span class="material-symbols-outlined nav-icon">message</span>
</div>
<span class="link-text">{{ 'navbar.messaging' | trans }}</span>
</span>
</a>
<div class="link-bottom"></div>
</li>
{% endif %}
{% if (is_granted('ROLE_PUBLICMESSAGE')) %}
<li>
<a href="{{ path('app_publication_publicationsindex', { _locale: app.request.locale }) }}" class="nav-link {{ current == 'app_publication_publicationsindex' ? "router-link-active" }}">
<span class="nav-link-content">
<div class="icon-container">
<span class="material-symbols-outlined nav-icon">document_scanner</span>
</div>
<span class="link-text">{{ 'navbar.publications' | trans }}</span>
</span>
</a>
<div class="link-bottom"></div>
</li>
{% endif %}
{% if (is_granted('ROLE_MODERATOR')) %}
<li>
<a href="{{ path('app_moderation_moderation', { _locale: app.request.locale }) }}" class="nav-link {{ current == 'app_moderation_moderation' ? "router-link-active" }}">
<span class="nav-link-content">
<div class="icon-container">
<span class="material-symbols-outlined nav-icon">remove_red_eye</span>
</div>
<span class="link-text">{{ 'navbar.moderation' | trans }}</span>
</span>
</a>
<div class="link-bottom"></div>
</li>
{% endif %}
<li>
<a href="{{ nuxtAppUrl }}/{{ app.request.locale }}/surveys" class="nav-link">
<span class="nav-link-content">
<div class="icon-container">
<span class="material-symbols-outlined nav-icon">add_chart</span>
</div>
<span class="link-text">{{ 'navbar.surveys' | trans }}</span>
</span>
</a>
<div class="link-bottom"></div>
</li>
{% if (is_granted('ROLE_USEFULCONTACT_MANAGER')) %}
<li>
<a href="{{ path('app_contact_contactmanagement', { _locale: app.request.locale }) }}" class="nav-link {{ current == 'app_contact_contactmanagement' ? "router-link-active" }}">
<span class="nav-link-content">
<div class="icon-container">
<span class="material-symbols-outlined nav-icon">phone_in_talk</span>
</div>
<span class="link-text">{{ 'navbar.contacts' | trans }}</span>
</span>
</a>
<div class="link-bottom"></div>
</li>
{% endif %}
{% if is_granted('ROLE_EDIT_RESIDENCE') %}
<li>
<a href="{{ path('app_manageproperties_manageproperties', { _locale: app.request.locale }) }}" class="nav-link {{ current == 'app_manageproperties_manageproperties' ? "router-link-active" }}">
<span class="nav-link-content">
<div class="icon-container">
<span class="material-symbols-outlined nav-icon">apartment</span>
</div>
<span class="link-text">{{ 'navbar.residences' | trans }}</span>
</span>
</a>
<div class="link-bottom"></div>
</li>
{% endif %}
{% if isManager %}
<li>
<a href="{{ path('app_manageaccounts_manageaccounts', { _locale: app.request.locale }) }}" class="nav-link {{ current == 'app_manageaccounts_manageaccounts' ? "router-link-active" }}">
<span class="nav-link-content">
<div class="icon-container">
<span class="material-symbols-outlined nav-icon">supervised_user_circle</span>
</div>
<span class="link-text">{{ 'navbar.accounts' | trans }}</span>
</span>
</a>
<div class="link-bottom"></div>
</li>
{% endif %}
<li id="nav-item-end">
<a href="{{ path('app_logout', { _locale: app.request.locale }) }}" class="nav-link">
<span class="nav-link-content">
<div class="icon-container">
<span class="material-symbols-outlined nav-icon">logout</span>
</div>
<span class="link-text">{{ 'navbar.logout' | trans }}</span>
</span>
</a>
<div class="link-bottom"></div>
</li>
</ul>
</div>
</div>
</div>
{% else %}
<a href="#" id="menu-slide-out-btn" data-activates="slide-out" class="button-collapse"><i class="fa fa-bars"></i></a>
<ul style="height: 100%" id="slide-out" class="side-nav fixed">
<div id="navbar-header">
{% set home_url = absolute_url(path('front_homepage')) %}
{% if app.user %}
{% if app.user.hasGroup('GROUP_ADMIN') or not app.user.organization.activeInterface or app.user.organization.corporateLogoName == null %}
<img
src="{{ asset('app/img/oecko-round-icon.png') }}"
onclick="document.location.href='{{ home_url }}'"
alt="Logo Oecko"
/>
<div id="oecko-clock" class="hide-on-small-only"></div>
{% else %}
<img
id="orga-logo"
src="{{ medias.getServerUrl(app.user.organization.corporateLogoStorageName) }}"
onclick="document.location.href='{{ home_url }}'"
alt="Logo Oecko"/>
<div id="oecko-clock" class="hide-on-small-only"></div>
{% endif %}
{% endif %}
</div>
<div id="navbar-scroll-container">
{% if app.user %}
{% if app.user.hasGroup('GROUP_LANDLORD') %}
{% set hasAdministrativeInterface = app.user.organization.isAdminInterfaceVisible %}
{% set hasPrivateMessage = app.user.organization.hasPrivateMessage %}
{% set isManager = app.user.isManager %}
{% set hasIncident = false %}
{% set hasSocialAd = false %}
{% set batiConnect = app.user.organization.corporateName | lower == "noralsy" %}
{% elseif app.user.hasGroup('GROUP_RESIDENT') %}
{% set isManager = false %}
{% set hasAdministrativeInterface = app.user.organization.isAdminInterfaceVisible %}
{% set hasPrivateMessage = app.user.apartment.entrance.residence.hasPrivateMessage %}
{% set hasIncident = app.user.apartment.entrance.residence.hasIncident %}
{% set hasSocialAd = app.user.apartment.entrance.residence.hasSocialAd %}
{% set batiConnect = false %}
{% elseif app.user.hasGroup('GROUP_ADMIN') %}
{% set hasPrivateMessage = false %}
{% set hasIncident = false %}
{% set hasSocialAd = false %}
{% set isManager = app.user.isManager %}
{% set batiConnect = false %}
{% endif %}
{% if (is_granted('ROLE_READ_MESSAGE')) and hasPrivateMessage %}
<li>
{% if app.user.getUnreadMessageNumber() > 0 and app.user.getUnreadMessageNumber()<100 %}
<div class='pastille'>{{ app.user.getUnreadMessageNumber() }}</div>
{% elseif app.user.getUnreadMessageNumber()>=100 %}
<div class='pastille'>99+</div>
{% endif %}
<a class="waves-effect waves-light tooltipped {{ current == 'app_privatemessage_showmessages' ? "active" }}"
href="{{ path('app_privatemessage_showmessages', { _locale: app.request.locale }) }}" data-position="right" data-delay="50" data-tooltip="Messages">
<i class="fa fa-envelope"></i>
</a>
</li>
{% endif %}
{% if (is_granted('ROLE_PUBLICMESSAGE')) %}
<li>
<a class="waves-effect waves-light tooltipped {{ current == 'app_publication_publicationsindex' ? "active" }}"
href="{{ path('app_publication_publicationsindex', { _locale: app.request.locale }) }}" data-position="right" data-delay="50"
data-tooltip="Gérer les publications">
<i class="fa fa-pencil-square-o"></i>
</a>
</li>
{% endif %}
{% if (is_granted('ROLE_SURVEY')) %}
<li>
<a class="waves-effect waves-light tooltipped"
href="{{ nuxtAppUrl }}/{{ app.request.locale }}/surveys" data-position="right" data-delay="50"
data-tooltip="Gérer les enquêtes">
<i class="fa fa-question"></i>
</a>
</li>
{% endif %}
{% if (is_granted('ROLE_MODERATOR')) %}
<li>
<a class="waves-effect waves-light tooltipped {{ current == 'app_moderation_moderation' ? "active" }}"
href="{{ path('app_moderation_moderation', { _locale: app.request.locale }) }}" data-position="right" data-delay="50"
data-tooltip="Espace de modération">
<i class="fa fa-eye-slash"></i>
</a>
</li>
{% endif %}
{% if isManager %}
<li>
<a class="waves-effect waves-light tooltipped {{ current == 'app_manageaccounts_manageaccounts' ? "active" }}"
href="{{ path('app_manageaccounts_manageaccounts', { _locale: app.request.locale }) }}" data-position="right" data-delay="50"
data-tooltip="Gestion des comptes">
<i class="fa fa-users"></i>
</a>
</li>
{% endif %}
{% if is_granted('ROLE_EDIT_RESIDENCE') %}
<li>
<a class="waves-effect waves-light tooltipped {{ current == 'app_manageproperties_manageproperties' ? "active" }}"
href="{{ path('app_manageproperties_manageproperties', { _locale: app.request.locale }) }}" data-position="right" data-delay="50"
data-tooltip="Gestion des résidences">
<i class="fa fa-building-o"></i>
</a>
</li>
{% endif %}
{% if is_granted('ROLE_USEFULCONTACT_MANAGER') %}
<li>
<a class="waves-effect waves-light tooltipped {{ current == 'app_contact_contactmanagement' ? "active" }}"
href="{{ path('app_contact_contactmanagement', { _locale: app.request.locale }) }}" data-position="right" data-delay="50"
data-tooltip="Gestion des résidences">
<i class="fa fa-phone"></i>
</a>
</li>
{% endif %}
{% if is_granted('ROLE_MANAGE_THINCLIENT') %}
<li>
<a class="waves-effect waves-light tooltipped {{ current == 'app_defaultback_managethinclients' ? "active" }}"
href="{{ path('app_defaultback_managethinclients', { _locale: app.request.locale }) }}" data-position="right" data-delay="50"
data-tooltip="Gestion des écrans">
<i class="fa fa-tablet"></i>
</a>
</li>
{% endif %}
{% if is_granted('ROLE_MANAGE_THINCLIENT') %}
<li>
<a class="waves-effect waves-light tooltipped {{ current == 'app_defaultback_managethinclients_v2' ? "active" }}"
href="{{ nuxtAppUrl }}/{{ app.request.locale }}/park" data-position="right" data-delay="50"
data-tooltip="Gestion des écrans V2">
V2
</a>
</li>
{% endif %}
{% if is_granted('ROLE_REPORT_INCIDENT') and hasIncident %}
<li>
<a class="waves-effect waves-light tooltipped {{ current == 'app_incident_reportincident' ? "active" }}"
href="{{ path('app_incident_reportincident', { _locale: app.request.locale }) }}" data-position="right" data-delay="50"
data-tooltip="Déclarer un incident">
<i class="fa fa-bullhorn"></i>
</a>
</li>
{% endif %}
{% if is_granted('ROLE_SOCIALAD') and hasSocialAd %}
<li>
<a class="waves-effect waves-light tooltipped {{ current == 'app_socialad_socialads' ? "active" }}"
href="{{ path('app_socialad_socialads', { _locale: app.request.locale }) }}" data-position="right" data-delay="50" data-tooltip="Lien social">
<i class="fa fa-group"></i>
</a>
</li>
{% endif %}
{% if hasAdministrativeInterface is defined and hasAdministrativeInterface == true and app.user.hasGroup('GROUP_RESIDENT') %}
<li>
<a class="waves-effect waves-light tooltipped {{ current == 'app_documents_documents' ? "active" }}"
href="{{ path('app_documents_documents', { _locale: app.request.locale }) }}" data-position="right" data-delay="50" data-tooltip="Lien social">
<i class="menu-icon material-icons">attach_file</i>
</a>
</li>
{% endif %}
{% if is_granted('ROLE_SOCIALAD') and hasSocialAd %}
<li>
<a class="waves-effect waves-light tooltipped {{ current == 'app_contact_contact' ? "active" }}"
href="{{ path('app_contact_contact', { _locale: app.request.locale }) }}" data-position="right" data-delay="50" data-tooltip="Contact">
<i class="menu-icon material-icons">local_phone </i>
</a>
</li>
{% endif %}
{% if (is_granted('ROLE_ADD_ADMIN')) %}
<li>
<a class="waves-effect waves-light tooltipped {{ current == 'app_managefeatures_managefeaturesindex' ? "active" }}"
href="{{ path('app_managefeatures_managefeaturesindex', { _locale: app.request.locale }) }}" data-position="right" data-delay="50"
data-tooltip="Gestion des fonctionnalités Oecko">
<i class="fa fa-sliders"></i>
</a>
</li>
<li>
<a class="waves-effect waves-light tooltipped {{ current == 'app_appsettings_appsettings' ? "active" }}"
href="{{ path('app_appsettings_appsettings', { _locale: app.request.locale }) }}" data-position="right" data-delay="50"
data-tooltip="Paramètres généraux">
<i class="fa fa-cogs"></i>
</a>
</li>
{% endif %}
{% if (batiConnect) %}
<li>
<a class="baticonnect"
href="https://www.baticonnect.com/index.php" data-position="right" data-delay="50"
data-tooltip="Gestion administrative">
<img
src="{{ asset('app/img/baticonnect.png') }}"
alt="Logo Baticonnect"
/>
</a>
</li>
{% endif %}
<li>
<a class="waves-effect waves-light tooltipped"
href="{{ path('app_logout', { _locale: app.request.locale }) }}" data-position="right" data-delay="50"
data-tooltip="Se déconnecter">
<i class="fa fa-sign-out"></i>
</a>
</li>
{% else %}
<li>
<a class="waves-effect waves-light tooltipped {{ current == 'app_login' ? "active" }}"
href="#" data-position="right" data-delay="50"
data-tooltip="S'identifier">
<i class="fa fa-lock"></i>
</a>
</li>
<li>
<a class="waves-effect waves-light tooltipped {{ current == '#' ? "active" }}"
href="https://oecko.com" data-position="right" data-delay="50" data-tooltip="Découvrez l'application OECKO">
<i class="fa fa-info-circle"></i>
</a>
</li>
{% endif %}
<div class="clearer"></div>
</div>
</ul>
{% endif %}