mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-17 23:13:15 +00:00
68 lines
1.7 KiB
Twig
68 lines
1.7 KiB
Twig
{% set readonly = 0 %}
|
|
{% set droits = -1 %}
|
|
{% set restes = -1 %}
|
|
{% set restrict = -1 %}
|
|
|
|
{% for usr_id, data in datas %}
|
|
{% if restrict == -1 %}
|
|
{% set restrict = data['restrict_dwnld'] %}
|
|
{% elseif restrict != data['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 %}
|
|
|
|
|
|
<h1>{% trans 'Quotas' %}</h1>
|
|
<div>
|
|
{% set base = collection.get_databox().get_viewname() %}
|
|
{% trans %}Base {{base}}{% endtrans %}
|
|
</div>
|
|
<div>
|
|
{% set collection = base_id|bas_names(app) %}
|
|
{% trans %}Collection {{collection}}{% endtrans %}
|
|
</div>
|
|
<form>
|
|
<div>{% trans 'Restrictions de telechargement' %}</div>
|
|
|
|
<table>
|
|
<tr>
|
|
<td>
|
|
<div class="switch_quota {{class}}"></div>
|
|
</td>
|
|
<td>
|
|
{% trans 'Restriction' %}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<div>{% trans 'Droits' %} <input name="droits" {% if readonly %}readonly="readonly"{% endif %} type="text" value="{{droits}}" /> {% trans 'par mois' %}</div>
|
|
<div>{% trans 'Reste' %} <input name="restes" {% if readonly %}readonly="readonly"{% endif %} type="text" value="{{restes}}" /></div>
|
|
<input type="hidden" name="base_id" value="{{base_id}}"/>
|
|
<input type="hidden" name="users" value="{{users_serial}}"/>
|
|
</form>
|
|
|