impersonating.html.twig 700 B

1234567891011121314151617181920
  1. {#
  2. This file is part of the Sonata package.
  3. (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  4. For the full copyright and license information, please view the LICENSE
  5. file that was distributed with this source code.
  6. #}
  7. {% extends 'SonataAdminBundle:CRUD:base_list_field.html.twig' %}
  8. {% block field %}
  9. {% if object.username != app.user.username %}
  10. <a href="{{ url(sonata_user.getImpersonatingRoute, {'_switch_user': object.username}) }}" title="{{ 'switch_user'|trans({}, 'SonataUserBundle')}}">
  11. <img src="{{ asset('bundles/sonataadmin/famfamfam/group_go.png') }}" alt="{{ 'switch_user'|trans({}, 'SonataUserBundle')}}" />
  12. </a>
  13. {% endif %}
  14. {% endblock %}