src/AppBundle/Resources/views/Unit/list.html.twig line 1

Open in your IDE?
  1. {% extends 'AppBundle::layout.html.twig' %}
  2. {% block header %}
  3.   {% if page.header %}
  4.     {% include "@App/components/header.html.twig" %}
  5.   {% endif %}
  6. {% endblock %}
  7. {% block title %}{% endblock %}
  8. {#{% block breadcrumbs %}#}
  9. {#  {{ wo_render_breadcrumbs() }}#}
  10. {#{% endblock %}#}
  11. {% block body %}
  12. {#  {% if page.banner %}#}
  13. {#    {% include '@App/ContentBlock/banner.html.twig' %}#}
  14. {#  {% endif %}#}
  15.   {#  {% if page.isUnitsFilter %}#}
  16.   {#    <div class="row">#}
  17.   {#      {% include '@App/components/units_filter.html.twig' %}#}
  18.   {#    </div>#}
  19.   {#  {% endif %}#}
  20.   {% set attrs = app.request.query.all %}
  21.   {% include '@App/components/breadcrumbs.html.twig' %}
  22.   <div class="row theme-styled-text">
  23.     <h2 class="title-with-arrow pt-4 pt-md-0 px-3 px-md-0">{% trans %}units_for_sale{% endtrans %}</h2>
  24.   </div>
  25.   <div class="row">
  26.     <div class="description w-100">
  27.       {{ customForm|raw }}
  28.       {% if view == 'grid' %}
  29.         <div class="grid-view units container">
  30.           {% include '@App/Unit/grid.html.twig' %}
  31.         </div>
  32.       {% else %}
  33.         {% if units %}
  34.           <div class="table-responsive">
  35.             <table class="table table-hover table-striped units table-view">
  36.               <thead>
  37.               <tr>
  38.                 <th>{{ knp_pagination_sortable(pagination, 'Number'|trans, 'u.attributes.flat_internal_id', params, params) }}</th>
  39.                 <th>{{ knp_pagination_sortable(pagination, 'project'|trans, 'project', params, params) }}</th>
  40.                 <th>{{ knp_pagination_sortable(pagination, attributes['flat_disposition'].title, 'u.attributes.flat_disposition', params, params) }}</th>
  41.                 <th>{{ knp_pagination_sortable(pagination, attributes['flat_area'].title, 'u.attributes.flat_area', params, params) }}</th>
  42.                 <th>{{ knp_pagination_sortable(pagination, 'floor'|trans, 'floor', params, params) }}</th>
  43.                 <th>{% trans %}unit_accessories{% endtrans %}</th>
  44.                 <th>{% trans %}unit_accessories_area{% endtrans %}</th>
  45.                 <th>{{ knp_pagination_sortable(pagination, attributes['flat_price'].title, 'u.attributes.flat_price', params, params) }}</th>
  46.                 <th>{{ knp_pagination_sortable(pagination, attributes['flat_status'].title, 'u.attributes.flat_status', params, params) }}</th>
  47.               </tr>
  48.               </thead>
  49.               <tbody class="units-body">
  50.               {% include '@App/Unit/rows.html.twig' %}
  51.               </tbody>
  52.             </table>
  53.           </div>
  54.         {% else %}
  55.           <div id="newsletter_succes" class="newsletter__message p-5">
  56.             <div class="message message--newsletter">
  57.               <div class="message__header"><h3 class="message__text--heading">Nenašly se žádné volné jednotky odpovídající zadání</h3></div>
  58.               <div class="message__body">Zvolte prosím jiné parametry nebo zkuste <a href="/units">hledat od začátku</a>.</div>
  59.             </div>
  60.           </div>
  61.         {% endif %}
  62.       {% endif %}
  63.       {% if not hide_button %}
  64.         <div class="text-center">
  65.           <button class="btn main-button loading-btn pl-5 pr-5"
  66.                   data-href="{{ url('units_list') }}"
  67.                   id="load_utils">{% trans %}Load more{% endtrans %}</button>
  68.           <div class="spinner-border d-none loading-spinner" role="status">
  69.             <span class="sr-only">{% trans %}Loading{% endtrans %}</span>
  70.           </div>
  71.         </div>
  72.       {% endif %}
  73.       {% if view == 'grid' %}
  74.         <div class="units_filter__grid-tooltip">
  75.           <img src="{{ asset('bundles/app/images/parking_icon.png') }}">{% trans %}iconTitleParking{% endtrans %}
  76.           <img src="{{ asset('bundles/app/images/garage_icon.png') }}">{% trans %}iconTitleGarageParking{% endtrans %}
  77.           <img src="{{ asset('bundles/app/images/shop_icon.png') }}">{% trans %}iconTitleCellar{% endtrans %}
  78.           <img src="{{ asset('bundles/app/images/terracebalcony_icon2.png') }}">{% trans %}iconTitleTerraceBalcony{% endtrans %}
  79.         </div>
  80.       {% endif %}
  81.     </div>
  82.   </div>
  83.   {% for content in page.contentBlocks %}
  84.     {{ render_content_block(content.instance, page) }}
  85.   {% endfor %}
  86.   {% if page.isNewsletter %}
  87.     {% include '@App/components/newsletter_box.html.twig' %}
  88.   {% endif %}
  89. {% endblock %}
  90. {% block footer %}
  91.   {% if page.footer %}
  92.     {% include "@App/components/footer.html.twig" %}
  93.   {% endif %}
  94. {% endblock %}