From 4be0d0d89bf8ad0f6a012d1578af181fe5f83b0c Mon Sep 17 00:00:00 2001 From: CruiseDevice Date: Fri, 28 Sep 2018 15:27:22 +0530 Subject: Slot booking and password reset functionality added - Password reset - dashboard skeleton for moderator - Slot booking template - Experiment views - update settings.py --- sbhs/templates/account/account_index.html | 2 +- sbhs/templates/account/home.html | 16 +++------ sbhs/templates/base.html | 1 - sbhs/templates/slot/new.html | 56 ++++++++++--------------------- 4 files changed, 24 insertions(+), 51 deletions(-) (limited to 'sbhs/templates') diff --git a/sbhs/templates/account/account_index.html b/sbhs/templates/account/account_index.html index 4b95df0..2d5789a 100644 --- a/sbhs/templates/account/account_index.html +++ b/sbhs/templates/account/account_index.html @@ -11,7 +11,7 @@ {{login_form.as_p}} -   Forgot Password? +   Forgot Password?
diff --git a/sbhs/templates/account/home.html b/sbhs/templates/account/home.html index 16d475a..fa95a26 100644 --- a/sbhs/templates/account/home.html +++ b/sbhs/templates/account/home.html @@ -3,26 +3,20 @@ {% block content %}
- {% if user.profile.is_moderator %} - Show all boards - Show all bookings - Show all images - Test boards - Update MID - Fetch Logs - {% endif %}
-

Welcome to Single Board Heater System Lab

diff --git a/sbhs/templates/base.html b/sbhs/templates/base.html index 3a88c8f..c6294a6 100644 --- a/sbhs/templates/base.html +++ b/sbhs/templates/base.html @@ -35,7 +35,6 @@ {% endfor %}
{% endif %} - {% block content %} {% endblock %}


diff --git a/sbhs/templates/slot/new.html b/sbhs/templates/slot/new.html index 27a0400..ec999c9 100644 --- a/sbhs/templates/slot/new.html +++ b/sbhs/templates/slot/new.html @@ -1,5 +1,6 @@ {% extends "account/home.html" %} {% load staticfiles %} +{% load custom_filter %} {% load widget_tweaks %} {% block title %} Book Slot @@ -26,46 +27,22 @@
-

Book Slot

+
+

Book future slots:

+
{% csrf_token %} - {% for field in form %} - {% if field.errors %} -
- -
- {{field}} - - {% for error in field.errors %} - {{error}} - {% endfor %} - -
-
- {% else %} -
-
- -
- {{field}} - {% if field.help_text %} -

- {{field.help_text}} -

- {% endif %} -
-
- -
- {% endif %} - {% endfor %} - + Book for a given date:
+ {{form.as_p}} +
+
OR
+ Book for current date and time
+ +
+
+
@@ -91,9 +68,12 @@ {% endif %} {{h.start_time}} - {{h.duration}} - {%if h.start_time >= now %} + {{h.end_time}} + {% compare_slot_time h.start_time h.end_time now as slot_status %} + {%if slot_status == "pending" %}

Pending

+ {% elif slot_status == "ongoing" %} +

Ongoing

{% else %}

Finished

{% endif %} -- cgit