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/base/account/booking_list.html | 146 +++++++++++++++++++++ src/templates/base/account/configuration_list.html | 80 +++++++++++ src/templates/base/account/details.html | 9 ++ src/templates/base/account/image_list.html | 132 +++++++++++++++++++ src/templates/base/account/resource_list.html | 124 +++++++++++++++++ src/templates/base/account/user_list.html | 55 ++++++++ .../base/account/userprofile_update_form.html | 31 +++++ 7 files changed, 577 insertions(+) create mode 100644 src/templates/base/account/booking_list.html create mode 100644 src/templates/base/account/configuration_list.html create mode 100644 src/templates/base/account/details.html create mode 100644 src/templates/base/account/image_list.html create mode 100644 src/templates/base/account/resource_list.html create mode 100644 src/templates/base/account/user_list.html create mode 100644 src/templates/base/account/userprofile_update_form.html (limited to 'src/templates/base/account') diff --git a/src/templates/base/account/booking_list.html b/src/templates/base/account/booking_list.html new file mode 100644 index 0000000..f9234bc --- /dev/null +++ b/src/templates/base/account/booking_list.html @@ -0,0 +1,146 @@ +{% extends "base.html" %} +{% block content %} +

Bookings I Own

+
+ {% for booking in bookings %} +
+
+
+

Booking {{booking.id}}

+
+
    +
  • id: {{booking.id}}
  • +
  • lab: {{booking.lab}}
  • +
  • resource: {{booking.resource.template.name}}
  • +
  • start: {{booking.start}}
  • +
  • end: {{booking.end}}
  • +
  • purpose: {{booking.purpose}}
  • +
+ +
+
+ {% empty %} +
+

You don't have any bookings. You can create a booking by booking a pod.

+
+ {% endfor %} +
+ +

Bookings I Collaborate On

+
+ + {% for booking in collab_bookings %} +
+
+
+

Booking {{booking.id}}

+
+
    +
  • id: {{booking.id}}
  • +
  • lab: {{booking.lab}}
  • +
  • resource: {{booking.resource.template.name}}
  • +
  • start: {{booking.start}}
  • +
  • end: {{booking.end}}
  • +
  • purpose: {{booking.purpose}}
  • +
+ +
+
+ {% empty %} +
+

There are no collaborative bookings.

+
+ {% endfor %} +
+ + + Expired Bookings + + +
+ {% for booking in expired_bookings %} +
+
+
+

Booking {{booking.id}}

+
+
    +
  • id: {{booking.id}}
  • +
  • lab: {{booking.lab}}
  • +
  • resource: {{booking.resource.template.name}}
  • +
  • start: {{booking.start}}
  • +
  • end: {{booking.end}}
  • +
  • purpose: {{booking.purpose}}
  • +
  • owner: {{booking.owner.userprofile.email_addr}}
  • +
+ +
+
+ {% empty %} +
+

There are no expired bookings.

+
+ {% endfor %} +
+ + + + +{% endblock %} diff --git a/src/templates/base/account/configuration_list.html b/src/templates/base/account/configuration_list.html new file mode 100644 index 0000000..206c203 --- /dev/null +++ b/src/templates/base/account/configuration_list.html @@ -0,0 +1,80 @@ +{% extends "base.html" %} +{% block content %} +
+{% for config in configurations %} +
+
+
+

Configuration {{config.id}}

+
+
    +
  • id: {{config.id}}
  • +
  • name: {{config.name}}
  • +
  • description: {{config.description}}
  • +
  • resource: {{config.bundle}}
  • +
+ +
+
+{% empty %} +
+

You don't have any configurations. You can create a configuration by configuring a pod.

+
+{% endfor %} +
+ + + + +{% endblock %} diff --git a/src/templates/base/account/details.html b/src/templates/base/account/details.html new file mode 100644 index 0000000..3092ad0 --- /dev/null +++ b/src/templates/base/account/details.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} +{% load staticfiles %} +{% block content %} +

Account Details

+My Resources +My Bookings +My Configurations +My Snapshots +{% endblock content %} diff --git a/src/templates/base/account/image_list.html b/src/templates/base/account/image_list.html new file mode 100644 index 0000000..6263016 --- /dev/null +++ b/src/templates/base/account/image_list.html @@ -0,0 +1,132 @@ +{% extends "base.html" %} +{% block content %} +

Images I Own

+
+{% for image in images %} +
+
+
+

Image {{image.id}}

+
+
    +
  • id: {{image.id}}
  • +
  • lab: {{image.from_lab.name}}
  • +
  • name: {{image.name}}
  • +
  • description: {{image.description}}
  • +
  • host profile: {{image.host_type.name}}
  • +
+ +
+
+{% empty %} +
+

You don't have any images. You can create an image by creating a snapshot.

+
+{% endfor %} +
+ +

Public Images

+
+ {% for image in public_images %} +
+
+
+

Image {{image.id}}

+
+
    +
  • id: {{image.id}}
  • +
  • lab: {{image.from_lab.name}}
  • +
  • name: {{image.name}}
  • +
  • description: {{image.description}}
  • +
  • host profile: {{image.host_type.name}}
  • +
+
+
+ {% empty %} +
+

There are no public images.

+
+ {% endfor %} +
+ + + +{% endblock %} diff --git a/src/templates/base/account/resource_list.html b/src/templates/base/account/resource_list.html new file mode 100644 index 0000000..65b46f1 --- /dev/null +++ b/src/templates/base/account/resource_list.html @@ -0,0 +1,124 @@ +{% extends "base.html" %} +{% block content %} +
+{% for resource in resources %} +
+
+
+

Resource {{resource.id}}

+
+
    +
  • id: {{resource.id}}
  • +
  • name: {{resource.name}}
  • +
  • description: {{resource.description}}
  • +
+ +
+
+{% empty %} +
+

You don't have any resources. You can create a resource by designing a pod.

+
+{% endfor %} +
+ + + +{% endblock %} diff --git a/src/templates/base/account/user_list.html b/src/templates/base/account/user_list.html new file mode 100644 index 0000000..e564524 --- /dev/null +++ b/src/templates/base/account/user_list.html @@ -0,0 +1,55 @@ +{% extends "dashboard/table.html" %} +{% load staticfiles %} + +{% block table %} + + + Username + Full Name + Email + Company + SSH Key + GPG Key + + + + {% for user in users %} + + + {{ user.username }} + + + {{ user.userprofile.full_name }} + + + {{ user.userprofile.email_addr }} + + + {{ user.userprofile.company }} + + + {% if user.userprofile.ssh_public_key %} + SSH + {% endif %} + + + {% if user.userprofile.pgp_public_key %} + GPG + {% endif %} + + + {% endfor %} + +{% endblock table %} + + +{% block tablejs %} + +{% endblock tablejs %} diff --git a/src/templates/base/account/userprofile_update_form.html b/src/templates/base/account/userprofile_update_form.html new file mode 100644 index 0000000..16a8270 --- /dev/null +++ b/src/templates/base/account/userprofile_update_form.html @@ -0,0 +1,31 @@ +{% extends "base.html" %} +{% load bootstrap4 %} + +{% block content %} +
+
+ {% bootstrap_messages %} + +
+
+{% endblock content %} -- cgit 1.2.3-korg