vendor/store.shopware.com/ndsrecipemanager/src/Resources/views/rcpmanager/recipe/listing.html.twig line 1

Open in your IDE?
  1. {% set currentPage = ((searchResult.criteria.offset + 1) / searchResult.criteria.limit )|round(0, 'ceil') %}
  2. {% set paginationConfig = {
  3.     page: currentPage,
  4.     parentFilterPanelSelector: '.' ~ rcpWrapper,
  5. } %}
  6. {% set listingPagination = {
  7.     params: params,
  8.     dataUrl: dataUrl,
  9.     filterUrl: filterUrl,
  10.     filterPanelSelector: '.recipe-filter-panel',
  11.     cmsProductListingSelector: '.cms-element-recipe-listing-' ~ rcpId,
  12.     cmsProductListingWrapperSelector: '.' ~ rcpWrapper,
  13.     activeFilterContainerSelector: '.recipe-filter-panel-active-container',
  14.     resetAllFilterButtonClasses: 'recipe-filter-reset-all btn btn-sm btn-outline-danger',
  15.     resetAllFilterButtonSelector: '.recipe-filter-reset-all',
  16.     snippets: {
  17.         resetAllButtonText: 'recipe-manager.listing.filterPanelResetAll'|trans|sw_sanitize
  18.     }
  19. } %}
  20. {% block recipe_listing %}
  21.     <div class="{{ rcpWrapper }}"
  22.          data-recipe-listing-pagination="true"
  23.          data-recipe-listing-pagination-options='{{ paginationConfig|json_encode }}'
  24.          data-recipe-listing="true"
  25.          data-recipe-listing-options='{{ listingPagination|json_encode }}'>
  26.         <div class="cms-element-recipe-listing-{{ rcpId }}">
  27.             {% if searchResult.total > 0 %}
  28.                 <div class="cms-element-rcp-recipe-listing-actions row justify-content-between">
  29.                     {% block recipe_listing_pagination %}
  30.                         <div class="col-md-auto">
  31.                             {% sw_include '@Storefront/rcpmanager/recipe/pagination.html.twig' with {
  32.                                 entities: searchResult,
  33.                                 criteria: searchResult.criteria
  34.                             } %}
  35.                         </div>
  36.                     {% endblock %}
  37.                 </div>
  38.             {% endif %}
  39.             {% block recipe_listing_row %}
  40.                 <div class="cms-news-full-listing-row js-listing-wrapper">
  41.                     {% if searchResult.total > 0 %}
  42.                         {% block recipe_listing_col %}
  43.                             <div class="row">
  44.                                 {% for item in searchResult %}
  45.                                     {% block recipe_listing_box %}
  46.                                         <div class="col-12 col-md-4 col-lg-3 my-4">
  47.                                             {% sw_include '@Storefront/rcpmanager/recipe/card/box.html.twig' %}
  48.                                         </div>
  49.                                     {% endblock %}
  50.                                 {% endfor %}
  51.                             </div>
  52.                         {% endblock %}
  53.                     {% else %}
  54.                         {% block recipe_listing_col_empty %}
  55.                             <div class="cms-listing-col col-12">
  56.                                 {% block recipe_listing_col__empty_alert %}
  57.                                     {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
  58.                                         type: 'info',
  59.                                         content: 'recipe-manager.listing.emptyResultMessage'|trans|sw_sanitize
  60.                                     } %}
  61.                                 {% endblock %}
  62.                             </div>
  63.                         {% endblock %}
  64.                     {% endif %}
  65.                 </div>
  66.             {% endblock %}
  67.         </div>
  68.     </div>
  69. {% endblock %}