vendor/uvdesk/support-center-bundle/Resources/views/Templates/header.html.twig line 1

Open in your IDE?
  1. {% set currentUser = app.user ? user_service.getCustomerPartialDetailById(app.user.id) : null %}
  2. <!--Header-->
  3. <style>
  4.     .uv-dropdown-list  {
  5.         text-align: left;
  6.     }
  7.     .uv-dropdown-list ul li {
  8.         width: 100%;
  9.     }
  10.     .uv-header .uv-header-rt .uv-dropdown-list ul li a {
  11.         color: #333;
  12.         font-size: 16px;
  13.         padding: 0;
  14.     }
  15.     .uv-header .uv-header-rt .uv-dropdown-list ul li a:hover {
  16.         color: #2750C4;
  17.         text-decoration: none;
  18.     }
  19.     .uv-profile-block .uv-bottom-right{
  20.         top: auto !important;
  21.     }
  22.     .uv-rtl header .uv-header-rt > span {
  23.         display: block;
  24.     }
  25.     .uv-rtl header .uv-header-rt > span > .uv-dropdown-list {
  26.         right: unset;
  27.         left: 0px;
  28.         top: 70px;
  29.         text-align: right;
  30.     }
  31.     {% if websiteConfiguration is defined and websiteConfiguration.bannerBackgroundColor %}
  32.         .uv-hero {
  33.             background-color: {{websiteConfiguration.bannerBackgroundColor}};
  34.         }
  35.         .uv-header .uv-header-rt .uv-hamburger svg path {
  36.             fill: {{ websiteConfiguration.bannerBackgroundColor }};
  37.         }
  38.         .uv-skin-dark .uv-hero {
  39.             background-color: {{websiteConfiguration.bannerBackgroundColor}};
  40.         }
  41.     {% endif %}
  42.     {% if websiteConfiguration is defined and websiteConfiguration.linkColor is defined %}
  43.         a:not(.uv-btn):not(.uv-btn-small):not(.uv-btn-social):not(.uv-table):not(.not-shiny) {
  44.             color: {{ websiteConfiguration.linkColor }} !important;
  45.         }
  46.     {% endif %}
  47.     {% if websiteConfiguration is defined and websiteConfiguration.linkHoverColor is defined %}
  48.         a:not(.uv-btn):not(.uv-btn-small):not(.uv-btn-social):not(.uv-table):not(.not-shiny):hover {
  49.             color: {{ websiteConfiguration.linkHoverColor }} !important;
  50.         }
  51.     {% endif %}
  52.     {% if websiteConfiguration is defined and websiteConfiguration.articleTextColor is defined %}
  53.         .uv-paper-article .uv-paper-section > section > p {
  54.             color: {{ websiteConfiguration.articleTextColor }} !important;
  55.         }
  56.         .uv-paper-article .uv-paper-section > section > ul {
  57.             color: {{ websiteConfiguration.articleTextColor }} !important;
  58.         }
  59.     {% endif %}
  60.     .goog-te-gadget-simple .goog-te-menu-value, .goog-te-gadget-simple .goog-te-menu-value:hover {
  61.         color: #333!important;
  62.     }
  63. </style>
  64. <div class="uv-header">
  65.     
  66.         <header>
  67.              <div class="uv-container">
  68.             
  69.             <div class="uv-header-lt">
  70.                 <a class="uv-logo" href="{{path('helpdesk_knowledgebase_folder')}}">
  71.                     {% if websiteConfiguration is defined and websiteConfiguration.website.logo is not empty %}
  72.                         <img src="{{ app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') }}{{ websiteConfiguration.website.logo }}" alt="{{ websiteConfiguration.website.name}}" />
  73.                     {% else %}
  74.                         <svg xmlns="http://www.w3.org/2000/svg" width="122" height="48" viewBox="0 0 122 48">
  75.                             <defs>
  76.                                 <style>
  77.                                 .cls-1 {
  78.                                     fill: #9f9f9f;
  79.                                     fill-rule: evenodd;
  80.                                     }
  81.                                 </style>
  82.                             </defs>
  83.                             <path id="uvdesk-icon" class="cls-1" d="M43.5,23A1.5,1.5,0,0,1,45,24.5V25H42V24.5A1.5,1.5,0,0,1,43.5,23ZM39,31H38V18h1a2.257,2.257,0,0,1,2,2v9A2.257,2.257,0,0,1,39,31Zm6-5H42s1.769,15.329-15,17c0.011-.1-0.027,1.292,0,2C33.324,44.708,45.563,40.575,45,26ZM25.987,44A1.988,1.988,0,1,1,24,41.989,2,2,0,0,1,25.987,44ZM8,41A18.173,18.173,0,0,1,3.386,29.28L3,24a14.906,14.906,0,0,0,9-5,14.838,14.838,0,0,0,5,4,17.2,17.2,0,0,0,16-1l4-3a2.479,2.479,0,0,0,0-1C36.692,8.308,27.872,0,18,0h0A17.913,17.913,0,0,0,0,18V29A21.17,21.17,0,0,0,5,43a16.677,16.677,0,0,0,7,5l1-3C10.936,44.167,9.633,42.824,8,41Zm2.492-15A3.5,3.5,0,1,0,14,29.5,3.5,3.5,0,0,0,10.492,26ZM27.5,33A3.5,3.5,0,1,0,24,29.5,3.5,3.5,0,0,0,27.5,33Z"/>
  84.                             <path id="uvdesk" class="cls-1" d="M53.078,25.329c0,2.976,1.1,4.56,3.576,4.56a4.931,4.931,0,0,0,3.84-2.112h0.072L60.734,29.6h1.632V17.937H60.4v8.281c-1.1,1.368-1.944,1.968-3.144,1.968-1.536,0-2.184-.936-2.184-3.12V17.937H53.078v7.393ZM68.822,29.6h2.3l4.128-11.665H73.31L71.1,24.561c-0.336,1.152-.72,2.328-1.056,3.432h-0.1c-0.36-1.1-.744-2.28-1.08-3.432l-2.208-6.625h-2.04Zm7.752-5.809c0,3.888,1.9,6.1,4.824,6.1a5.262,5.262,0,0,0,3.528-1.656H85L85.166,29.6H86.8V12.512H84.806V17l0.1,1.992a4.806,4.806,0,0,0-3.264-1.344C78.973,17.649,76.573,20,76.573,23.793Zm2.04-.024c0-2.664,1.488-4.464,3.36-4.464a4.06,4.06,0,0,1,2.832,1.224v6.1a3.948,3.948,0,0,1-2.976,1.608C79.789,28.233,78.613,26.553,78.613,23.769Zm11.256,0.024c0,3.816,2.472,6.1,5.593,6.1a6.947,6.947,0,0,0,3.84-1.2l-0.7-1.3a5.271,5.271,0,0,1-2.9.912c-2.232,0-3.744-1.584-3.888-4.1h7.873a6.956,6.956,0,0,0,.072-1.08c0-3.336-1.68-5.472-4.656-5.472C92.437,17.649,89.869,19.977,89.869,23.793Zm1.92-.888c0.24-2.352,1.728-3.7,3.36-3.7,1.824,0,2.88,1.32,2.88,3.7H91.789Zm9.552,5.376a7.021,7.021,0,0,0,4.344,1.608c2.76,0,4.272-1.584,4.272-3.48,0-2.208-1.872-2.9-3.552-3.528-1.32-.5-2.592-0.936-2.592-2.016,0-.888.672-1.68,2.136-1.68a4.331,4.331,0,0,1,2.664,1.032l0.936-1.248a5.822,5.822,0,0,0-3.624-1.32c-2.52,0-4.008,1.44-4.008,3.312,0,1.968,1.824,2.76,3.48,3.36,1.272,0.48,2.664,1.008,2.664,2.208,0,1.008-.768,1.824-2.3,1.824a5.245,5.245,0,0,1-3.432-1.392Zm11.352,1.32h1.944V26.529l2.184-2.544,3.408,5.617h2.16l-4.44-6.985,3.912-4.68h-2.184l-4.968,6.145h-0.072V12.512h-1.944V29.6Z"/>
  85.                         </svg>
  86.                     {% endif %}
  87.                 </a>
  88.                 
  89.             </div>
  90.                 
  91.             <div class="uv-header-rt">
  92.                 
  93.                 {% if currentUser %}
  94.                     <span style="position: relative" class="uv-profile-block">
  95.                         <div class="uv-profile-wrapper uv-dropdown-other" >
  96.                             <div class="uv-profile-avatar">
  97.                                 <img src="{{ currentUser.smallThumbnail ?  app.request.scheme ~'://' ~ app.request.httpHost ~ asset('') ~ currentUser.smallThumbnail : asset(default_customer_image_path) }}">                       
  98.                             </div>
  99.                             <div class="uv-profile-howdy">
  100.                                 <span>{{ 'Howdy!'|trans }}</span>
  101.                                 <span class="uv-username">{{ currentUser.firstName }}</span>
  102.                             </div>
  103.                             <div class="uv-drop-icon"></div>
  104.                         </div>
  105.                         <div class="uv-dropdown-list uv-bottom-right uv-text-left">
  106.                             <div class="uv-dropdown-container">
  107.                                 <label>{{ 'Account'|trans }}</label>
  108.                                 <ul>
  109.                                     <li>
  110.                                         <a href="{{ path('helpdesk_customer_ticket_collection') }}">{{ 'Tickets'|trans }}</a>
  111.                                     </li>
  112.                                     {% if websiteConfiguration.ticketCreateOption == 1 %}
  113.                                         <li>
  114.                                             <a href="{{ path('helpdesk_customer_create_ticket') }}">{{ 'New Ticket Request'|trans }}</a>
  115.                                         </li>
  116.                                     {% endif %}
  117.                                     <li>
  118.                                         <a href="{{ path('helpdesk_customer_account') }}">{{ 'Profile'|trans }}</a>
  119.                                     </li>
  120.                                     <li>
  121.                                         <a class="uv-text-danger" href="{{ path('helpdesk_customer_logout') }}">{{ 'Sign Out'|trans }}</a>
  122.                                     </li>
  123.                                 </ul>
  124.                             </div>
  125.                         </div>
  126.                     </span>
  127.                 {% else %}
  128.                     <nav id="front_nav">
  129.                         <ul>
  130.                             <li><select id='lan' onchange="changeLan()" class="uv-btn-small" >
  131.                                         <option value="es">Español</option>
  132.                                         <option value="en">English</option>
  133.                                         <option value="pt">Português</option>
  134.                                         <option value="it">Italiano</option>
  135.                                         <option value="fr">Français</option>
  136.                                     </select></li>
  137.                             <!--<li><a href="{{path('helpdesk_knowledgebase_folder')}}">{{"Home"|trans}}</a></li>-->
  138.                             {% for headerLink in websiteConfiguration.headerLinks %}
  139.                                 <li><a href="{{headerLink.url}}" target="_blank">{{headerLink.label}}</a></li>
  140.                             {% endfor %}
  141.                             <!--
  142.                             {% if websiteConfiguration is defined and websiteConfiguration.ticketCreateOption %}
  143.                                 {% if not websiteConfiguration.loginRequiredToCreate or app.user %}
  144.                                     <li><a href="{{path('helpdesk_customer_create_ticket')}}" class="uv-btn-small">{% trans %}Contact Us{% endtrans %}</a></li>
  145.                                 {% endif %}
  146.                             {% endif %}
  147.                             {% if websiteConfiguration is defined and websiteConfiguration.removeCustomerLoginButton is defined %}
  148.                                 {% if not websiteConfiguration.removeCustomerLoginButton %}
  149.                                     <li><a href="{{path('helpdesk_customer_login')}}" class="uv-btn-small">{% trans %}Sign In{% endtrans %}</a></li>
  150.                                 
  151.                                      
  152.                                 {% endif %}  
  153.                             {% endif %}
  154.                         -->
  155.                         </ul>
  156.                         
  157.                     </nav>
  158.                     <div class="uv-hamburger">
  159.                         <svg
  160.                         xmlns="http://www.w3.org/2000/svg"
  161.                         xmlns:xlink="http://www.w3.org/1999/xlink"
  162.                         width="20px" height="15px">
  163.                         <path fill-rule="evenodd"
  164.                         d="M18.500,9.000 L1.500,9.000 C0.672,9.000 0.000,8.328 0.000,7.500 C0.000,6.672 0.672,6.000 1.500,6.000 L18.500,6.000 C19.328,6.000 20.000,6.672 20.000,7.500 C20.000,8.328 19.328,9.000 18.500,9.000 ZM18.500,3.000 L1.500,3.000 C0.672,3.000 0.000,2.328 0.000,1.500 C0.000,0.672 0.672,-0.000 1.500,-0.000 L18.500,-0.000 C19.328,-0.000 20.000,0.672 20.000,1.500 C20.000,2.328 19.328,3.000 18.500,3.000 ZM1.500,12.000 L18.500,12.000 C19.328,12.000 20.000,12.672 20.000,13.500 C20.000,14.328 19.328,15.000 18.500,15.000 L1.500,15.000 C0.672,15.000 0.000,14.328 0.000,13.500 C0.000,12.672 0.672,12.000 1.500,12.000 Z"/>
  165.                         </svg>
  166.                     </div>
  167.                 {% endif %}
  168.                 
  169.                
  170.             </div>
  171.         </header>
  172.     </div>
  173.       {% if currentUser %}
  174.     <div style="
  175.     width: 100%;text-align-last: center;
  176.     ">
  177.         <select id='lan' onchange="changeLan()" class="uv-btn-small" >
  178.             <option value="es">Español</option>
  179.             <option value="en">English</option>
  180.             <option value="pt">Português</option>
  181.             <option value="it">Italiano</option>
  182.             <option value="fr">Français</option>
  183.         </select>
  184.         
  185.     </div>
  186.      {% endif %}
  187. </div> 
  188.                 
  189. <!--//Header-->
  190. {% if searchDisable is defined and searchDisable == false %}
  191.     <form method="get" action="{{path('helpdesk_knowledgebase_search')}}">
  192.         <!--Hero-->
  193.         <div class="uv-hero">
  194.             <div class="uv-container">
  195.            
  196.                 <article>
  197.                     <h1>
  198.                         {{ 'siteDescription'|trans }}
  199.                         <!--
  200.                         {% if websiteConfiguration is defined and websiteConfiguration.siteDescription is defined %}
  201.                             {{ websiteConfiguration.siteDescription }}
  202.                         {% else %}
  203.                             {% trans %}Hi! how can we help?{% endtrans %}
  204.                         {% endif %}
  205.                         -->
  206.                     </h1>
  207.                     <input type="text" name="s" class="uv-kb-search-lg" placeholder="{{"Enter search keyword"|trans}}">
  208.                     <br>
  209.                     <div id='links-navigations' >
  210.                         
  211.                     </div>
  212.                     
  213.                      {% if currentUser is defined and currentUser is not null %}
  214.                     <div id="bot-iframe-container" style="margin-top: 20px; width: 100%;">
  215.                         <iframe 
  216.                             id="knowledge-bot-iframe" 
  217.                             src="https://ia.softguard.com/frontend-softguard?user={{ currentUser.email }}&lang={{ app.request.locale|upper }}" 
  218.                             style="width: 100%; height: 450px; border: none; border-radius: 8px; box-shadow: 0 4px 8px rgba(0,0,0,0.1);">
  219.                         </iframe>
  220.                     </div>
  221.                     {% endif %}
  222.                     
  223.                      <br></br>
  224.              <div class="uv-paper-article" style="border-top: solid 1px #D3D3D3 !important;">
  225.                         <div class="uv-paper-section">
  226.                             <section>
  227.                                 <h2 class="uv-folder-title" style="color:white !important;text-transform:uppercase !important;">{{ 'News' | trans }}</h2>
  228.                             </section>
  229.                             <section class="uv-margin-top-30">
  230.                                 {% if articles %}
  231.                                     <ul style="text-align:left; color:white !important; list-style-type:decimal;">
  232.                                         {% for article in articles %}
  233.                                             {# <li> {% if article.stared %}<span class="uv-icon-star uv-pre"></span>{% endif %} <a href="{{path('helpdesk_knowledgebase_read_article', {'article': article.id})}}">{{article.name}}</a></li> #}
  234.                                             <li> {% if article.stared %}
  235.                                                     <span class="uv-icon-star uv-pre"></span>
  236.                                                 {% endif %}
  237.                                                 <a href="{{path('helpdesk_knowledgebase_read_slug_article', {'slug': article.slug})}}">
  238.                                                     <p style="color:white"> {{ article.name }} </p>
  239.                                                 </a>
  240.                                             </li>
  241.                                         {% endfor %}
  242.                                     </ul>
  243.                                 {% else %}
  244.                                     <p>{{"No Article Found!"|trans}}</p>
  245.                                 {% endif %}
  246.                             </section>
  247.                         </div>
  248.                     </div>
  249.                 </article>
  250.             </div>
  251.         </div>
  252.         <!--Hero-->
  253.     </form> 
  254. {% endif %}
  255.  <script type="text/javascript">
  256.  $(document).ready(function() {
  257.     var url=location.href;
  258.     var text=url.split("public/");
  259.     var text_aux=text[1];
  260.     var lan=text_aux.substring(0,2)
  261.     $("#lan option[value='"+lan+"']").attr("selected", true);
  262.     $("div#links-navigations").html("<br><a  style='color: white !important;font-size: 26px;' href='"+text[0]+"public/"+lan+"/customer/tickets'>{{ 'Tickets'|trans }}</a> &nbsp;&nbsp; <font style='color: white !important;font-size: 26px;'>|</font> &nbsp;&nbsp; <a  style='color: white !important;font-size: 26px;' href='"+text[0]+"public/"+lan+"/customer/create-ticket/'>{{ 'New Ticket Request'|trans }}</a>")
  263.     $('#lan').change(function() {
  264.         if ($("#knowledge-bot-iframe").length) {
  265.             var iframe = document.getElementById('knowledge-bot-iframe');
  266.             var srcParts = iframe.src.split('/lang=');
  267.             if (srcParts.length > 1) {
  268.                 iframe.src = srcParts[0] + '/lang=' + $(this).val().toUpperCase();
  269.             }
  270.         }
  271.     });
  272. })
  273. function changeLan(){
  274.     var lan=$('#lan').val()
  275.     var url=location.href;
  276.     var text=url.split("public/");
  277.     var text_aux=text[1];
  278.     var url_aux=text_aux.substring(2,text_aux.length)
  279.     var url_final= text[0]+"public/"+lan+url_aux;
  280.     $("#lan option[value='"+lan+"']").attr("selected", true);
  281.     
  282.     location.href=url_final;
  283.     
  284. }
  285.  </script>