{% extends 'diary/day_base.html' %} {% load static %} {% load diary_tags %} {% block diary_head_extra %} {{ block.super }} {% endblock diary_head_extra %} {% block diary_nav %} {% url 'diary:multi_day_nav' slug=nav_slug change='next' as diary_nav_next %} {% url 'diary:multi_day_nav' slug=nav_slug change='prev' as diary_nav_prev %} {% url 'diary:month' year=date.year month=date.month as diary_nav_up %} {{ block.super }} {% endblock diary_nav %} {% block diary_title %} {{ date.year }} {{ date_start_head }} - {{ date_end_head }} {% endblock diary_title %} {% block diary_content %} {{ block.super }}
Time
{% for date, day_header, date_slug in date_slots %}
{{ day_header }}
{% endfor %}
{% for label, start_time, day_entries in time_slots %}
{{ label }}
{% for datetime_slug, entries, current, trading, historic, advance, allow_dnd in day_entries %}
{% url 'diary:entry_new' slug=datetime_slug as new_entry %} {% for entry in entries %} {% if not request.user.is_staff and entry.no_show %} {% elif not request.user.is_staff and request.user.username != entry.customer.username and entry.cancelled %} {% elif not request.user.is_staff and request.user.username != entry.customer.username and not entry.resource %} {% else %}
{% with fg_color="black" bg_color="white" %} {% if entry.resource %} {% update_variable entry.resource.fg_color as fg_color %} {% update_variable entry.resource.bg_color as bg_color %} {% endif %}
{{ entry.customer }} {% elif request.user.username == entry.customer.username and entry.no_show %} disabled="False" > {{ entry.customer }} {% else %} style="background-color: {{ bg_color }}; color: {{ fg_color }};" disabled="False" > {{ entry.resource.name }} In Use {% endif %}
{% endwith %}
{% endif %} {% endfor %}
{% endfor %}
{% endfor %}
{% endblock diary_content %}