templates/frontend/associations.html.twig line 1

Open in your IDE?
  1. {% extends 'frontend/base.html.twig' %}
  2. {% block CSS %}
  3.     <link rel="preload" href="{{asset('build/admin/user.css')}}" as="style" onload="this.onload=null;this.rel='stylesheet'">
  4.     <noscript><link rel="stylesheet" href="{{asset('build/admin/user.css')}}"></noscript>
  5.     {{block('CSS', 'frontend/homepage.html.twig')}}
  6. {% endblock %}
  7. {% block JS %}
  8.     <script src="{{ asset('build/admin/user.js') }}"></script>
  9.     <script src="{{ asset('build/frontend/cart.js') }}"></script>
  10.     {{block('JS', 'frontend/homepage.html.twig')}}
  11.     <script>
  12.             jQuery(document).ready(function($) {
  13.                 jQuery( "ul>li" ).click(function() {
  14.                     var theCity = jQuery(this).html();
  15.                     var url = "{{ path('companyAssociationList', {'urlName': association})}}/" + theCity;
  16.                     window.location.href = url;
  17.                 });
  18.             });
  19.     </script>
  20. {% endblock %}
  21. {% block title %}{% endblock %}
  22. {% block metaDescription %}{% endblock %}
  23. {% block content %}
  24. <style>
  25.     section{margin: 0;}
  26. </style>
  27.     {% if logoPage is defined %}
  28.     <div class="category row mb-rem">
  29.         <section class="category-header">
  30.             <div class="category-header-top">
  31.                 <!-- @todo Change for banner -->
  32.                 {% set url = path('getImageAsThumb', { 'id': logoPage.id, 'height': '383', 'width':'1920'}) %}
  33.                 <img class="card-img-top img-fluid full-width" src="{{url}}" alt="" style="">
  34.             </div>
  35.         </section>
  36.     </div>
  37.     {% endif %}
  38.     <section style="width: 80%;margin-left: auto; margin-right: auto;" class="section-blog-archive">
  39.         <!-- Page-Title -->
  40.         <div class="row">
  41.             <div class="col-12">
  42.                 {% if inCity == NULL %}
  43.                     <h2 class="m-t-20 m-b-20 text-center">{% if title is defined %}{{title | upper}}{% else %}Les épiceries{% endif %}</h2>
  44.                     {% if logoPage is defined or pageText is defined %}
  45.                         <div class="row">
  46.                         {% if app.request.attributes and app.request.attributes.get('_route_params')["urlName"] == "UPA_Mangeons_local" %}
  47.                             <div class="col-xl-2 col-lg-2 col-md-8 col-8 m-lg-0 mx-auto">
  48.                                 <img class="card-img-top img-fluid" src="/image/thumbnail/4356/180/180" alt="" style="margin-left: auto; margin-right: auto;">
  49.                             </div>
  50.                             <div class="col-xl-10 col-lg-10 col-md-12 col-12 text-center align-self-center">
  51.                                 {% if pageText is defined %}
  52.                                     {{pageText | raw}}
  53.                                 {% endif %}
  54.                             </div>
  55.                         {% else %}
  56.                             <div class="col-12 text-center">
  57.                                 {% if pageText is defined %}
  58.                                     {{pageText | raw}}
  59.                                 {% endif %}
  60.                             </div>
  61.                         {% endif %}
  62.                         </div>
  63.                         <br>
  64.                     {% endif %}
  65.                     <select id="cities" class="mb-3">
  66.                         <option value="---">Sélectionnez une municipalité...</option>
  67.                         {% for city in cities %}
  68.                             <option value="{{ city|e }}">{{ city|e }}</option>
  69.                         {% endfor %}
  70.                     </select>
  71.                 {% endif %}
  72.                 <br />
  73.                 <br />
  74.                 {% set currentCity = '' %}
  75.                 {% set cmtp = 0 %}
  76.                 <div class="card-deck">
  77.                 {% for c in companies%}
  78.                     <div class="col-xs-12 col-md-6 col-lg-4">
  79.                     {# starting the cards #}
  80.                     <div class="card m-b-20">
  81.                      <a href="{{path('companyStore', {'urlname': c.urlName, 'id': c.id})}}">
  82.                         {# <a href="{{path('viewCompanyInGroup', {'urlname': c.urlName, 'id': c.id, 'groupurlname': association}) }}"> #}
  83.                             {% if c.image %}
  84.                                 {% set url = path('getImageAsThumb', { 'id': c.image.id, 'height': '250', 'width':'350'}) %}
  85.                             {% else %}
  86.                                 {% set url = "/assets/frontend/images/logo.png" %}
  87.                             {% endif %}
  88.                             <div style="height: 370px;display:table-cell; vertical-align:middle; text-align:center; width: 370px;">
  89.                                 <img class="card-img-top img-fluid" src="{{url}}" alt="" style="margin-left: auto; margin-right: auto;">
  90.                             </div>
  91.                             {#<img class="card-img-top img-fluid" src="{{path('getImageAsCroppedThumb', {'id': post.image.id, 'height': '250', 'width' : '350'})}}" alt="Card image cap">#}
  92.                             <div class="card-body">
  93.                                 <h5 class="card-title">{{c.name}}</h5>
  94.                                 {% if c.mainLocation %}
  95.                                     <h5 class="card-title">{{c.mainLocation.region.name }}</h5>
  96.                                 {% endif %}
  97.                                 <p class="card-text">
  98.                                 {{c.description | striptags | slice(0, 350) | raw}}{% if c.description | length > 350 %}...{%endif %}
  99.                                 </p>
  100.                                 <p class="card-text">
  101.                                 <small class="text-muted">Inscrit depuis {{c.dateCreated | date('d/m/Y')}}</small>
  102.                                 </p>
  103.                             </div>
  104.                         </a>
  105.                     </div>
  106.                 </div>
  107.                 {% endfor %}
  108.                 </div>
  109.                     </div>
  110.                 </div>
  111.             </div>
  112.         </div>
  113.         <!-- end row -->
  114.     </section>
  115. {% endblock %}