{% extends 'Shop/base.html.twig' %} {% block title %} {{ 'app.shop_owner.pages.promotional_offers.title'|trans }} {% endblock %} {% block toolbar_actions %} {{ 'app.global.buttons.add'|trans }} {% endblock %} {% block component_body %}
{% for menu in menus %}
  • {{ menu.name|upper }} {{ link('edit','modal', 'success', {'entity-id' : menu.id, 'entity-name' : menu, 'modalId': 'foxorders_modal_form_shop' }) }} {% include 'Includes/delete.html.twig' with { 'route': path('foxorders_shop_promotional_offer_delete', {'id': menu.id}) , 'token': csrf_token('delete' ~ menu.id), 'button': 'list_delete' } %}
    1. {% for offer in menu.promotionalOffers|sort((a, b) => b.position < a.position) %}
    2. {% set image = getImage(promotional_offers_images ~ offer.image.name) %}
      {% if offer.product %} {{ offer.product|upper }} {% endif %} {% if offer.category %} {{ offer.category|upper }} {% endif %} {% if offer.start and offer.end %} {{ offer.start|date('d/m/Y') }} => {{ offer.end|date('d/m/Y') }} {% endif %} {% if offer.product %} Produit {% endif %} {% if offer.category %} Catégorie {% endif %} {% if offer.enabled %} {{ 'app.shop_owner.pages.products.list.enabled'|trans }} {% else %} {{ 'app.shop_owner.pages.products.list.disabled'|trans }} {% endif %}
    3. {% endfor %}
    {% endfor %}
    {% endblock %} {% block modals %} {% include 'Modal/form.html.twig' with { 'title': 'app.shop_owner.pages.promotional_offers.new.title'|trans, 'id': 'shop', } %} {% endblock %} {% block stylesheets %} {% endblock %} {% block javascripts %} {{ parent() }} {% endblock %}