templates/common/header.html.twig line 1

Open in your IDE?
  1. {% import 'macro/user.html.twig' as user_macro %}
  2. <header id="header-container" class="fullwidth {{ isTransparent ? 'transparent-header' : 'dashboard-header' }}">
  3.     <!-- Header -->
  4.     <div id="header">
  5.         <div class="container">
  6.             <!-- Left Side Content -->
  7.             <div class="left-side">
  8.                 <!-- Logo -->
  9.                 <div id="logo">
  10.                     <a href="{{ path('homepage') }}" class="">
  11.                         <img src="{{ asset('images/logo.png') }}" class="img-fluid" style="width: 92%"
  12.                              title="Freelance Dispo est un site avec des milliers de missions IT moyenne et longue durée pour les freelances."
  13.                              alt="Freelance Dispo est un site avec des milliers de missions IT moyenne et longue durée pour les freelances.">
  14.                     </a>
  15.                 </div>
  16.                 <nav id="navigation">
  17.                     <ul id="responsive">
  18.                         {% set _testFindJob = true %}
  19.                         {% if app.user %}
  20.                             {% if not app.user.isFreelance %}
  21.                                 {% set _testFindJob = false %}
  22.                             {% endif %}
  23.                         {% endif %}
  24.                         {% if _testFindJob %}
  25.                             <li class="">
  26.                                 <a class="animating-link menu-find-a-job {{ not is_granted('ROLE_ADMIN') and is_granted('ROLE_FREELANCE') and app.user.uniqueProfile.id == null ? 'popup-with-zoom-anim' : '' }}"
  27.                                    href="{{ not is_granted('ROLE_ADMIN') and is_granted('ROLE_FREELANCE') and app.user.uniqueProfile.id == null ? '#complete-cv-dialog' : path('mission_search', {'url_libelle' : "search"}) }}"
  28.                                 >
  29.                                     Find a job
  30.                                 </a>
  31.                             </li>
  32.                         {% endif %}
  33.                         {% if app.user.isSociety|default(false) %}
  34.                             <li>
  35.                                 <a class="animating-link button" href="{{ path('offer_new') }}"
  36.                                    style="padding: 6px; border-radius: 2rem; color: white !important;"
  37.                                 >
  38.                                     Post a job
  39.                                 </a>
  40.                             </li>
  41.                         {% endif %}
  42.                         {#{% if not app.user.isFreelance|default(false) %}
  43.                             <li><a class="animating-link" href="{{ path('freelance_search') }}">Trouver un freelance</a>
  44.                             </li>
  45.                         {% endif %}#}
  46.                         {% if not app.user.isSociety|default(false) %}
  47.                             <li>
  48.                                 <a class="animating-link" style="padding: 4px 15px 4px 15px !important;"
  49.                                    href="#">
  50.                                     Forum
  51.                                 </a>
  52.                                 <ul class="dropdown-nav">
  53.                                     <li><a href="{{ path('forum_public_country', {'country' : 'uae'}) }}">All topics</a>
  54.                                     </li>
  55.                                     <li><a href="{{ path('app_forum_forum_post_favorite_index') }}">Favorite topics</a>
  56.                                     </li>
  57.                                     <li><a href="{{ path('app_forum_recent', {'countryMin' : "uae"}) }}">Recent
  58.                                             topics</a></li>
  59.                                     <li><a href="{{ path('app_forum_forum_post_subscribe') }}">Topics created or answered</a></li>
  60.                                 </ul>
  61.                             </li>
  62.                         {% endif %}
  63.                         {% if not app.user %}
  64.                             {#<li>
  65.                                 <a class="animating-link {{ not is_granted('ROLE_ADMIN') and is_granted('ROLE_FREELANCE') and app.user.uniqueProfile.id == null ? 'popup-with-zoom-anim' : '' }} "
  66.                                    href="{{ path('all_news') }}"
  67.                                 >
  68.                                     News
  69.                                 </a>
  70.                             </li>#}
  71.                             <li class="mobileshow">
  72.                                 <a class="animating-link "
  73.                                    href="{{ path('login') }}"
  74.                                 >
  75.                                     Login
  76.                                 </a>
  77.                             </li>
  78.                             <li class="mobileshow">
  79.                                 <a class="animating-link "
  80.                                    href="{{ path('register_freelance_mobile') }}"
  81.                                 >
  82.                                     Register 100% free
  83.                                 </a>
  84.                             </li>
  85.                             <li class="mobileshow">
  86.                                 <a class="animating-link "
  87.                                    href="{{ path('register_society') }}"
  88.                                 >
  89.                                     Employers
  90.                                 </a>
  91.                             </li>
  92.                         {% endif %}
  93.                     </ul>
  94.                 </nav>
  95.                 <div class="clearfix"></div>
  96.                 <!-- Main Navigation / End -->
  97.             </div>
  98.             <!-- Left Side Content / End -->
  99.             <!-- Right Side Content / End -->
  100.             <div class="right-side">
  101.                 {% if is_granted('ROLE_USER') %}
  102.                     {#{% if app.user.society %}
  103.                         <div class="header-widget hide-on-mobile" >
  104.                             <a href="#" class="log-in-button text-black">
  105.                                 Une question? <span class="text-blue">06 18 12 28 26</span>
  106.                             </a>
  107.                         </div>
  108.                     {% endif %}#}
  109.                     <!--  User Notifications -->
  110.                     <div class="header-widget hide-on-mobile">
  111.                         <!-- Notification -->
  112.                         <div class="header-notifications">
  113.                             <!-- Trigger -->
  114.                             <div class="header-notifications-trigger">
  115.                                 <a href="#"><i class="icon-feather-bell"></i>
  116.                                     <u id="g_notif_number">
  117.                                         {% set __unreedNotification = global_notification.unSeenNumber %}
  118.                                         {% if __unreedNotification > 0 %}
  119.                                             <span>{{ __unreedNotification }}</span>
  120.                                         {% endif %}
  121.                                     </u>
  122.                                 </a>
  123.                             </div>
  124.                             <!-- Dropdown -->
  125.                             <div class="header-notifications-dropdown">
  126.                                 <div class="header-notifications-headline">
  127.                                     <h4>Notifications</h4>
  128.                                     <button class="mark-as-read ripple-effect-dark" id="g_btn_notif_mark" data-tippy-placement="left"
  129.                                             data-tippy=""  title="Mark all as read">
  130.                                         <i class="icon-feather-check-square"></i>
  131.                                     </button>
  132.                                 </div>
  133.                                 <div class="header-notifications-content">
  134.                                     <div class="header-notifications-scroll" data-simplebar="init"
  135.                                          style="height: 270px;">
  136.                                         <div class="simplebar-track vertical" style="visibility: visible;">
  137.                                             <div class="simplebar-scrollbar"
  138.                                                  style="visibility: visible; top: 0px; height: 192px;"></div>
  139.                                         </div>
  140.                                         <div class="simplebar-track horizontal" style="visibility: visible;">
  141.                                             <div class="simplebar-scrollbar"
  142.                                                  style="visibility: visible; left: 0px; width: 25px;"></div>
  143.                                         </div>
  144.                                         <div class="simplebar-scroll-content"
  145.                                              style="padding-right: 17px; margin-bottom: -34px;">
  146.                                             <div class="simplebar-content"
  147.                                                  style="padding-bottom: 17px; margin-right: -17px;">
  148.                                                 <ul>
  149.                                                     {% set __notificaions = global_notification.userNotification %}
  150.                                                     {% if __notificaions|length <= 0 %}
  151.                                                         <li class="notifications">
  152.                                                             <a href="#">
  153.                                                                 <span class="notification-text">
  154.                                                                     <i>No new notification</i>
  155.                                                                 </span>
  156.                                                             </a>
  157.                                                         </li>
  158.                                                     {% else %}
  159.                                                         {% for __notif in __notificaions %}
  160.                                                             <li class="notifications"
  161.                                                                 {% if not __notif.seen %}
  162.                                                                     style="background-color: #00b28e0f"
  163.                                                                 {% endif %}
  164.                                                             >
  165.                                                                 <a href="{{ path('notification_click', {'id' : __notif.id}) }}">
  166.                                                                     <span class="notification-icon">
  167.                                                                         <i class="{{ __notif.icon }}"></i>
  168.                                                                     </span>
  169.                                                                     <span class="notification-text">
  170.                                                                         {{ __notif.content|raw }}
  171.                                                                     </span>
  172.                                                                 </a>
  173.                                                             </li>
  174.                                                         {% endfor %}
  175.                                                     {% endif %}
  176.                                                     <!-- Notification -->
  177.                                                 </ul>
  178.                                             </div>
  179.                                         </div>
  180.                                     </div>
  181.                                 </div>
  182.                             </div>
  183.                         </div>
  184.                     </div>
  185.                     <!--  User Notifications -->
  186.                     <div class="header-widget hide-on-mobile">
  187.                         <!-- Messages -->
  188.                         <div class="header-notifications">
  189.                             <div class="header-notifications-trigger">
  190.                                 <a href="#"><i class="icon-feather-mail"></i>
  191.                                     {% if messagerie.unreadCount > 0 %}
  192.                                         <span>{{ messagerie.unreadCount }}</span>
  193.                                     {% endif %}
  194.                                 </a>
  195.                             </div>
  196.                             <!-- Dropdown -->
  197.                             <div class="header-notifications-dropdown">
  198.                                 <div class="header-notifications-headline">
  199.                                     <h4>Messages</h4>
  200.                                     <button class="mark-as-read ripple-effect-dark" title="Mark all as read"
  201.                                             data-tippy-placement="left">
  202.                                         <i class="icon-feather-check-square"></i>
  203.                                     </button>
  204.                                 </div>
  205.                                 <div class="header-notifications-content">
  206.                                     <div class="header-notifications-scroll" data-simplebar>
  207.                                         <ul>
  208.                                             {% for notificationRoom in messagerie.latestMessage %}
  209.                                                 {% set notificationRoomUser = app.user.id == notificationRoom.caller.id ? notificationRoom.called : notificationRoom.caller %}
  210.                                                 <!-- Notification -->
  211.                                                 <li class="notifications-not-read">
  212.                                                     <a href="{{ path('message_room', {'id':notificationRoomUser.id}) }}">
  213.                                                         <span class="notification-avatar status-online">
  214.                                                             {{ user_macro.userPhoto(notificationRoomUser.photo) }}
  215.                                                         </span>
  216.                                                         <div class="notification-text">
  217.                                                             <strong>{{ notificationRoomUser.publicName }}</strong>
  218.                                                             <p class="notification-msg-text">{{ notificationRoom.lastMessage|u.truncate(20) }} ...</p>
  219.                                                             <span
  220.                                                                 class="color">{{ notificationRoom.lastUpdate|ago(locale='fr') }}</span>
  221.                                                         </div>
  222.                                                     </a>
  223.                                                 </li>
  224.                                             {% endfor %}
  225.                                         </ul>
  226.                                     </div>
  227.                                 </div>
  228.                                 <a href="{{ path('messages') }}"
  229.                                    class="header-notifications-button ripple-effect button-sliding-icon">
  230.                                     View all<i class="icon-material-outline-arrow-right-alt"></i>
  231.                                 </a>
  232.                             </div>
  233.                         </div>
  234.                     </div>
  235.                     <!--  User Notifications / End -->
  236.                     <!-- User Menu -->
  237.                     <div class="header-widget">
  238.                         <!-- Messages -->
  239.                         <div class="header-notifications user-menu">
  240.                             <div class="header-notifications-trigger">
  241.                                 <a href="#">
  242.                                     <div class="user-avatar status-online">
  243.                                         <img
  244.                                             src="{{ asset( app.user.getPhoto()  ? 'uploads/avatar/' ~ app.user.getPhoto(): 'images/user-avatar-placeholder.png') }}"
  245.                                             alt="{{ app.user.getFullName() }}">
  246.                                     </div>
  247.                                 </a>
  248.                             </div>
  249.                             <!-- Dropdown -->
  250.                             <div class="header-notifications-dropdown">
  251.                                 <!-- User Status -->
  252.                                 <div class="user-status">
  253.                                     <!-- User Name / Avatar -->
  254.                                     <div class="user-details">
  255.                                         <div class="user-avatar status-online">
  256.                                             <img
  257.                                                 src="{{ asset( app.user.getPhoto()  ? 'uploads/avatar/' ~ app.user.getPhoto(): 'images/user-avatar-placeholder.png') }}"
  258.                                                 alt="">
  259.                                         </div>
  260.                                         <div class="user-name">
  261.                                             {{ app.user.fullName() }}
  262.                                             <span>{{ app.user.isFreelance ? 'Happy to see you!' : app.user.isSociety ? 'Society' : 'Admin' }}</span>
  263.                                         </div>
  264.                                     </div>
  265.                                 </div>
  266.                                 <ul class="user-menu-small-nav">
  267.                                     <li>
  268.                                         <a href="{{ app.user.isAdmin ? path('admin_dashboard') : path('dashboard') }}">
  269.                                             <i class="icon-material-outline-dashboard"></i>
  270.                                             Dashboard
  271.                                         </a>
  272.                                     </li>
  273.                                     {% if(not app.user.isAdmin and not app.user.compteSociety) %}
  274.                                         <li>
  275.                                             <a href="{{ path('user_setting') }}">
  276.                                                 <i class="icon-material-outline-settings"></i>
  277.                                                 Setting
  278.                                             </a>
  279.                                         </li>
  280.                                     {% endif %}
  281.                                     <li>
  282.                                         <a href="{{ path('logout') }}">
  283.                                             <i class="icon-material-outline-power-settings-new"></i>
  284.                                             Logout
  285.                                         </a>
  286.                                     </li>
  287.                                 </ul>
  288.                             </div>
  289.                         </div>
  290.                     </div>
  291.                     <!-- User Menu / End -->
  292.                 {% else %}
  293.                     <div class="header-widget hide-on-mobile" >
  294.                         <span>
  295.                             <a href="{{ path('register_freelance') }}" class="log-in-button button "
  296.                                style="padding-left: 10px; padding-right: 10px; border-radius: 14px;"
  297.                             >
  298.                                 <i class="icon-feather-user-plus text-white"></i> <span class="text-white">Register 100% free</span>
  299.                             </a>
  300.                         </span>
  301.                     </div>
  302.                     <div class="header-widget hide-on-mobile" >
  303.                         <a href="{{ path('login') }}" class="log-in-button text-black">
  304.                             <i class="icon-feather-log-in"></i> <span class="">Login</span>
  305.                         </a>
  306.                     </div>
  307.                     <div class="header-widget hide-on-mobile" >
  308.                         <a href="{{ path('register_society') }}" class="log-in-button text-black">
  309.                             <i class="icon-material-outline-business"></i> <span class="">Employers</span>
  310.                         </a>
  311.                     </div>
  312.                 {% endif %}
  313.                 <!-- Mobile Navigation Button -->
  314.                 <span class="mmenu-trigger">
  315.                     <button class="hamburger hamburger--collapse" type="button">
  316.                         <span class="hamburger-box">
  317.                             <span class="hamburger-inner"></span>
  318.                         </span>
  319.                     </button>
  320.                 </span>
  321.             </div>
  322.             <!-- Right Side Content / End -->
  323.         </div>
  324.     </div>
  325.     <!-- Header / End -->
  326. </header>
  327. <div class="clearfix"></div>