{% load i18n creme_perms %} {% with link_perm=user|has_perm_to_link:object %} {% if button.is_allowed and link_perm %} #} href="{% url 'activities__create_related_activity' object.id %}?callback_url=${location}{% if button.type_uuid %}&activity_type={{button.type_uuid}}{% endif %}"> {{button.icon.render}}{{button.verbose_name}} {% else %} {{button.icon.render}}{{button.verbose_name}} {% endif %} {% endwith %}