summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCruiseDevice2018-09-28 15:33:18 +0530
committerCruiseDevice2018-09-28 15:33:18 +0530
commita492c52c46be42beb5b93634e314556eb9d61c97 (patch)
tree6d841fe39a834dd48e5a00af2df318e84afa20cc
parent0083475db5652e9817436980984c6ebf83857382 (diff)
downloadsbhs_server-a492c52c46be42beb5b93634e314556eb9d61c97.tar.gz
sbhs_server-a492c52c46be42beb5b93634e314556eb9d61c97.tar.bz2
sbhs_server-a492c52c46be42beb5b93634e314556eb9d61c97.zip
-password reset templates
-dashboard templates -templatetags
-rw-r--r--sbhs/templates/account/registration/password_change_done.html12
-rw-r--r--sbhs/templates/account/registration/password_change_form.html16
-rw-r--r--sbhs/templates/account/registration/password_reset_complete.html11
-rw-r--r--sbhs/templates/account/registration/password_reset_confirm.html20
-rw-r--r--sbhs/templates/account/registration/password_reset_done.html12
-rw-r--r--sbhs/templates/account/registration/password_reset_form.html16
-rw-r--r--sbhs/templates/dashboard/dashboard_index.html55
-rw-r--r--sbhs/templatetags/__init__.py0
-rw-r--r--sbhs/templatetags/custom_filter.py15
9 files changed, 157 insertions, 0 deletions
diff --git a/sbhs/templates/account/registration/password_change_done.html b/sbhs/templates/account/registration/password_change_done.html
new file mode 100644
index 0000000..6641ef7
--- /dev/null
+++ b/sbhs/templates/account/registration/password_change_done.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block title %}Password changed{% endblock %}
+
+{% block content %}
+ <div class = "container">
+ <h1>Password changed</h1>
+ <p>Your password has been successfully changed.</p>
+ </div>
+
+{% endblock %}
+
diff --git a/sbhs/templates/account/registration/password_change_form.html b/sbhs/templates/account/registration/password_change_form.html
new file mode 100644
index 0000000..6fc6546
--- /dev/null
+++ b/sbhs/templates/account/registration/password_change_form.html
@@ -0,0 +1,16 @@
+{% extends "base.html" %}
+
+{% block title %}Change you password{% endblock %}
+
+{% block content %}
+ <div class = "container">
+ <h1>Change you password</h1>
+ <p>Use the form below to change your password.</p>
+ <form action="." method="post">
+ {{ form.as_p }}
+ <p><input type="submit" class = "btn btn-inverse" value="Change"></p>
+ {% csrf_token %}
+ </form>
+ </div>
+
+{% endblock %}
diff --git a/sbhs/templates/account/registration/password_reset_complete.html b/sbhs/templates/account/registration/password_reset_complete.html
new file mode 100644
index 0000000..0fdf106
--- /dev/null
+++ b/sbhs/templates/account/registration/password_reset_complete.html
@@ -0,0 +1,11 @@
+{% extends "base.html" %}
+
+{% block title %}Password reset{% endblock %}
+
+{% block content %}
+ <div class = "container">
+ <h1>Password set</h1>
+ <p>Your password has been set. You can <a href="{% url "account_login" %}">log in now</a>
+ </div>
+
+{% endblock %}
diff --git a/sbhs/templates/account/registration/password_reset_confirm.html b/sbhs/templates/account/registration/password_reset_confirm.html
new file mode 100644
index 0000000..020529a
--- /dev/null
+++ b/sbhs/templates/account/registration/password_reset_confirm.html
@@ -0,0 +1,20 @@
+{% extends "base.html" %}
+
+{% block title %}Reset your password{% endblock %}
+
+{% block content %}
+ <div class = "container">
+ <h1>Reset your password</h1>
+ {% if validlink %}
+ <p>Please enter your new password twice:</p>
+ <form action="." method="post">
+ {{ form.as_p }}
+ {% csrf_token %}
+ <p><input type="submit" class = "btn btn-inverse" value="Change my password" /></p>
+ </form>
+ {% else %}
+ <p>The password reset link was invalid, possibly because it has already been used. Please request a new password reset.</p>
+ {% endif %}
+ </div>
+
+{% endblock %}
diff --git a/sbhs/templates/account/registration/password_reset_done.html b/sbhs/templates/account/registration/password_reset_done.html
new file mode 100644
index 0000000..cc4c316
--- /dev/null
+++ b/sbhs/templates/account/registration/password_reset_done.html
@@ -0,0 +1,12 @@
+{% extends "base.html" %}
+
+{% block title %}Reset your password{% endblock %}
+
+{% block content %}
+ <div class = "container">
+ <h1>Reset your password</h1>
+ <p>We've emailed you instructions for setting your password.</p>
+ <p>If you don't receive an email, please make sure you've entered the address you registered with.</p>
+ </div>
+
+{% endblock %}
diff --git a/sbhs/templates/account/registration/password_reset_form.html b/sbhs/templates/account/registration/password_reset_form.html
new file mode 100644
index 0000000..545d6d6
--- /dev/null
+++ b/sbhs/templates/account/registration/password_reset_form.html
@@ -0,0 +1,16 @@
+{% extends "base.html" %}
+
+{% block title %}Reset your password{% endblock %}
+
+{% block content %}
+ <div class = "container">
+ <h1>Forgotten your password?</h1>
+ <p>Enter your e-mail address to obtain a new password.</p>
+ <form action="." method="post">
+ {{ form.as_p }}
+ <p><input type="submit" class = "btn btn-inverse" value="Send e-mail"></p>
+ {% csrf_token %}
+ </form>
+ </div>
+
+{% endblock %}
diff --git a/sbhs/templates/dashboard/dashboard_index.html b/sbhs/templates/dashboard/dashboard_index.html
new file mode 100644
index 0000000..679e460
--- /dev/null
+++ b/sbhs/templates/dashboard/dashboard_index.html
@@ -0,0 +1,55 @@
+{% extends "account/home.html" %}
+{% block title %}
+ Dashboard
+{% endblock %}
+{% block content %}
+ <div class="container">
+ <div class="row">
+ <div class="span12" style="position: relative;top: 1.3em;">
+ <ul class="nav nav-pills">
+ <li id=""><a href="">Show all Boards</a></li>
+ <li id=""><a href="">Show all Bookings</a></li>
+ <li id=""><a href="">Show all Images</a></li>
+ <li id=""><a href="">Test Boards</a></li>
+ <li id=""><a href="">Update MID</a></li>
+ <li id=""><a href="">Fetch Logs</a></li>
+ <li id=""><a href="">Download Experiment Directory</a></li>
+ <li id=""><a href="">Turn On all Boards</a></li>
+ <li id=""><a href="">Turn Off all Boards</a></li>
+ <li id=""><a href="">Book All Slots</a></li>
+ <br><br>
+ </ul>
+ </div>
+
+ <div class="span12">
+ <h4>MID allotment mode is . <small>Change to <a href=""></a></small></h4>
+ <h1>Board Status</h1>
+ <table class="table table-bordered">
+ <thead>
+ <tr>
+ <th>Board MID</th>
+ <th>Status</th>
+ <th>Power Status</th>
+ <th>Webcam</th>
+ <th>Temperature Profile</th>
+ <th>Download Logs</th>
+
+ </tr>
+ </thead>
+ <tbody>
+ {% for b in boards %}
+ <tr>
+ <td class = "board_id">{{ b.mid }}</td>
+ <td><span style="cursor: pointer;" class="label label-{% if not b.online %}important{% elif b.temp_offline %}warning{% else %}success{% endif %}">{% if not b.online %}Offline{% elif b.temp_offline %}Temp Offline{% else %}Online{% endif %}</span></td>
+ <td><span style = "cursor: pointer;" class = "label {% if not b.power_status %}danger{% else %}success{% endif %}">{% if not b.power_status %}OFF{% else %}ON{% endif %}</span></td>
+ <td><a href="{% url 'webcam_show_video_to_admin' b.mid %}" target="_blank">View image</a></td>
+ <td><a href="{% url 'admin_profile' b.mid %}">View</a></td>
+ <td><a href="{% url 'admin_logs' b.mid %}">Download</a></td>
+ </tr>
+ {% endfor %}
+ </tbody>
+ </table>
+ </div>
+ </div>
+</div>
+{% endblock %} \ No newline at end of file
diff --git a/sbhs/templatetags/__init__.py b/sbhs/templatetags/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/sbhs/templatetags/__init__.py
diff --git a/sbhs/templatetags/custom_filter.py b/sbhs/templatetags/custom_filter.py
new file mode 100644
index 0000000..17ab4cc
--- /dev/null
+++ b/sbhs/templatetags/custom_filter.py
@@ -0,0 +1,15 @@
+from django import template
+from django.template.defaultfilters import stringfilter
+
+register = template.Library()
+
+@register.simple_tag
+def compare_slot_time(start_time, end_time, now):
+ slot = "pending"
+ if start_time <= now <= end_time:
+ slot ="ongoing"
+ elif start_time >= now:
+ slot ="pending"
+ else:
+ slot = "finished"
+ return slot \ No newline at end of file