From 1c4a9a7e1c0c08de08e6e95ea4fd403eab78a913 Mon Sep 17 00:00:00 2001 From: pnshiralkar Date: Tue, 5 May 2020 12:38:00 +0530 Subject: Workshop status view for instructor done --- .../templates/workshop_app/workshop_status.html | 150 ++++++++------------- 1 file changed, 56 insertions(+), 94 deletions(-) (limited to 'workshop_app/templates') diff --git a/workshop_app/templates/workshop_app/workshop_status.html b/workshop_app/templates/workshop_app/workshop_status.html index b6e3731..28d95b7 100644 --- a/workshop_app/templates/workshop_app/workshop_status.html +++ b/workshop_app/templates/workshop_app/workshop_status.html @@ -29,16 +29,16 @@ // Change date modal function changeDate(date) { - var previous_date = new Date(date); - var dateToday = new Date(); - var upto = new 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); - if (date[0] == 'P') { - var counter = date.split(" "); - var id = counter.slice(-1).pop(); + let counter = date.split(" "); + const id = counter.slice(-1).pop(); + if (date[0] === 'P') { counter = '.pDate' + id $(counter).datepicker({ changeMonth: true, @@ -51,8 +51,6 @@ $('.myDialogP' + id).dialog(); } else { - var counter = date.split(" "); - var id = counter.slice(-1).pop(); counter = '.rDate' + id; $(counter).datepicker({ changeMonth: true, @@ -73,7 +71,7 @@ {% block content %} {% if workshops %} -

The status of your workshops

+

The status of your workshops


@@ -83,42 +81,36 @@ - {% if request.user.profile.position == 'instructor' %} - - - {% else %} - - {% endif %} + + - {% csrf_token %} {% for workshop in workshops %} - {% if workshop.status == 1 and workshop.workshop_type %} - {% if request.user.profile.position == 'instructor' %} - - - {% else %} - - {% endif %} + {% if workshop.status %} + + - {% if workshop.date > today %} - - {% else %} - - {% endif %} + {% endif %} + {% endif %} @@ -144,60 +134,44 @@
- - {% if request.user.profile.position == 'instructor' %} -

Workshops Proposed By Coordinators -

- {% else %} -

Workshops Proposed By Me

- {% endif %} +

Workshops Proposed By Coordinators +

Coordinator NameInstituteInstructor NameCoordinator NameInstitute Workshop Name Workshop Day Status
- - {{ workshop.coordinator.get_full_name }}{{ workshop.coordinator.profile.institute }}{{ workshop.instructor.get_full_name }} + + {{ workshop.coordinator.get_full_name }} + {{ workshop.coordinator.profile.institute }} {{ workshop.workshop_type |capfirst }}{{ workshop.date | date }} - {{ workshop.date | date }} + + {% if workshop.date > today %} + event - {{ workshop.date | date }} {{ workshop.get_status }}
- {% if request.user.profile.position == 'instructor' %} - - - {% else %} - - {% endif %} + + - {% if request.user.profile.position == 'instructor' %} - - {% endif %} + {% csrf_token %} {% for workshop in workshops %} - {% if workshop.status == 0 and workshop.tnc_accepted %} - {% if request.user.profile.position == 'instructor' %} - - - - {% endif %} + {% if not workshop.status and workshop.tnc_accepted %} + + - - {% if request.user.profile.position == 'instructor' and workshop.status == 0 %} - - {% endif %} + {% endif %} @@ -206,29 +180,17 @@
Coordinator NameInstituteCoordinator NameInstitute Workshop Name Workshop Day StatusActionAction
- - {{ workshop.coordinator.get_full_name }}{{ workshop.coordinator.profile.institute }} + + {{ workshop.coordinator.get_full_name }} + {{ workshop.coordinator.profile.institute }} {{ workshop.workshop_type }} {{ workshop.date | date }}{{ workshop.get_status }} -
- - - {% csrf_token %} - -
-
+
+ + + {% csrf_token %} + +
+
- - + {% else %} - {% if request.user.profile.position == 'instructor' %} -
-
-

Welcome {{ user.first_name }}

-

Your workshop related information will be shown here, Please navigate to Workshop list and - depending upon - your expertise and availability create a workshop by going to - Create Workshop.

-
-
- {% else %} -
-
-

Welcome {{ user.first_name }}

-

Information Related to your workshops will be shown here, you can also - propose a Workshop as per your available date in Workshops > Propose a Workshop - tab .

-
+
+
+

Welcome {{ user.first_name }}

+

Your workshop related information will be shown here, Please navigate to Workshop list and + depending upon + your expertise and availability create a workshop by going to + Create Workshop.

- {% endif %} +
{% endif %} {% endblock %} -- cgit