You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

user-switch.html.twig 928B

4 years ago
123456789101112131415
  1. {% if is_granted('ROLE_SUPER_ADMIN') %}
  2. {% if is_dropdown %}
  3. <a class="btn dropdown-item {{ action.css_class|default('btn-default') }}" href="{{ merchantUtils.merchantCurrent.getMerchantConfig('url') }}?_switch_user={{ item.username }}" target="_blank">
  4. {%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%}
  5. {{ action.label|trans(arguments = trans_parameters|merge({ '%entity_id%': item_id }), domain = translation_domain) }}
  6. </a>
  7. {% else %}
  8. <a class="btn {{ action.css_class|default('btn-default') }}" data-toggle="tooltip"
  9. title="{{ action.label|trans(arguments = trans_parameters|merge({ '%entity_id%': item_id }), domain = translation_domain) }}"
  10. href="{{ merchant.getMerchantConfig('url') }}?_switch_user={{ val }}" target="_blank">
  11. {%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%}
  12. </a>
  13. {% endif %}
  14. {% endif %}