From 107afa578b1be76aee7fe85fa02b4ea2aa439982 Mon Sep 17 00:00:00 2001 From: krzywon Date: Tue, 3 Nov 2020 14:19:38 -0500 Subject: [PATCH] Display all upcoming unconfirmed reservations in own calendar view and clean up. --- NEMO/templates/calendar/calendar.html | 2 ++ .../calendar/reservation_event_feed_unconfirmed.html | 10 +++++----- NEMO/templates/landing.html | 7 +++---- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/NEMO/templates/calendar/calendar.html b/NEMO/templates/calendar/calendar.html index 367ee652..1782b716 100644 --- a/NEMO/templates/calendar/calendar.html +++ b/NEMO/templates/calendar/calendar.html @@ -587,6 +587,8 @@ } else if(event_type === "confirmation window") { + user_search.hide(); + chosen_user_button.hide(); extra_links.hide(); expand_collapse.hide(); item_search.hide(); diff --git a/NEMO/templates/calendar/reservation_event_feed_unconfirmed.html b/NEMO/templates/calendar/reservation_event_feed_unconfirmed.html index c40047bf..8c236ebd 100644 --- a/NEMO/templates/calendar/reservation_event_feed_unconfirmed.html +++ b/NEMO/templates/calendar/reservation_event_feed_unconfirmed.html @@ -2,14 +2,14 @@ {% for x in events %} { {% if x.tool %} - "title": "{{ x.reservation_item.name }}{% if x.title %}, titled \"{{ x.title }}\"{% endif %}", + "title": "{{ x.user }}{{ x.reservation_item.name }}{% if x.title %}, titled \"{{ x.title }}\"{% endif %}", "color": "#FA8072", {% elif x.area %} - "title": "{{ x.reservation_item.name}}{% if x.title %}, titled \"{{ x.title }}\"{% endif %}", + "title": "{{ x.user }}{{ x.reservation_item.name}}{% if x.title %}, titled \"{{ x.title }}\"{% endif %}", "color": "#E9967A", {% else %} "title": "{{ x.user }}{% if x.title %}, titled \"{{ x.title }}\"{% endif %}", - "color": {% if x.user.id == user.id %}"#DC143C"{% else %}"#FFA07A"{% endif %}, + "color": "#FFA07A", {% endif %} {% if x.creator.id == x.user.id %} "tooltip": "{{ x.reservation_item.name }} reservation for {{ x.user }}", @@ -18,10 +18,10 @@ {% endif %} "id": "Reservation {{ x.id }}", {# The reservation creator or staff may edit the event: #} - {% if user.id == x.user.id or user.is_staff %}"editable": true,{% endif %} + "editable": true, "start": "{{ x.start|date:"c" }}", "end": "{{ x.get_visual_end|date:"c" }}", "details_url": "{% url 'reservation_details' x.id %}" - } + }{% if not forloop.last %},{% endif %} {% endfor %} ] \ No newline at end of file diff --git a/NEMO/templates/landing.html b/NEMO/templates/landing.html index a3d2ed1b..47ecc905 100644 --- a/NEMO/templates/landing.html +++ b/NEMO/templates/landing.html @@ -22,16 +22,15 @@

{{ facility_name }} Rules Tutorial

{% if user.is_superuser and unconfirmed_reservations %}
-

Reservations in-need of review

+

{{ number_unconfirmed }} Reservations Need Review

{% for r in unconfirmed_reservations %}
- {% if r.title %}{{ r.title }}
{% endif %} - {{ r.reservation_item }} - Awaiting Confirmation
+ + {{ r.reservation_item }} {% if r.title %}- {{ r.title }}
{% endif %}- {{ r.user }} - Awaiting Confirmation

Starting on {{ r.start|date:"l, F jS @ g:i A" }}
Ending on {{ r.end|date:"l, F jS @ g:i A" }}
{% endfor %} - See all {{ number_unconfirmed }} in the 'Confirmation window' in the calendar
{% endif %} {% if upcoming_reservations %}