From 6be40a5f2d75b157cf2a2374f2f866f6fdc92b18 Mon Sep 17 00:00:00 2001 From: Brandon Lo Date: Tue, 26 Nov 2019 16:39:26 -0500 Subject: Add warning email and notification This adds the abandoned changes made to the notification system and also adds a simple task to check for expiring bookings and sends out emails and notifications. Change-Id: I1530d19f41cf93626bb642e6b269f9ec55860b81 Signed-off-by: Brandon Lo --- src/templates/notifier/expiring_booking.html | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/templates/notifier/expiring_booking.html (limited to 'src/templates/notifier/expiring_booking.html') diff --git a/src/templates/notifier/expiring_booking.html b/src/templates/notifier/expiring_booking.html new file mode 100644 index 0000000..8bfa689 --- /dev/null +++ b/src/templates/notifier/expiring_booking.html @@ -0,0 +1,35 @@ + + +
+ {% if owner %} +

Your booking is about to expire

+

Your booking will expire within 48 hours ({{booking.end}}).

+ {% else %} +

A booking that you collaborate on is about to expire

+

The booking owned by {{booking.owner.username}} that you work on is about to expire

+ {% endif %} +

Please take the time to backup all data or extend the booking if needed.

+

Booking information:

+
    +
  • owner: {{booking.owner.username}}
  • +
  • id: {{booking.id}}
  • +
  • lab: {{booking.resource.template.lab.lab_user.username}}
  • +
  • resource: {{booking.resource.template.name}}
  • +
  • start: {{booking.start}}
  • +
  • end: {{booking.end}}
  • +
  • purpose: {{booking.purpose}}
  • +
  • collaborators: +
      + {% for user in booking.collaborators.all %} +
    • user.username
    • + {% empty %} +
    • No collaborators
    • + {% endfor %} +
    +
  • +
+ +

You can find more detailed information Here

+
+ + -- cgit 1.2.3-korg