templates/admin.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block stylesheets %}
  3.     <link href="{{ asset('https://fonts.googleapis.com/css?family=Quicksand:400,500,600,700&display=swap') }}" rel="stylesheet">
  4.     
  5.     {{ encore_entry_link_tags('app') }} 
  6. {% endblock %}
  7. {% block javascripts %}     
  8.     {{ encore_entry_script_tags('app') }}
  9. {% endblock %}
  10. {% block body_class %}sidebar-noneoverflow{% endblock %}
  11. {% block body %}
  12.     {% set flashes = [] %}
  13.     {% for type, messages in app.session.flashbag.all() %}
  14.         {% for key, message in messages %}
  15.             {% set flashes = flashes|merge([{
  16.                 'type': type,
  17.                 'message': message
  18.             }]) %}
  19.         {% endfor %}
  20.     {% endfor %}
  21.     
  22.     <div id="flashes" data-flashes="{{ flashes|json_encode|e('html_attr') }}"></div>
  23.     
  24.     <!--  BEGIN NAVBAR  -->
  25.     <div class="header-container">
  26.         <header class="header navbar navbar-expand-sm">
  27.             <a href="javascript:void(0);" class="sidebarCollapse" data-placement="bottom"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg></a>
  28.             <div class="nav-logo align-self-center">
  29.                 <a class="navbar-brand" href="{{ path('admin_index') }}"><img alt="logo" src="{{ asset('build/images/brand_logo.png') }}"> <span class="navbar-brand-name">ESC'Appart</span></a>
  30.             </div>
  31.             <ul class="navbar-item flex-row mr-auto">
  32.                 <li class="nav-item align-self-center search-animated">
  33.                     <form class="form-inline search-full form-inline search" role="search" {{ stimulus_controller('search', { 'searchUrl' : path('admin_search'), 'showBookingUrl' : path('admin_booking_show', { 'id' : 'ID' } ) }) }}>
  34.                         <div class="search-bar">
  35.                             <input type="text" class="form-control search-form-control  ml-lg-auto" placeholder="Search..." {{ stimulus_target('search', 'searchInput') }}>
  36.                         </div>
  37.                     </form>
  38.                     <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-search toggle-search"><circle cx="11" cy="11" r="8"></circle><line x1="21" y1="21" x2="16.65" y2="16.65"></line></svg>
  39.                 </li>
  40.             </ul>
  41.             <ul class="navbar-item flex-row nav-dropdowns ml-auto">
  42.                 
  43.                 {{ render(path('admin_block_nights')) }}    
  44.                 
  45.                 <li class="nav-item dropdown user-profile-dropdown order-lg-0 order-1">
  46.                     <a href="javascript:void(0);" class="nav-link dropdown-toggle user" id="user-profile-dropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
  47.                         <div class="media">
  48.                             <div class="media-body align-self-center">
  49.                                 <h6>{{ app.user.firstname }} {{ app.user.lastname }}</h6>
  50.                                 <p>
  51.                                     {% for role in app.user.roles %}
  52.                                         {% if role == 'ROLE_ADMIN' %}
  53.                                             Manager
  54.                                         {% elseif role == 'ROLE_USER' %}
  55.                                             Utilisateur
  56.                                         {% endif %}
  57.                                     {% endfor %}
  58.                                 </p>
  59.                             </div>
  60.                             <img src="{{ asset('build/images/user_profile.png') }}" class="img-fluid" alt="admin-profile">
  61.                             <span class="badge badge-success"></span>
  62.                         </div>
  63.                     </a>
  64.                     <div class="dropdown-menu position-absolute" aria-labelledby="userProfileDropdown">
  65.                         <div class="dropdown-item">
  66.                             <a href="{{ path('admin_profile_index') }}">
  67.                                 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user"><path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path><circle cx="12" cy="7" r="4"></circle></svg> 
  68.                                 <span> Profil</span>
  69.                             </a>
  70.                         </div>
  71.                         <div class="dropdown-item">
  72.                             <a href="{{ path('admin_terms_conditions') }}">
  73.                                 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-inbox"><polyline points="22 12 16 12 14 15 10 15 8 12 2 12"></polyline><path d="M5.45 5.11L2 12v6a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2v-6l-3.45-6.89A2 2 0 0 0 16.76 4H7.24a2 2 0 0 0-1.79 1.11z"></path></svg> 
  74.                                 <span> Conditions générales</span>
  75.                             </a>
  76.                         </div>
  77.                         <div class="dropdown-item">
  78.                             <a href="{{ path('admin_security_logout') }}">
  79.                                 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-log-out"><path d="M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"></path><polyline points="16 17 21 12 16 7"></polyline><line x1="21" y1="12" x2="9" y2="12"></line></svg> 
  80.                                 <span>Se déconnecter</span>
  81.                             </a>
  82.                         </div>
  83.                     </div>
  84.                 </li>
  85.             </ul>
  86.         </header>
  87.     </div>
  88.     <!--  END NAVBAR  -->
  89.     <!--  BEGIN MAIN CONTAINER  -->
  90.     <div class="main-container" id="container">
  91.         <div class="overlay"></div>
  92.         <div class="search-overlay"></div>
  93.         <!--  BEGIN TOPBAR  -->
  94.         <div class="topbar-nav header navbar" role="banner">
  95.             <nav id="topbar">
  96.                 <ul class="navbar-nav theme-brand flex-row  text-center">
  97.                     <li class="nav-item theme-logo">
  98.                         <a href="{{ path('admin_index') }}">
  99.                             <img src="{{ asset('build/images/brand_logo.png') }}" class="navbar-logo" alt="logo">
  100.                         </a>
  101.                     </li>
  102.                     <li class="nav-item theme-text">
  103.                         <a href="{{ path('admin_index') }}" class="nav-link"> ESC'Appart </a>
  104.                     </li>
  105.                 </ul>
  106.                 <ul class="list-unstyled menu-categories" id="topAccordion" >
  107.                     <li class="menu single-menu {% if 'admin_index' in app.request.attributes.get('_route') %}active{% endif %}">
  108.                         <a href="{{ path('admin_index') }}" >
  109.                             <div class="">
  110.                                 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-navigation-2"><polygon points="12 2 19 21 12 17 5 21 12 2"/></svg>
  111.                                 <span>Aujourd'hui</span>
  112.                             </div>
  113.                         </a>
  114.                     </li> 
  115.                             
  116.                     <li class="menu single-menu {% if 'admin_calendar_index' in app.request.attributes.get('_route') %}active{% endif %}">
  117.                         <a href="{{ path('admin_calendar_index') }}" >
  118.                             <div class="">
  119.                                 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-calendar"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>
  120.                                 <span>Calendrier</span>
  121.                             </div>
  122.                         </a>
  123.                     </li> 
  124.                             
  125.                     {% if is_granted('ROLE_ADMIN') %}
  126.                         <li class="menu single-menu {% if 'admin_accounting' in app.request.attributes.get('_route') %}active{% endif %}">
  127.                             <a href="{{ path('admin_accounting_overview') }}" >
  128.                                 <div class="">
  129.                                     <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-hash"><line x1="4" y1="9" x2="20" y2="9"/><line x1="4" y1="15" x2="20" y2="15"/><line x1="10" y1="3" x2="8" y2="21"/><line x1="16" y1="3" x2="14" y2="21"/></svg>
  130.                                     <span>Comptabilité</span>
  131.                                 </div>
  132.                             </a>
  133.                         </li> 
  134.                                 
  135.                         <li class="menu single-menu {% if 'admin_seasonal_finance' in app.request.attributes.get('_route') %}active{% endif %}">
  136.                             <a href="{{ path('admin_seasonal_finance_overview') }}" >
  137.                                 <div class="">
  138.                                     <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-dollar-sign"><line x1="12" y1="1" x2="12" y2="23"/><path d="M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6"/></svg>
  139.                                     <span>Finances saisonnières</span>
  140.                                 </div>
  141.                             </a>
  142.                         </li> 
  143.                     {% endif %}
  144.                             
  145.                     {{ render(controller('App\\Controller\\DefaultController::hotelMenu', { 'route' : app.request.attributes.get('_route') })) }}
  146.                     
  147.                     {% if is_granted('ROLE_ADMIN') %}
  148.                         <li class="menu single-menu" data-controller="admin">
  149.                             <a href="#setting" data-toggle="collapse" aria-expanded="true" class="dropdown-toggle">
  150.                                 <div class="">
  151.                                     <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-settings"><circle cx="12" cy="12" r="3"/><path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"/></svg>
  152.                                     <span>Paramètres</span>
  153.                                 </div>
  154.                                 <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-chevron-down"><polyline points="6 9 12 15 18 9"></polyline></svg>
  155.                             </a>
  156.                             <ul class="submenu list-unstyled collapse" id="setting" data-parent="#topAccordion" style="">
  157.                                 <li {% if 'admin_setting_user' in app.request.attributes.get('_route') %}class='active'{% endif %}>
  158.                                     <a href="{{ path('admin_setting_user_list') }}"> Utilisateurs </a>
  159.                                 </li>
  160.                                 <li {% if 'admin_setting_zone' in app.request.attributes.get('_route') %}class='active'{% endif %}>
  161.                                     <a href="{{ path('admin_setting_zone_list') }}"> Zones </a>
  162.                                 </li>
  163.                                 <li {% if 'admin_setting_transaction' in app.request.attributes.get('_route') %}class='active'{% endif %}>
  164.                                     <a href="{{ path('admin_setting_transaction_list') }}"> Tarifs de transactions </a>
  165.                                 </li>
  166.                                 <li {% if 'admin_setting_referer' in app.request.attributes.get('_route') %}class='active'{% endif %}>
  167.                                     <a href="{{ path('admin_setting_referer_list') }}"> OTA's </a>
  168.                                 </li>
  169.                                 <li {% if 'admin_setting_billing' in app.request.attributes.get('_route') %}class='active'{% endif %}>
  170.                                     <a href="{{ path('admin_setting_billing_list_invoice') }}"> Facturation </a>
  171.                                 </li>
  172.                             </ul>
  173.                         </li>
  174.                     {% endif %}
  175.                 </ul>
  176.             </nav>
  177.         </div>
  178.         <!--  END TOPBAR  -->
  179.         
  180.         <!--  BEGIN CONTENT AREA  -->
  181.         <div id="content" class="main-content" {% block controller %}{% endblock %}>
  182.             <div class="layout-px-spacing">
  183.                 
  184.                 {% block page_header %}{% endblock %}  
  185.                 
  186.                 <!-- CONTENT AREA -->
  187.                 
  188.                 {% block content %}{% endblock content %}
  189.                 <!-- CONTENT AREA -->
  190.             </div>
  191.             <div class="footer-wrapper">
  192.                 <div class="footer-section f-section-1">
  193.                     <p class="">Copyright © 2021 <a target="_blank" href="https://designreset.com">DesignReset</a>, All rights reserved.</p>
  194.                 </div>
  195.                 <div class="footer-section f-section-2">
  196.                     <p class="">Coded with <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-heart"><path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path></svg></p>
  197.                 </div>
  198.             </div>
  199.         </div>
  200.         <!--  END CONTENT AREA  -->
  201.         
  202.         <!-- calendar modal -->
  203.         <div class="modal fade" id="modal-block-nights" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
  204.             <div class="modal-dialog" role="document">
  205.                 {{ render(path('admin_block_nights_modal')) }}
  206.             </div>
  207.         </div>
  208.     </div>
  209.     <!-- END MAIN CONTAINER -->
  210. {% endblock %}