{% macro format_checkbox(admin, right, name, users, type) %} {% set id = right['base_id'] %} {% set class = 'base_id' %} {% if type == 'sbas' %} {% set id = right['sbas_id'] %} {% set class = 'sbas_id' %} {% set sbas_class = "" %} {% else %} {% set sbas_class = "inside_sbas_" ~ right['sbas_id'] %} {% endif %} {% set display = 'block' %} {% if right[name] != users|length and name != 'access' and right['access'] != users|length and type != 'sbas' %} {% set display = 'none' %} {% endif %} {% if right[name] == 0 %} {% set class = 'unchecked' %} {% elseif right[name] == users|length %} {% set class = 'checked' %} {% else %} {% set class = 'mixed' %} {% endif %} {% if name == 'access' %} {% if class != 'checked' and type == 'base' and admin.ACL().has_access_to_base(id) is empty %}
{% else %}
{% endif %} {% else %} {% if class != 'checked' and type == 'base' and admin.ACL().has_right_on_base(id, name) is empty %}
{% elseif class != 'checked' and type == 'sbas' and admin.ACL().has_right_on_sbas(id, name) is empty %}
{% else %}
{% endif %} {% endif %} {% endmacro %}
{% if main_user is not empty %} {% if main_user.is_special is not empty %} {% if main_user.get_login() == 'invite' %} {% trans 'Reglages:: reglages d acces guest' %} {% elseif main_user.get_login() == 'autoregister' %} {% trans 'Reglages:: reglages d inscitpition automatisee' %} {% endif %} {% else %} {% set display_name = main_user.get_display_name() %} {% trans %} Edition des droits de {{ display_name }} {% endtrans %} {% endif %} {% else %} {% set number = users|length %} {% trans %} Edition des droits de {{ number }} utilisateurs {% endtrans %} {% endif %} {% trans 'Apply a template' %}
{% set sbas = '' %} {% for rights in datas %} {% if rights['sbas_id'] != sbas %} {% set sbas = rights['sbas_id'] %} {% if loop.index != 1 %} {% endif %} {% endif %} {% endfor %}
{{rights['sbas_id']|sbas_names(app)}}
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'bas_chupub', users, 'sbas')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'bas_modif_th', users, 'sbas')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'bas_manage', users, 'sbas')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'bas_modify_struct', users, 'sbas')}}
{{rights['base_id']|bas_names(app)}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'access', users, 'base')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'actif', users, 'base')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'canputinalbum', users, 'base')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'candwnldpreview', users, 'base')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'nowatermark', users, 'base')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'candwnldhd', users, 'base')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'cancmd', users, 'base')}}
{% if rights['restrict_dwnld'] > 0 %} {% else %} {% endif %}
{% if rights['time_limited'] > 0 %} {% else %} {% endif %}
{% if rights['masks'] > 0 %} {% else %} {% endif %}
{{_self.format_checkbox(app['authentication'].getUser(), rights, 'canaddrecord', users, 'base')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'canmodifrecord', users, 'base')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'chgstatus', users, 'base')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'candeleterecord', users, 'base')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'imgtools', users, 'base')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'canadmin', users, 'base')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'canreport', users, 'base')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'canpush', users, 'base')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'manage', users, 'base')}} {{_self.format_checkbox(app['authentication'].getUser(), rights, 'modify_struct', users, 'base')}}
{% if main_user is not empty and main_user.is_template is empty and main_user.is_special is empty %}
{% trans 'admin::compte-utilisateur identifiant' %}
{% trans 'admin::compte-utilisateur sexe' %}
{% trans 'admin::compte-utilisateur prenom' %}
{% trans 'admin::compte-utilisateur nom' %}
{% trans 'admin::compte-utilisateur email' %}
{% trans 'admin::compte-utilisateur adresse' %}
{% trans 'admin::compte-utilisateur code postal' %}
{% trans 'admin::compte-utilisateur ville' %}
{% trans 'admin::compte-utilisateur poste' %}
{% trans 'admin::compte-utilisateur societe' %}
{% trans 'admin::compte-utilisateur activite' %}
{% trans 'admin::compte-utilisateur telephone' %}
{% trans 'admin::compte-utilisateur fax' %}
{% endif %}
{% trans 'boutton::retour' %}