templates/front/candidate/list.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block section %}
  3.     <div class="container g-pt-75 g-pb-45 mt-5">
  4.         <div class="row justify-content-center">
  5.             <!-- Start Shop Content -->
  6.             <div class="col-lg-9 order-lg-2 g-mb-30">
  7.                 <div class="g-pl-20--lg">
  8.                     <div class="row justify-content-center">
  9.                         <div class="col-lg-12">
  10.                             {% for candidate in candidates %}
  11.                                 {% if candidate.motivation != null %}
  12.                                 <article class="u-shadow-v11 rounded g-pa-15 g-mb-30">
  13.                                 <div class="row align-items-center">
  14.                                     <a class="col-sm-3" href="{{ path('app_front_motivation_show', {id: candidate.motivation.id}) }}">
  15.                                     {% if candidate.motivation.profilePicFileName != "" %}
  16.                                         <img class="img-fluid" src="{{ asset('uploads/profile_pics/' ~ candidate.motivation.profilePicFileName) }}" alt="Gravity">
  17.                                         {% else %}
  18.                                         <img class="img-fluid" src="assets/img-temp/480x700/img1.jpg" alt="Gravity">
  19.                                     {% endif %}
  20.                                     </a>
  21.                                     <div class="col-sm-9 g-brd-left--sm g-brd-gray-light-v4">
  22.                                         <div class="g-py-10 g-px-0">
  23.                                             <header class="d-flex justify-content-start g-mb-3">
  24.                                                 <h4 class="h5 d-inline-block text-uppercase g-mr-10">
  25.                                                     <a class="g-color-black" href="#">{{ candidate.firstName|lower|capitalize }} {{ candidate.lastName|upper }}</a>
  26.                                                 </h4>
  27.                                                 <a class="g-color-gray-dark-v5 g-font-style-normal text-uppercase" href="#">{{ candidate.party|upper }}</a>
  28.                                                 {% if candidate.socialMedia %}
  29.                                                     <ul class="list-inline ml-5">
  30.                                                         {% if candidate.socialMedia.meta %}
  31.                                                             <li class="list-inline-item g-mx-2">
  32.                                                                 <a class="u-icon-v3 u-icon-size--xs g-color-gray-light-v1 g-bg-gray-light-v5 g-color-white--hover g-bg-primary--hover rounded-circle" target="_blank" href="{{ candidate.socialMedia.meta }}">
  33.                                                                     <i class="fa fa-facebook"></i>
  34.                                                                 </a>
  35.                                                             </li>
  36.                                                         {% endif %}
  37.                                                         {% if candidate.socialMedia.tweeter %}
  38.                                                             <li class="list-inline-item g-mx-2">
  39.                                                                 <a class="u-icon-v3 u-icon-size--xs g-color-gray-light-v1 g-bg-gray-light-v5 g-color-white--hover g-bg-primary--hover rounded-circle" target="_blank" href="{{ candidate.socialMedia.tweeter }}">
  40.                                                                     <i class="fa fa-twitter"></i>
  41.                                                                 </a>
  42.                                                             </li>
  43.                                                         {% endif %}
  44.                                                         {% if candidate.socialMedia.instagram %}
  45.                                                             <li class="list-inline-item g-mx-2">
  46.                                                                 <a class="u-icon-v3 u-icon-size--xs g-color-gray-light-v1 g-bg-gray-light-v5 g-color-white--hover g-bg-primary--hover rounded-circle" target="_blank" href="{{ candidate.socialMedia.instagram }}">
  47.                                                                     <i class="fa fa-instagram"></i>
  48.                                                                 </a>
  49.                                                             </li>
  50.                                                         {% endif %}
  51.                                                         {% if candidate.socialMedia.linkedIn %}
  52.                                                             <li class="list-inline-item g-mx-2">
  53.                                                                 <a class="u-icon-v3 u-icon-size--xs g-color-gray-light-v1 g-bg-gray-light-v5 g-color-white--hover g-bg-primary--hover rounded-circle" target="_blank" href="{{ candidate.socialMedia.linkedIn }}">
  54.                                                                     <i class="fa fa-linkedin"></i>
  55.                                                                 </a>
  56.                                                             </li>
  57.                                                         {% endif %}
  58.                                                         {% if candidate.socialMedia.youtube %}
  59.                                                             <li class="list-inline-item g-mx-2">
  60.                                                                 <a class="u-icon-v3 u-icon-size--xs g-color-gray-light-v1 g-bg-gray-light-v5 g-color-white--hover g-bg-primary--hover rounded-circle" target="_blank" href="{{ candidate.socialMedia.youtube }}">
  61.                                                                     <i class="fa fa-youtube"></i>
  62.                                                                 </a>
  63.                                                             </li>
  64.                                                         {% endif %}
  65.                                                     </ul>
  66.                                                 {% endif %}
  67.                                             </header>
  68.                                             <span class="d-block g-color-gray-dark-v4 g-font-size-18 g-mb-10">
  69.                                         <span class="g-color-red g-font-size-15">{{ candidate.slogan }}</span>
  70.                                     </span>
  71.                                             <p class="g-mb-20">
  72.                                                 {{ candidate.motivation.content|striptags|slice(0, 200)|raw }} ...
  73.                                             </p>
  74.                                             <ul class="list-inline g-mx-minus-20 g-mb-5 g-pl-7">
  75. {#                                                <li class="list-inline-item info-v5-4__action g-brd-right g-brd-gray-light-v3 g-color-gray-dark-v5 g-pr-15 g-pl-15">#}
  76. {#                                                    <i class="align-middle g-font-size-16 g-transition-0_3 g-mr-7 icon-medical-022 u-line-icon-pro"></i>#}
  77. {#                                                    <a class="g-color-gray-dark-v5 g-color-primary--hover g-text-underline--none--hover" href="#">Add to Wishlist</a>#}
  78. {#                                                </li>#}
  79. {#                                                <li class="list-inline-item info-v5-4__action g-color-gray-dark-v5 g-pr-10 g-pl-5">#}
  80. {#                                                    <i class="align-middle g-font-size-16 g-transition-0_3 g-mr-7 icon-communication-159 u-line-icon-pro"></i>#}
  81. {#                                                    <a class="g-color-gray-dark-v5 g-color-primary--hover g-text-underline--none--hover" href="#">Add to Compare</a>#}
  82. {#                                                </li>#}
  83.                                             </ul>
  84.                                             <a href="{{ path('app_front_motivation_show', {id: candidate.motivation.id}) }}">
  85.                                             <button type="button" class="btn btn-lg u-btn-primary g-font-weight-600 g-font-size-12 text-uppercase g-mx-5 g-mt-10">
  86.                                                 Voir
  87.                                             </button>
  88.                                             </a>
  89.                                             {% if candidate.getFalc() %}
  90.                                                 <a href="{{ path('app_fiche_falc_show', {id: candidate.getFalc().getId()}) }}">
  91.                                                     <button type="button" class="btn btn-lg u-btn-primary g-font-weight-600 g-font-size-12 text-uppercase g-mx-5 g-mt-10">
  92.                                                         Fiche falc
  93.                                                     </button>
  94.                                                 </a>
  95.                                             {% endif %}
  96.                                         </div>
  97.                                     </div>
  98.                                 </div>
  99.                             </article>
  100.                                 {% endif %}
  101.                             {% endfor %}
  102.                         </div>
  103.                     </div>
  104.                 </div>
  105.             </div>
  106.             <!-- End Shop Content -->
  107.             <!-- Start Shop Sidebar -->
  108.             <div class="col-lg-3 order-lg-1 g-brd-right--lg g-brd-gray-light-v4 g-mb-30">
  109.                 <div class="g-pr-20--lg">
  110.                     <!-- Start Categories -->
  111.                     <div class="g-mb-20">
  112.                         <h3 class="h5 g-color-black g-font-weight-600 g-mb-10">
  113.                             {% if election_type is defined and election_type == 'REGIONALE' %}
  114.                                 Régions
  115.                                 {% else %}
  116.                                 {{ current_region.name|capitalize }}
  117.                             {% endif %}
  118.                         </h3>
  119.                         <ul class="list-unstyled g-font-size-13 mb-0">
  120.                             {% if election_type is defined and election_type == 'REGIONALE' %}
  121.                                 {% for region in regions %}
  122.                                     <li>
  123.                                         {% if current_region is defined and current_region.id == region.id %}
  124.                                         <a class="d-block u-link-v5 g-color-blue rounded g-px-20 g-py-8"
  125.                                            href="{{ path('app_region_candidates', {region: region.id, election_type: election_type}) }}">
  126.                                             <i class="mr-2 fa fa-angle-right"></i>
  127.                                             {{ region.name|capitalize }}</a>
  128.                                         {% else %}
  129.                                         <a class="d-block u-link-v5 g-color-gray-dark-v4 rounded g-px-20 g-py-8"
  130.                                            href="{{ path('app_region_candidates', {region: region.id, election_type: election_type}) }}">
  131.                                             <i class="mr-2 fa fa-angle-right"></i>
  132.                                             {{ region.name|capitalize }}</a>
  133.                                         {% endif %}
  134.                                     </li>
  135.                                 {% endfor %}
  136.                             {% elseif election_type is not defined and communes is defined%}
  137.                                 {% for commune in communes %}
  138.                                     <li>
  139.                                         {% if current_commune is defined and current_commune.id == commune.id %}
  140.                                         <a class="d-block u-link-v5 g-color-blue rounded g-px-20 g-py-8"
  141.                                            href="{{ path('app_commune_candidates', {commune: commune.id, region: current_region.id}) }}">
  142.                                             <i class="mr-2 fa fa-angle-right"></i>
  143.                                             {{ commune.name|capitalize }}</a>
  144.                                         {% else %}
  145.                                         <a class="d-block u-link-v5 g-color-gray-dark-v4 rounded g-px-20 g-py-8"
  146.                                            href="{{ path('app_commune_candidates', {commune: commune.id, region: current_region.id}) }}">
  147.                                             <i class="mr-2 fa fa-angle-right"></i>
  148.                                             {{ commune.name|capitalize }}</a>
  149.                                         {% endif %}
  150.                                     </li>
  151.                                 {% endfor %}
  152.                             {% else %}
  153.                                 Rien à afficher
  154.                             {% endif %}
  155.                         </ul>
  156.                     </div>
  157.                     <!-- End Categories -->
  158.                     <hr class="g-brd-gray-light-v4 g-my-0">
  159.                 </div>
  160.             </div>
  161.             <!-- End Shop Sidebar -->
  162.         </div>
  163.     </div>
  164. {% endblock %}