summaryrefslogtreecommitdiff
path: root/workshop_app/templates
diff options
context:
space:
mode:
authorpnshiralkar2020-05-06 12:37:25 +0530
committerpnshiralkar2020-05-06 12:37:25 +0530
commit0fcf9d662c4768729f5d11553cc07659bd7f97a7 (patch)
tree5cfc25bbdbda240fdd5c1df3dfff451f35ce9f7a /workshop_app/templates
parentcf18825bf8fcdff60e0f622e4f7ff8e403331066 (diff)
downloadworkshop_booking-0fcf9d662c4768729f5d11553cc07659bd7f97a7.tar.gz
workshop_booking-0fcf9d662c4768729f5d11553cc07659bd7f97a7.tar.bz2
workshop_booking-0fcf9d662c4768729f5d11553cc07659bd7f97a7.zip
Refractored workshopstatus views
Diffstat (limited to 'workshop_app/templates')
-rw-r--r--workshop_app/templates/workshop_app/workshop_status_coordinator.html (renamed from workshop_app/templates/workshop_app/my_workshops.html)21
-rw-r--r--workshop_app/templates/workshop_app/workshop_status_instructor.html (renamed from workshop_app/templates/workshop_app/workshop_status.html)82
2 files changed, 23 insertions, 80 deletions
diff --git a/workshop_app/templates/workshop_app/my_workshops.html b/workshop_app/templates/workshop_app/workshop_status_coordinator.html
index b5b4add..07045de 100644
--- a/workshop_app/templates/workshop_app/my_workshops.html
+++ b/workshop_app/templates/workshop_app/workshop_status_coordinator.html
@@ -5,7 +5,16 @@
{% endblock %}
{% block content %}
- {% if workshops %}
+ {% if not workshops %}
+ <div class="container">
+ <div class="jumbotron">
+ <h1>Welcome {{ user.first_name }}</h1>
+ <p>Information Related to your workshops will be shown here, you can also
+ propose a Workshop as per your available date in <strong>Workshops > Propose a Workshop
+ tab</strong> .</p>
+ </div>
+ </div>
+ {% else %}
<h3 class="text-center" style="color:#2952a2;">The status of your workshops </h3>
<br>
@@ -67,16 +76,6 @@
{% endfor %}
</table>
</div>
-
- {% else %}
- <div class="container">
- <div class="jumbotron">
- <h1>Welcome {{ user.first_name }}</h1>
- <p>Information Related to your workshops will be shown here, you can also
- propose a Workshop as per your available date in <strong>Workshops > Propose a Workshop
- tab</strong> .</p>
- </div>
- </div>
{% endif %}
{% endblock %}
diff --git a/workshop_app/templates/workshop_app/workshop_status.html b/workshop_app/templates/workshop_app/workshop_status_instructor.html
index b2b17ee..0a246b3 100644
--- a/workshop_app/templates/workshop_app/workshop_status.html
+++ b/workshop_app/templates/workshop_app/workshop_status_instructor.html
@@ -10,67 +10,23 @@
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
{% endblock %}
{% block extra-custom-scripts %}
- <script>
- //ToolTip popup function on-hover
- $(document).ready(function () {
- $('[data-toggle="popover"]').popover({
- placement: 'top',
- trigger: 'hover'
- });
- });
-
- //ToolTip popup function on-hover
- $(document).ready(function () {
- $('[data-toggle="popinfo"]').popover({
- placement: 'top',
- trigger: 'hover'
- });
- });
-
- // Change date modal
- function changeDate(date) {
- let previous_date = new Date(date);
- let dateToday = new Date();
- let upto = new Date();
-
- previous_date.setDate(previous_date.getDate() + 1);
- upto.setFullYear(dateToday.getFullYear() + 1);
-
- let counter = date.split(" ");
- const id = counter.slice(-1).pop();
- if (date[0] === 'P') {
- counter = '.pDate' + id
- $(counter).datepicker({
- changeMonth: true,
- changeYear: true,
- minDate: dateToday,
- maxDate: upto,
- dateFormat: "yy-mm-dd",
- });
- $(".ui-dialog-content").dialog("close");
- $('.myDialogP' + id).dialog();
-
- } else {
- counter = '.rDate' + id;
- $(counter).datepicker({
- changeMonth: true,
- changeYear: true,
- minDate: dateToday,
- maxDate: upto,
- dateFormat: "yy-mm-dd",
- });
- $(".ui-dialog-content").dialog("close");
- $('.myDialogR' + id).dialog();
-
- }
- };
-
- </script>
+ {% load static %}
+ <script src="{% static 'workshop_app/js/datepicker.js' %}"></script>
{% endblock %}
{% block content %}
- {% if workshops %}
+ {% if not workshops %}
+ <div class="container">
+ <div class="jumbotron">
+ <h1>Welcome {{ user.first_name }}</h1>
+ <p>Your workshop related information will be shown here, Please navigate to <b>Workshop list</b> and
+ depending upon
+ your expertise and availability create a workshop by going to
+ <b>Create Workshop</b>.</p>
+ </div>
+ </div>
+ {% else %}
<h3 class="text-center" style="color:#2952a2;">The status of your workshops </h3>
<br>
@@ -173,18 +129,6 @@
{% endfor %}
</table>
</div>
-
- <!-- No workshops for the user -->
- {% else %}
- <div class="container">
- <div class="jumbotron">
- <h1>Welcome {{ user.first_name }}</h1>
- <p>Your workshop related information will be shown here, Please navigate to <b>Workshop list</b> and
- depending upon
- your expertise and availability create a workshop by going to
- <b>Create Workshop</b>.</p>
- </div>
- </div>
{% endif %}
{% endblock %}