{% load i18n creme_widgets %} {% if user.is_superuser %} {% if button.sandbox_uuid is None %} {% translate 'Are you sure you want to restrict this entity to superusers?' as confirm_msg %} {# NB: we could reload only some bricks with creme.bricks.BricksReloader, but the button must be reloaded too (to update its label etc...) -> need buttons to be bricks ? #} {% widget_icon name='security' size='instance-button' label=_('Confidentiality') %} {% translate 'Restrict to superusers' %} {% elif button.sandbox_uuid == button.UUID_SANDBOX_SUPERUSERS %} {% translate 'Are you sure you want this entity to be accessible to regular users?' as confirm_msg %} {% widget_icon name='security' size='instance-button' label=_('Confidentiality') %} {% translate 'Not restrict to superusers' %} {% else %} {% widget_icon name='security' size='instance-button' label=_('Confidentiality') %} {% translate 'Restrict to superusers' %} {% endif %}{% endif %} {% comment %} {% load i18n creme_widgets %} {% if user.is_superuser %} {% if sandbox_uuid is None %} {% translate 'Are you sure you want to restrict this entity to superusers?' as confirm_msg %} {# NB: we could reload only some bricks with creme.bricks.BricksReloader, but the button must be reloaded too (to update its label etc...) -> need buttons to be bricks ? #} {% widget_icon name='security' size='instance-button' label=img_title %} {% translate 'Restrict to superusers' %} {% elif sandbox_uuid == UUID_SANDBOX_SUPERUSERS %} {% translate 'Are you sure you want this entity to be accessible to regular users?' as confirm_msg %} {% widget_icon name='security' size='instance-button' label=img_title %} {% translate 'Not restrict to superusers' %} {% else %} {% widget_icon name='security' size='instance-button' label=img_title %} {% translate 'Restrict to superusers' %} {% endif %}{% endif %} {% endcomment %}