{% if entity|default() is not empty %}
  {% set localeData = aa_admin_locale_switches(entity|default(null)) %}
  {% set cls = localeData.locale_current_switch %}
  {% if cls.url %}
    <a href="{{ cls.url }}" target="_blank" class="btn btn-primary">
      <span class="icon mr-2"><i class="fas fa-eye"></i></span>
      <span class="text">Voir en ligne</span>
    </a>
  {% endif %}
{% endif %}