|
|
@@ -1,15 +1,21 @@ |
|
|
|
|
|
|
|
{% if is_granted('ROLE_SUPER_ADMIN') %} |
|
|
|
{% if is_dropdown %} |
|
|
|
<a class="btn dropdown-item {{ action.css_class|default('btn-default') }}" href="{{ merchantUtils.merchantCurrent.getMerchantConfig('url') }}?_switch_user={{ item.username }}" target="_blank"> |
|
|
|
{%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%} |
|
|
|
{{ action.label|trans(arguments = trans_parameters|merge({ '%entity_id%': item_id }), domain = translation_domain) }} |
|
|
|
</a> |
|
|
|
{% else %} |
|
|
|
<a class="btn {{ action.css_class|default('btn-default') }}" data-toggle="tooltip" |
|
|
|
title="{{ action.label|trans(arguments = trans_parameters|merge({ '%entity_id%': item_id }), domain = translation_domain) }}" |
|
|
|
href="{{ merchant.getMerchantConfig('url') }}?_switch_user={{ val }}" target="_blank"> |
|
|
|
{%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%} |
|
|
|
</a> |
|
|
|
{% endif %} |
|
|
|
|
|
|
|
{% if 'localhost' in app.request.getSchemeAndHttpHost() %} |
|
|
|
{% set href = app.request.getSchemeAndHttpHost()~ '?_switch_user='~item.username %} |
|
|
|
{% else %} |
|
|
|
{% set href = merchantUtils.merchantCurrent.getMerchantConfig('url')~ '?_switch_user='~item.username %} |
|
|
|
{% endif %} |
|
|
|
{% if is_dropdown %} |
|
|
|
<a class="btn dropdown-item {{ action.css_class|default('btn-default') }}" href="{{ href }}" |
|
|
|
target="_blank"> |
|
|
|
{%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%} |
|
|
|
{{ action.label|trans(arguments = trans_parameters|merge({ '%entity_id%': item_id }), domain = translation_domain) }} |
|
|
|
</a> |
|
|
|
{% else %} |
|
|
|
<a class="btn {{ action.css_class|default('btn-default') }}" data-toggle="tooltip" |
|
|
|
title="{{ action.label|trans(arguments = trans_parameters|merge({ '%entity_id%': item_id }), domain = translation_domain) }}" |
|
|
|
href="{{ href }}" target="_blank"> |
|
|
|
{%- if action.icon %}<i class="fa fa-fw fa-{{ action.icon }}"></i> {% endif -%} |
|
|
|
</a> |
|
|
|
{% endif %} |
|
|
|
{% endif %} |