{% extends "qommon/forms/widget.html" %} {% block widget-control %} {% with options=widget.get_options|list %} {% with first_monday=options.0.options.date|adjust_to_week_monday last_option=options|last %} {% with last_day=last_option.options.date|adjust_to_week_monday|add_days:6 %} {% now 'WY' as current_week %} {% spaceless %}
{% for day in first_monday|iterate_days_until:last_day %} {% 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.date == day_str %}
{% if widget.readonly and option.selected %}{% endif %}
{% endif %} {% endfor %} {% endwith %}
{% endfor %}
{% endspaceless %} {% endwith %} {% endwith %} {% endwith %} {% endblock %}