templates/admin/Button/show_operacion_button.html.twig line 1

Open in your IDE?
  1. {% set operaciones = {
  2.     'operacionGestion': 'link_action_show_operacion_gestion',
  3.     'operacionCompra': 'link_action_show_operacion_compra',
  4.     'operacionVenta': 'link_action_show_operacion_venta'
  5. } %}
  6. {#{% set classSeparator = 'separator-right' %}#}
  7. {# Determinar el reloj segĂșn el tipo de object #}
  8. {% if instanceof(object, '\\App\\Entity\\Reloj') %}
  9.     {% set reloj = object %}
  10. {% elseif object.reloj is defined %}
  11.     {% set reloj = object.reloj %}
  12. {% else %}
  13.     {% set reloj = null %}
  14. {% endif %}
  15. {#{% if instanceof(object, "\\App\\Entity\\ActividadAbstract") %}#}
  16. {#    {% set classSeparator = '' %}#}
  17. {#{% endif %}#}
  18. {% if reloj %}
  19.     {% for prop, title in operaciones %}
  20.         {% if attribute(reloj, prop) is defined and attribute(reloj, prop) %}
  21.             {% set operacion = attribute(reloj, prop) %}
  22.             {% if operacion is not null and operacion.deletedAt is null %}
  23.                 {% set kebab = prop|pregreplace('/([a-z])([A-Z])/', '$1-$2')|lower %}
  24.                 <li id="action-show-{{ kebab }}" class="action">
  25.                     <a class="sonata-action-element"
  26.                        href="{{ url('admin_app_operacion_edit', admin.getEntitySubClass is defined ? {'id': operacion.id, 'subclass': admin.getEntitySubClass} : {'id': operacion.id}) }}"
  27.                        title="{{ title|trans({}, 'SonataAdminBundle') }}">
  28.                         <i class="perseo-icon-show-{{ kebab }} perseo-icon-navbar-prometeo  { loop.first ? classSeparator : '' } "></i>
  29.                     </a>
  30.                 </li>
  31.             {% endif %}
  32.         {% endif %}
  33.     {% endfor %}
  34. {% endif %}