templates/default/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}
  3.     {{projet.client.code}}
  4. {% endblock %}
  5. {% block stylesheets %}
  6.     <link rel="stylesheet" href="{{ asset('css/custom.css')}}">
  7.     <link rel="stylesheet" href="{{ asset('css/style.css')}}">
  8.     <link rel="stylesheet" href="{{ asset('css/owlcarousel/owl.carousel.min.css')}}">
  9.     <link rel="stylesheet" href="{{ asset('css/owlcarousel/owl.theme.default.min.css')}}">
  10.     <link rel="stylesheet" media="screen, print" href="{{ asset('youscribe/css/' ~ projet.themeCss) }}">
  11. {% endblock %}
  12. {% block menu %}
  13.     <div class="col-xl-12 zone-nav" style="text-align:center">
  14.         <a href="{{ path('default_index', {'idc': projet.client.id ,'id': projet.id , 'idUser': idUser}) }}" class="{{title == 'home' ? 'btn-active' :''}} mb-2 mr-3 btn btn-outline-project .btn-project-icon btn-lg btn-icon rounded-circle waves-effect waves-themed" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="Accueil" id="btn">
  15.             <i class="fal fa-home"></i>
  16.         </a>
  17.         {% for categ in categories %}
  18.             <a href="{{ path('default_categorie_show', {'idc': projet.client.id ,'id': projet.id , 'idcat': categ.id , 'idUser': idUser}) }}" class=" {{title == categ.name ? 'btn-active' :''}}  mb-2 mr-3 btn btn-outline-project .btn-project-icon btn-lg btn-icon rounded-circle waves-effect waves-themed" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{{categ.name}}">
  19.                 <i class="{{ (categ.name == 'Presse') ? 'fal fa-newspaper' :(categ.name == 'Livres audio') ? 'fal fa-file-audio' :(categ.name == 'BD') ? 'fal fa-book-user' :(categ.name == 'Ebooks') ? 'fal fa-book'}} "></i>
  20.             </a>
  21.         {% endfor %}
  22.     </div>
  23.     <form name="form" method="get" action="{{path('search_youscribe')}}" class="mt-2">
  24.         <div
  25.             class="input-group input-group-lg mb-5 shadow-1 rounded">
  26.             {# {% if words is defined %}
  27.                             <input type="hidden" id="words" name="words" required="required" value="{{words}}">
  28.                         {% endif %} #}
  29.             <input type="hidden" id="idUser" name="idUser" required="required" value="{{idUser}}">
  30.             <input type="hidden" id="projet" name="projet" required="required" value="{{projet.id}}">
  31.             <input type="text" id="form_query" name="form[query]" required="required" class="form-control shadow-inset-2" placeholder="Votre recherche">
  32.             <div class="input-group-append">
  33.                 <button class="btn  btn-project hidden-sm-down waves-effect waves-themed" type="submit">
  34.                     <i class="fal fa-search mr-lg-2"></i>
  35.                     <span class="hidden-md-down">Rechercher</span>
  36.                 </button>
  37.             </div>
  38.         </div>
  39.     </form>
  40. {% endblock %}
  41. {% block body %}
  42.     {% if productsInfos is defined %}
  43.         {{include('default/search.html.twig')}}
  44.     {% endif %}
  45.     <!--home -->
  46.     {% if rubriques is defined %}
  47.         {{include('default/rubrique.html.twig')}}
  48.     {% endif %}
  49.     <!--end home -->
  50.     <!--display theme by category -->
  51.     {% if themes is defined  %}
  52.         {{include('default/theme.html.twig')}}
  53.     {% endif %}
  54.     <!--end display theme by category -->
  55.     <!--display Tag by theme -->
  56.     {% if tags is defined  %}
  57.         <h6 class="mb-3" style="color: #7d7a7a;">
  58.             <a class="text-info" href="{{ path('default_categorie_show', {'idc': projet.client.id , 'id': projet.id , 'idcat': categorie.id , 'idUser': idUser}) }}" style="font-weight: bolder;">
  59.                 {{categorie.name}}
  60.             </a>
  61.             &gt;
  62.             <a href="{{ path('default_categorie_show_tag', {'idc': projet.client.id , 'id': projet.id , 'idcat': categorie.id , 'idUser': idUser , 'idTh' : theme.id}) }}" class="opacity-60 text-info" style="font-weight: bolder;">{{theme.label}}</a>
  63.             &gt;
  64.             <span>{{tagInfo.label == "Tous les sous thèmes" ? 'Tous les sous thèmes' : tagInfo.label }}</span>
  65.         </h6>
  66.         <div class="alert alert-project-primary" role="alert">
  67.             <div class="col-xl-12">
  68.                 <div style=" display: contents; ">
  69.                     <a href="{{ path('default_categorie_show_tag', {'idc': projet.client.id , 'id': projet.id , 'idcat': categorie.id , 'idUser': idUser, 'idTh' : theme.id}) }}" class="cursor-auto mb-1 btn btn-pills active btn-outline-info d-inline-block js-waves-off">
  70.                         <b>
  71.                             {{tagInfo.label == "Tous les sous thèmes" ? countProducts : products.getTotalItemCount }}&nbsp;ouvrages
  72.                         </b>
  73.                     </a>
  74.                 </div>
  75.                 <div style=" display: contents; ">
  76.                     <a href="#" class="cursor-auto mb-1 btn btn-pills active btn-outline-success d-inline-block js-waves-off">
  77.                         {% if idL == 1931 %}
  78.                             Français
  79.                         {% elseif idL == 1820 %}
  80.                             English
  81.                         {% elseif idL == 340  %}
  82.                             Arabic
  83.                         {% elseif idL == 5889 %}
  84.                             Español
  85.                         {% elseif idL == 5250 %}
  86.                             Português
  87.                         {% elseif idL == 0 %}
  88.                             Toutes les langues
  89.                         {% endif %}
  90.                     </a>
  91.                 </div>
  92.                 <div style=" display: contents; ">
  93.                     <a href="#" class="cursor-auto mb-1 btn btn-pills active btn-outline-success d-inline-block js-waves-off">
  94.                         {% if idTr == 'sort_title|0' %}
  95.                             Ordre alphabétique
  96.                         {% elseif idTr == 'online_date' %}
  97.                             Derniers ajouts
  98.                         {% elseif idTr == 'nb_reads_for_thirty_days' %}
  99.                             Plus lues
  100.                         {% elseif idTr == null %}
  101.                             Plus lues
  102.                         {% endif %}
  103.                     </a>
  104.                 </div>
  105.                 <div style=" display: contents; ">
  106.                     <a href="{{ path('default_categorie_show_tag', {'idc': projet.client.id , 'id': projet.id , 'idcat': categorie.id , 'idUser': idUser,'idTh' : theme.id}) }}" class="{{tagInfo.label == "Tous les sous thèmes" ? 'btn-active1' : ''}} mb-1 btn btn-pills btn-primary d-inline-block js-waves-off">
  107.                         Tous les sous thèmes
  108.                     </a>
  109.                 </div>
  110.                 {% for tag in tags %}
  111.                     <div style=" display: contents; ">
  112.                         <a href="{{ path('default_categorie_show_result', {'idc': projet.client.id , 'id': projet.id , 'idcat': categorie.id , 'idUser': idUser ,'idTh' : theme.id ,'idTag': tag.id ,'idL' : 0}) }}" class="{{tagInfo.label == tag.label ? 'btn-active1' : ''}} mb-1 btn btn-pills btn-outline-project1 d-inline-block js-waves-off">
  113.                             {{tag.label}}
  114.                         </a>
  115.                     </div>
  116.                 {% endfor %}
  117.             </div>
  118.         </div>
  119.         <!-- filter by language and sorting -->
  120.         {% if tagInfo.id is defined %}
  121.             <div class="row mb-4">
  122.                 <div class="col-auto mr-auto">
  123.                     <div class="input-group-prepend show">
  124.                         <button class="btn btn-outline-default dropdown-toggle waves-effect waves-themed" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">Langue</button>
  125.                         <div class="dropdown-menu" style="position: absolute; will-change: top, left; top: 37px; left: 0px;" x-placement="bottom-start">
  126.                             <a class="dropdown-item" href="{{ path('default_categorie_show_result', {'idc': projet.client.id , 'id': projet.id , 'idcat': categorie.id , 'idUser': idUser, 'idTh' : theme.id ,'idTag': tagInfo.id ,'idL' : 0 , 'idTr':null}) }}">Toutes les langues</a>
  127.                             <a class="dropdown-item" href="{{ path('default_categorie_show_result', {'idc': projet.client.id , 'id': projet.id , 'idcat': categorie.id , 'idUser': idUser,'idTh' : theme.id ,'idTag': tagInfo.id ,'idL' : 1931 , 'idTr':null}) }}">Français</a>
  128.                             <a class="dropdown-item" href="{{ path('default_categorie_show_result', {'idc': projet.client.id , 'id': projet.id , 'idcat': categorie.id , 'idUser': idUser,'idTh' : theme.id ,'idTag': tagInfo.id ,'idL' : 1820, 'idTr':null}) }}">English</a>
  129.                             <a class="dropdown-item" href="{{ path('default_categorie_show_result', {'idc': projet.client.id , 'id': projet.id , 'idcat': categorie.id , 'idUser': idUser,'idTh' : theme.id ,'idTag': tagInfo.id ,'idL' : 340, 'idTr':null}) }}">Arabic</a>
  130.                             <a class="dropdown-item" href="{{ path('default_categorie_show_result', {'idc': projet.client.id , 'id': projet.id , 'idcat': categorie.id , 'idUser': idUser, 'idTh' : theme.id ,'idTag': tagInfo.id ,'idL' : 5250, 'idTr' : null}) }}">Português</a>
  131.                         </div>
  132.                     </div>
  133.                 </div>
  134.                 <div class="col-auto mr-6">
  135.                     <div class="input-group-prepend show">
  136.                         <button class="btn btn-outline-default dropdown-toggle waves-effect waves-themed" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true">Trier par</button>
  137.                         <div class="dropdown-menu" style="position: absolute; will-change: top, left; top: 37px; left: 0px;" x-placement="bottom-start">
  138.                             <a class="dropdown-item" href="{{ path('default_categorie_show_result', {'idc': projet.client.id , 'id': projet.id , 'idcat': categorie.id ,'idUser': idUser, 'idTh' : theme.id ,'idTag': tagInfo.id ,'idL' : idL , 'idTr':'nb_reads_for_thirty_days'}) }}">Derniers ajouts</a>
  139.                             <a class="dropdown-item" href="{{ path('default_categorie_show_result', {'idc': projet.client.id , 'id': projet.id , 'idcat': categorie.id , 'idUser': idUser,'idTh' : theme.id ,'idTag': tagInfo.id ,'idL' : idL , 'idTr':'sort_title|0'}) }}">Ordre alphabétique</a>
  140.                             <a class="dropdown-item" href="{{ path('default_categorie_show_result', {'idc': projet.client.id , 'id': projet.id , 'idcat': categorie.id , 'idUser': idUser,'idTh' : theme.id ,'idTag': tagInfo.id ,'idL' : idL , 'idTr':null}) }}">Plus lues</a>
  141.                         </div>
  142.                     </div>
  143.                 </div>
  144.             </div>
  145.         {% endif %}
  146.         <!-- end filter by language and sorting -->
  147.         {{include('default/tag.html.twig')}}
  148.     {% endif %}
  149.     <!-- end display Tag by theme -->
  150. {% endblock %}
  151. {% block javascripts %}
  152.     <script src="{{ asset('js/owl.carousel.min.js')}}"></script>
  153.     <script src="{{ asset('js/ledClient.js')}}"></script>
  154. {% endblock %}