{% load i18n creme_perms creme_widgets %} {% with link_perm=user|has_perm_to_link:object user_contact=request.user.linked_contact %} {% if button.is_allowed and link_perm and object != user_contact %} {% widget_icon name='phone' size='instance-button' label=_('Phone call') %} {{button.verbose_name}} {% else %} {% widget_icon name='phone' size='instance-button' label=_('Phone call') %} {{button.verbose_name}} {% endif %} {% endwith %}