{% set currentPath = path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) %}
<style>
.progress {
width: 45px;
height: 45px;
background: none;
position: relative;
top: 0px;
right: 10px;
}
.progress::after {
content: "";
width: 100%;
height: 100%;
border-radius: 50%;
border: 6px solid #fff;
position: absolute;
top: 0;
left: 0;
}
.progress > span {
width: 50%;
height: 100%;
overflow: hidden;
position: absolute;
top: 0;
z-index: 1;
}
.progress .progress-left {
left: 0;
}
.progress .progress-bar {
width: 100%;
height: 100%;
background: none;
border-width: 6px;
border-style: solid;
position: absolute;
top: 0;
border-color: #db1a21 !important;
}
.progress .progress-left .progress-bar {
left: 100%;
border-top-right-radius: 80px;
border-bottom-right-radius: 80px;
border-left: 0;
-webkit-transform-origin: center left;
transform-origin: center left;
}
.progress .progress-right {
right: 0;
}
.progress .progress-right .progress-bar {
left: -100%;
border-top-left-radius: 80px;
border-bottom-left-radius: 80px;
border-right: 0;
-webkit-transform-origin: center right;
transform-origin: center right;
}
.progress .progress-value {
position: absolute;
top: 0;
left: 0;
}
.progress .progress-value .h2 {
font-size: 11px;
color: #ffffff;
margin: 0;
}
@media (min-width: 768px) {
.progress {
position: absolute;
top: 10px;
right: calc(50% - 150px);
}
}
@media (min-width: 992px) {
.progress {
position: absolute;
top: 10px;
right: calc(30% - 150px);
}
}
@media (min-width: 1200px) {
.progress {
position: absolute;
top: 10px;
right: calc(30% - 150px);
}
}
@media (min-width: 1400px) {
.progress {
position: absolute;
top: 10px;
right: calc(23% - 150px);
}
}
</style>
<script>
$(function () {
$(".progress").each(function () {
var value = $(this).attr('data-value');
var left = $(this).find('.progress-left .progress-bar');
var right = $(this).find('.progress-right .progress-bar');
if (value > 0) {
if (value <= 50) {
right.css('transform', 'rotate(' + percentageToDegrees(value) + 'deg)')
} else {
right.css('transform', 'rotate(180deg)')
left.css('transform', 'rotate(' + percentageToDegrees(value - 50) + 'deg)')
}
}
})
function percentageToDegrees(percentage) {
return percentage / 100 * 360
}
});
</script>
{% if is_granted('ROLE_INCOMPLETE_USER') and not (currentPath starts with '/express/') and not (currentPath starts with '/login') %}
{% include 'Theme/_userNavbar.html.twig' %}
{% else %}
<nav class="navbar navbar-expand-lg sticky-top">
<div class="container p-0">
<div class="d-flex container-fluid justify-content-between p-0 position-relative">
{% if currentPath is same as '/user/' %}
<div class="d-md-none">
<a class="nav-link d-flex h-100 align-items-center minimize_sidebar d-lg-none">
<i class="far fa-bars "></i>
</a>
</div>
{% elseif breadcrumbComplaintExpress is not defined %}
<div class="d-md-none">
<a class="nav-link nav-link d-flex h-100 align-items-center" href="{{ returnUrl is defined ? returnUrl : "javascript:customHistoryBack()" }}" id="back">
<i class="far fa-angle-left fz-30"></i>
</a>
</div>
{% elseif (app.request.get('_route') in ['express_complaint_register']) or (app.request.query.get('complaint') == 1) %}
<div class="d-md-none">
<a class="nav-link nav-link d-flex h-100 align-items-center" href="javascript:customHistoryBack()" id="back">
<i class="far fa-angle-left fz-30"></i>
</a>
</div>
{% elseif (app.request.get('_route') in ['express_complaint_register']) or (app.request.query.get('complaint') == 1) or (app.user is not null and breadcrumbComplaintExpress is defined and app.request.get('_route') != 'express_complaint_x_identite') %}
<div class="d-none">
<a class="nav-link nav-link d-flex h-100 align-items-center" href="{{ returnUrl is defined ? returnUrl : "javascript:customHistoryBack()" }} " id="back">
<i class="far fa-angle-left fz-30"></i>
</a>
</div>
{% endif %}
<div class="d-none">
{% if currentPath starts with '/express/' or (currentPath starts with '/login')%}
<a class="nav-link" href="javascript:customHistoryBack()" id="back">
<i class="far fa-angle-left "></i>
</a>
{% endif %}
</div>
{# <div> #}
{# {% if is_granted('ROLE_INCOMPLETE_USER') and not (currentPath starts with '/express/') %} #}
{# {% if(currentPath is same as '/user/') %} #}
{# <a class="nav-link minimize_sidebar d-lg-none" href="#"> #}
{# <i class="far fa-bars "></i> #}
{# </a> #}
{# {% else %} #}
{# <a class="nav-link" href="javascript:customHistoryBack()" id="back" > #}
{# <i class="far fa-angle-left "></i> #}
{# </a> #}
{# {% endif %} #}
{# </div> #}
{% if is_granted('ROLE_INCOMPLETE_USER') and not (currentPath starts with '/express/') and not (currentPath starts with '/login')%}
{# <div class="text-center text-white"> #}
{# <div class="text-center d-none d-lg-block text-white"> #}{# <div class="text-blue-riposte text-center d-none d-lg-block"> #}
<div class="text-blue-riposte text-center d-lg-none d-xl-none d-xxl-none">{{ heading }}
</div>
{% else %}
<div class="d-flex justify-content-center align-items-center text-center text-white text-mobile"
style="color: white;">
<div class="d-flex justify-content-center align-items-center text-center text-white text-mobile brand px-3 ms-0">
<div>
<img style="height: 60px;" src="{{ asset('/assets/img/svg/riposte_logo.svg') }}">
</div>
</div>
</div>
<div class="complaint_cancel ms-md-auto d-flex {{ breadcrumbComplaintExpress is defined and app.request.get('_route') not in ['login', 'login_register', 'express_complaint_register'] ? 'pause' : '' }}">
{% if app.user is not null and breadcrumbComplaintExpress is defined %}
<button href="{{ path('user_homepage') }}" data-bs-toggle="modal"
data-bs-target="#modalComplaintPause">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewbox="0 0 24 24"
stroke-width="3" stroke="currentColor" class="w-6 h-6">
<path stroke-linecap="round" stroke-linejoin="round"
d="M15.75 5.25v13.5m-7.5-13.5v13.5"/>
</svg>
<span class="d-none d-md-inline">Pause</span>
</button>
{% else %}
<a href="{{ path(app.user is null ? 'portal' : 'user_homepage') }}">
<img src="{{ asset('assets/img/svg/cancel.svg') }}"/>
<span class="d-none d-md-inline">Quitter</span>
</a>
{% endif %}
</div>
{% endif %}
<div class="menu-last">
{% if is_granted('ROLE_INCOMPLETE_USER') and not (currentPath starts with '/express/') and not (currentPath starts with '/login')%}
{% if currentPath is same as '/user/' %}
{# <a class="nav-link minimize_sidebar d-lg-none"> #}
{# <i class="far fa-bars "></i> #}
{# </a> #}
<a class="nav-link d-lg-none" href="{{ path('logout') }}" title="Déconnexion"> <i
class="fas fa-sign-out-alt"></i>
</a>
{% else %}
<a class="nav-link d-lg-none" href="{{ path('user_home', {sidebar: 'expanded'}) }}">
<i class="far fa-bars "></i>
</a>
{% endif %}
{% else %}
{% if not (currentPath starts with '/express/') and not (currentPath starts with '/login') %}
{# {% if is_granted('ROLE_INCOMPLETE_USER') %} #}
{# <a class="nav-link" href="{{path('user_home', {sidebar: 'expanded'})}}"> #}
{# <a class="nav-link minimize_sidebar d-lg-none" href="{{path('user_home', {sidebar: 'expanded'})}}"> #}
<a class="nav-link d-lg-none" href="{{ path('user_home', {sidebar: 'expanded'}) }}"> <i
class="far fa-bars "></i>
</a>
{# {% endif %} #}
{% else %}
{% if breadcrumbExpress is defined or breadcrumbComplaintExpress is defined %}
{% if app.request.get('_route') not in ['login', 'login_register', 'express_complaint_register'] %}
<div class="progress mx-auto ms-3"
data-value="{% if progressValue is defined %}{{ progressValue }}{% endif %}">
<span class="progress-left">
<span class="progress-bar border-primary"></span>
</span>
<span class="progress-right">
<span class="progress-bar border-primary"></span>
</span>
<div class="progress-value w-100 h-100 rounded-circle d-flex align-items-center justify-content-center">
<div class="h2 font-weight-bold">
{% if progressValue is defined %}
{{ progressValue }}
{% endif %}%
</div>
</div>
</div>
{% endif %}
{% endif %}
{% endif %}
{% endif %}
</div>
</div>
</div>
{# Desktop RIGHT Menu Espace Personnel #}
{# Desktop RIGHT Déconnexion button #}
{# -> excluded on Express process #}
</nav>
{% endif %}
{% if not is_granted('ROLE_INCOMPLETE_USER') or (currentPath starts with '/express/') or (currentPath starts with '/login')%}
<div class="container ">
<div class="container-fluid">
<div class="complaint_title text-center {{ currentPath starts with '/express/' ? 'd-flex justify-content-center' : '' }}">
{% if breadcrumbComplaintExpress is not defined or app.request.get('_route') in ['express_complaint_x_params', 'express_complaint_x_steal_breaking', 'express_complaint_x_resident_type'] %}
<img src="{{ asset('assets/img/svg/pencil.svg') }}"/>
Porter plainte
{% else %}
{{ app.request.session.get('expressComplaintCategoryName', 'Porter plainte') }}
{% endif %}
</div>
</div>
</div>
{% endif %}
{% include "Commons/modalComplaintPause.html.twig" %}
<script>
const lastItemMenu = document.querySelector('.menu-last');
if (lastItemMenu && lastItemMenu.innerHTML.trim() === '') {
lastItemMenu.parentElement.removeChild(lastItemMenu);
}
</script>