From 078273eb7db5a481a4131d44a943f3c9e34b6b88 Mon Sep 17 00:00:00 2001 From: Parker Berberian Date: Thu, 30 Jan 2020 13:33:35 -0500 Subject: Adds Template Overrides Changes the structure of the template directories to allow a new project to define their own set of override templates that inherit from a common base. I have slightly modified landing.html here as an example. In comming changes we will try to move all the "laas" specific content into the laas directory Change-Id: I46151be182de901f870debb247b305ea34ae77ba Signed-off-by: Parker Berberian --- src/templates/notifier/email_ended.txt | 25 -------- src/templates/notifier/email_expiring.txt | 25 -------- src/templates/notifier/email_fulfilled.txt | 21 ------- src/templates/notifier/end_booking.html | 36 ------------ src/templates/notifier/expiring_booking.html | 35 ----------- src/templates/notifier/inbox.html | 87 ---------------------------- src/templates/notifier/new_booking.html | 34 ----------- src/templates/notifier/notification.html | 50 ---------------- 8 files changed, 313 deletions(-) delete mode 100644 src/templates/notifier/email_ended.txt delete mode 100644 src/templates/notifier/email_expiring.txt delete mode 100644 src/templates/notifier/email_fulfilled.txt delete mode 100644 src/templates/notifier/end_booking.html delete mode 100644 src/templates/notifier/expiring_booking.html delete mode 100644 src/templates/notifier/inbox.html delete mode 100644 src/templates/notifier/new_booking.html delete mode 100644 src/templates/notifier/notification.html (limited to 'src/templates/notifier') diff --git a/src/templates/notifier/email_ended.txt b/src/templates/notifier/email_ended.txt deleted file mode 100644 index 1788e00..0000000 --- a/src/templates/notifier/email_ended.txt +++ /dev/null @@ -1,25 +0,0 @@ -{{user_name|default:"Developer"}}, - -{% if owner %} -The booking you requested from the OPNFV Lab as a Service has ended. -{% else %} -The booking you collaborated on at the OPNFV Lab as a Service has ended. -{% endif %} - -booking information: - start: {{booking.start}} - end: {{booking.end}} - machines: - {% for host in hosts %} - - {{host}} - {% endfor %} - purpose: {{booking.purpose}} - -You may visit the following link for more information: -{{booking_url}} - -Feel free to create another booking with us! - -Thank you for contributing to the OPNFV platform! - - - The Lab-as-a-Service team diff --git a/src/templates/notifier/email_expiring.txt b/src/templates/notifier/email_expiring.txt deleted file mode 100644 index 72c9a83..0000000 --- a/src/templates/notifier/email_expiring.txt +++ /dev/null @@ -1,25 +0,0 @@ -{{user_name|default:"Developer"}}, - -{% if owner %} -The booking you requested from the OPNFV Lab as a Service is about to expire. -{% else %} -The booking you collaborate on at the OPNFV Lab as a Service is about to expire. -{% endif %} - -booking information: - start: {{booking.start}} - end: {{booking.end}} - machines: - {% for host in hosts %} - - {{host}} - {% endfor %} - purpose: {{booking.purpose}} - -You may visit the following link for more information: -{{booking_url}} - -Please take the time to backup all data or extend the booking if needed. - -Thank you for contributing to the OPNFV platform! - - - The Lab-as-a-Service team diff --git a/src/templates/notifier/email_fulfilled.txt b/src/templates/notifier/email_fulfilled.txt deleted file mode 100644 index 90d294a..0000000 --- a/src/templates/notifier/email_fulfilled.txt +++ /dev/null @@ -1,21 +0,0 @@ -{{user_name|default:"Developer"}}, - -{% if owner %} -The booking you requested of the OPNFV Lab as a Service has finished deploying and is ready for you to use. -{% else %} -A booking you collaborate on is ready for you to use -{% endif %} - -The lab that fulfilled your booking request has sent you the following messages: - {% for email_message in messages %} - {{ email_message.title }} - {{ email_message.content }} - -------------------- - {% endfor %} - -You may visit the following link for more information: -{{booking_url}} - -Thank you for contributing to the OPNFV platform! - - - The Lab-as-a-Service team diff --git a/src/templates/notifier/end_booking.html b/src/templates/notifier/end_booking.html deleted file mode 100644 index a2981c1..0000000 --- a/src/templates/notifier/end_booking.html +++ /dev/null @@ -1,36 +0,0 @@ - - -
- {% if owner %} -

Your booking has expired

-

Your booking has ended and the machines have been cleaned up.

-

Thank you for working on OPNFV, and feel free to book more machines if you need them.

- {% else %} -

A booking that you collaborated on has expired

-

The booking owned by {{booking.owner.username}} that you worked on has ended

-

Thank you for contributing to OPNFV!

- {% endif %} -

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

-
- - diff --git a/src/templates/notifier/expiring_booking.html b/src/templates/notifier/expiring_booking.html deleted file mode 100644 index 8bfa689..0000000 --- a/src/templates/notifier/expiring_booking.html +++ /dev/null @@ -1,35 +0,0 @@ - - -
- {% 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

-
- - diff --git a/src/templates/notifier/inbox.html b/src/templates/notifier/inbox.html deleted file mode 100644 index 26b6d32..0000000 --- a/src/templates/notifier/inbox.html +++ /dev/null @@ -1,87 +0,0 @@ -{% extends "base.html" %} - - -{% load staticfiles %} - -{% block content %} - -
-
-
-
- - - -
-
-
-
- -
- No messages available -
- {% for notification in unread_notifications %} - - {{ notification }} - - {% endfor %} -
-
- {% for notification in read_notifications %} - - {{ notification }} - - {% endfor %} -
-
- -
- -
-
-
- - -{% endblock %} \ No newline at end of file diff --git a/src/templates/notifier/new_booking.html b/src/templates/notifier/new_booking.html deleted file mode 100644 index 64244e0..0000000 --- a/src/templates/notifier/new_booking.html +++ /dev/null @@ -1,34 +0,0 @@ - - -
- {% if owner %} -

You have created a new booking

-

We have recieved your booking request and will start working on it right away.

- {% else %} -

You have been added as a collaborator to a booking

-

{{booking.owner.username}} has given you access to their booking.

- {% endif %} -

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

-
- - diff --git a/src/templates/notifier/notification.html b/src/templates/notifier/notification.html deleted file mode 100644 index 603edea..0000000 --- a/src/templates/notifier/notification.html +++ /dev/null @@ -1,50 +0,0 @@ -{% extends "layout.html" %} -{% block extrahead %} - -{% endblock %} - -{% block basecontent %} - - -
- {{notification.title}} -
- - -
-
- -

- -{% if not notification.is_html %} -
-{% endif %}
-    {{notification.content|safe}}
-{% if not notification.is_html %}
-
-{% endif %} -
- {% csrf_token %} -
-{% endblock %} -- cgit 1.2.3-korg