{% load i18n %} {% load juntagrico.config %} {% load juntagrico.widgets %}
{% if assignments.subscription %} {% spaceless %} {% with sub=assignments.subscription %} {% with partner_core_bound=sub.member_assignment_count|add:sub.partner_core_assignment_count %} {% with partner_bound=sub.member_assignment_count|add:sub.partner_assignment_count %} {% with total=sub|remaining_assignments|add:partner_bound %} {% for _ in ''|ljust:total %} {% if forloop.counter <= sub.member_core_assignment_count %} {% trans {% elif forloop.counter <= sub.member_assignment_count %} {% trans {% elif forloop.counter <= partner_core_bound %} {% trans {% elif forloop.counter <= partner_bound %} {% trans {% else %} {% trans {% endif %} {% endfor %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endspaceless %} {% else %} {# display member assignments, without subscription #} {% for _ in ''|ljust:assignments.member.assignment_count %} {% trans {% endfor %} {% endif %}