templates/pages/publico/tienda/inc/tienda_subbar.html.twig line 1

Open in your IDE?
  1. {% if app.request.attributes.get('_route') != 'tienda_index' %}
  2.     {% set header_buttons = [
  3.         {
  4.             'show'          : app.request.attributes.get('_route') == 'tienda_prod_view' ,
  5.             'icon'          : 'fas fa-arrow-left',
  6.             'text_xl_in'    : 'volver.simple'| trans(),
  7.             'text_sm_post'  : 'tienda.simple'| trans(),
  8.             'attr'          : {
  9.                 'class' : 'btn-secondary',
  10.                 'href'  : path('tienda_index')
  11.             }
  12.         },
  13.          {
  14.             'show'          : prod.id != "" and app.request.attributes.get('_route') != 'prod_edit' and is_granted('ROLE_PRODUCTS_EDIT'),
  15.             'icon'          : 'fas fa-edit',
  16.             'text_sm_pre'   : 'editar.simple'| trans(),
  17.             'text_xl_in'    : 'producto.simple'| trans(),
  18.             'attr'          : {
  19.                 'class' : 'btn-secondary',
  20.                 'href'  : path('prod_edit', {'id' : prod.id | default(0)})
  21.             }
  22.         },
  23.     ]
  24.     %}
  25. {% else %}
  26.     {% set header_buttons = [
  27.     ] %}
  28. {% endif %}
  29. {{ include('includes/layout/__toolbar.html.twig', {
  30.     'header_buttons' : header_buttons,
  31.     'title_icon' : constant('App\\Entity\\Catalogo\\Producto::ICON_CLASS') | default(null)
  32. }) }}