Skip to content

Commit

Permalink
Display all upcoming unconfirmed reservations in own calendar view an…
Browse files Browse the repository at this point in the history
…d clean up.
  • Loading branch information
krzywon committed Nov 3, 2020
1 parent 356f687 commit 107afa5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 9 deletions.
2 changes: 2 additions & 0 deletions NEMO/templates/calendar/calendar.html
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
10 changes: 5 additions & 5 deletions NEMO/templates/calendar/reservation_event_feed_unconfirmed.html
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}",
Expand All @@ -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 %}
]
7 changes: 3 additions & 4 deletions NEMO/templates/landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,15 @@ <h2>{{ facility_name }} Rules Tutorial</h2>
<div class="row">
{% if user.is_superuser and unconfirmed_reservations %}
<div class="col-lg-4">
<h3>Reservations in-need of review</h3>
<h3>{{ number_unconfirmed }} Reservations Need Review</h3>
{% for r in unconfirmed_reservations %}
<div class="alert {% if r.start < now or not r.confirmed %}alert-danger{% else %}alert-success{% endif %}">
{% if r.title %}<b>{{ r.title }}</b><br>{% endif %}
<b>{{ r.reservation_item }} - Awaiting Confirmation</b><br>

<b>{{ r.reservation_item }} {% if r.title %}<b>- {{ r.title }} </b><br>{% endif %}- {{ r.user }} - Awaiting Confirmation</b><br>
Starting on {{ r.start|date:"l, F jS @ g:i A" }}<br>
Ending on {{ r.end|date:"l, F jS @ g:i A" }}
</div>
{% endfor %}
See all {{ number_unconfirmed }} in the 'Confirmation window' in the calendar
</div>
{% endif %}
{% if upcoming_reservations %}
Expand Down

0 comments on commit 107afa5

Please # to comment.