templates/items/index.html.twig line 14

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}Items!{% endblock %}
  3. {% block body %}
  4.     {% block header %}
  5.         {% set menu = 'foo' %}
  6.         {{ parent() }}
  7.     {% endblock %}
  8.     {% block content %}
  9.         <div id="main" role="main" class="container-fluid">
  10.             <!-- contained-->
  11.             <div class="contained">
  12.                 {% block aside %}
  13.                     {% include 'aside.html.twig' %}
  14.                 {% endblock %}
  15.                 {% block principal %}
  16.                     <div id="page-content">
  17.                         <div class="container-fluid clearfix">
  18.                             <div id="contenedor"> <!-- contenedor flex -->
  19.                                 {% if items is defined %}
  20.                                     {% for item in items %}
  21.                                         <div class="item">
  22.                                             <div class="contenido">
  23.                                                 <div>
  24.                                                     <img src="{{ asset('build/iconos/Sombra Wishlist.png') }}">
  25.                                                 </div>
  26.                                                 <div>
  27.                                                     <img src="{{ rutaimg }}{{ item.filename }}.png"  alt="" style="max-width: 128px"/>
  28.                                                 </div>
  29.                                             </div>
  30.                                             <div class="details">
  31.                                                 <span><input type="checkbox" name="{{ typeName }}[{{ item.id }}]" value="{{ item.internalid }}">{{ translateItem(item.internalid, type)|title }}</span><br>
  32.                                                 {% if item.buy is defined %}<img src="{{ asset('build/iconos/baya.png') }}">{{ item.buy }} {% endif %}
  33.                                             </div>
  34.                                         </div>
  35.                                     {% endfor %}
  36.                                 {% endif %}
  37.                                 <div class="clearfix"></div>
  38.                             </div>
  39.                             {% if maxPages is defined %}
  40.                             <div class="paginate">
  41.                                 {% if maxPages > 1 %}
  42.                                     {%if thisPage > 1 %}
  43.                                         {% if category is defined %}
  44.                                             <a href="{{ path('items_type_category', {type: typeName, currentPage: thisPage-1 < 1 ? 1 : thisPage-1, category: category}) }}"><i class="fas fa-angle-left"></i></a>
  45.                                         {% else %}
  46.                                             <a href="{{ path('items_type', {type: typeName, currentPage: thisPage-1 < 1 ? 1 : thisPage-1}) }}"><i class="fas fa-angle-left"></i></a>
  47.                                         {% endif %}
  48.                                     {% endif %}
  49.                                     {# Render each page number #}
  50.                                     {% for i in 1..maxPages %}
  51.                                         {% if i==thisPage %}
  52.                                             <a class="currentpage">{{ i }}</a>
  53.                                         {% else %}
  54.                                             {% if (maxPages>10 and i < thisPage+6 and i > thisPage-6) or (i < 9 and thisPage<9)   %}
  55.                                                 {% if category is defined %}
  56.                                                     <a href="{{ path('items_type_category', { type: typeName, currentPage: i, category: category}) }}">{{ i }}</a>
  57.                                                 {% else %}
  58.                                                     <a href="{{ path('items_type', {type: typeName, currentPage: i}) }}">{{ i }}</a>
  59.                                                 {% endif %}
  60.                                             {%  else %}
  61.                                             {% endif %}
  62.                                         {% endif %}
  63.                                     {% endfor %}
  64.                                     {# `ยป` arrow #}
  65.                                     {%if thisPage < maxPages %}
  66.                                         {% if category is defined %}
  67.                                             <a href="{{ path('items_type_category', {type: typeName, currentPage: thisPage+1 <= maxPages ? thisPage+1 : thisPage, category: category}) }}"><i class="fas fa-angle-right"></i></a>
  68.                                         {% else %}
  69.                                             <a href="{{ path('items_type', { type: typeName, currentPage: thisPage+1 <= maxPages ? thisPage+1 : thisPage}) }}"><i class="fas fa-angle-right"></i></a>
  70.                                         {% endif %}
  71.                                     {% endif %}
  72.                                 {% endif %}
  73.                             {% endif %}
  74.                         </div>
  75.                     </div>
  76.                 </div>
  77.                 {% endblock %}
  78.             </div>
  79.         </div>
  80.     {% endblock %}
  81.     {% block javascripts %}
  82.         {{ encore_entry_script_tags('app') }}
  83.     {% endblock %}
  84. {% endblock %}