Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

22 rindas
1.1KB

  1. {% if is_granted('ROLE_SUPER_ADMIN') %}
  2. {% if 'localhost' in app.request.getSchemeAndHttpHost() %}
  3. {% set href = app.request.getSchemeAndHttpHost()~ '?_switch_user='~item.username %}
  4. {% else %}
  5. {% set href = merchantUtils.merchantCurrent.getMerchantConfig('url')~ '?_switch_user='~item.username %}
  6. {% endif %}
  7. {% if is_dropdown %}
  8. <a class="btn dropdown-item {{ action.css_class|default('btn-default') }}" href="{{ href }}"
  9. target="_blank">
  10. {%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%}
  11. {{ action.label|trans(arguments = trans_parameters|merge({ '%entity_id%': item_id }), domain = translation_domain) }}
  12. </a>
  13. {% else %}
  14. <a class="btn {{ action.css_class|default('btn-default') }}" data-toggle="tooltip"
  15. title="{{ action.label|trans(arguments = trans_parameters|merge({ '%entity_id%': item_id }), domain = translation_domain) }}"
  16. href="{{ href }}" target="_blank">
  17. {%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%}
  18. </a>
  19. {% endif %}
  20. {% endif %}