{% set readonly = 0 %} {% set droits = -1 %} {% set restes = -1 %} {% set restrict = -1 %} {% for usr_id, data in datas %} {% if restrict == -1 %} {% set restrict = data[constant('\\ACL::RESTRICT_DWNLD')] %} {% elseif restrict != data[constant('\\ACL::RESTRICT_DWNLD')] %} {% set restrict = 2 %} {% endif %} {% if restes == -1 %} {% set restes = data['remain_dwnld'] %} {% elseif restes > data['remain_dwnld'] %} {% set restes = data['remain_dwnld'] %} {% endif %} {% if droits == -1 %} {% set droits = data['month_dwnld_max'] %} {% elseif droits < data['month_dwnld_max'] %} {% set droits = data['month_dwnld_max'] %} {% endif %} {% endfor %} {% if restrict == 0 %} {% set readonly = 1 %} {% endif %} {% set class = 'unchecked' %} {% if restrict == 1 %} {% set class = 'checked' %} {% elseif restrict == 2 %} {% set class = 'mixed' %} {% endif %}