{% extends 'diary/day_base.html' %} {% load diary_tags %} {% block diary_nav %} {% url 'diary:day_nav' slug=nav_slug change='next' as diary_nav_next %} {% url 'diary:day_nav' slug=nav_slug change='prev' as diary_nav_prev %} {% url 'diary:multi_day' slug=nav_slug as diary_nav_up %} {{ block.super }} {% endblock diary_nav %} {% block diary_title %} {{ date.day }} {{ month_name }} {{ date.year }} {% endblock diary_title %} {% block diary_content %} {{ block.super }}
{% for label, datetime_slug, start_time, entries, current, trading, historic, advance, allow_dnd in time_slots %}
{{ label }}
{% 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 }} - {{ entry.short }} {% elif request.user.username == entry.customer.username and entry.no_show %} disabled="False" > {{ entry.customer }} - {{ entry.short }} {% else %} style="background-color: {{ bg_color }}; color: {{ fg_color }};" disabled="False" > {{ entry.resource.name }} In Use {% endif %}
{% endwith %}
{% endif %} {% endfor %}
{% endfor %}
{% endblock diary_content %}