{% with options=widget.get_options|list %} {% firstof options.0.options.details.JOURDATE options.0.options.details.day_str as first_day %} {% with first_monday=first_day|adjust_to_week_monday last_option=options|last %} {% firstof last_option.options.details.JOURDATE last_option.options.details.day_str as last_day %} {% with last_sunday=last_day|adjust_to_week_monday|add_days:6 %} {% now 'WY' as current_week %} {% spaceless %}
{% for day in first_monday|iterate_days_until:last_sunday %} {% if day.weekday == 0 %} {% with sunday=day|add_days:6 %}
Du {{ day|date:"d/m" }} au {{ sunday|date:"d/m" }}
{% endwith %} {% endif %}
{{ day|date:"l d/m" }}
{% with day_str=day|date:"Y-m-d" %} {% for option in options %} {% if option.options.details.JOURDATE == day_str or option.options.details.day_str == day_str %}
{% if widget.readonly and option.selected %}{% endif %}
{% endif %} {% endfor %} {% endwith %}
{% endfor %}
{% endspaceless %} {% endwith %} {% endwith %} {% endwith %}