From 0fd8703ca8e0b4caf02df30d6e63320fe6f98338 Mon Sep 17 00:00:00 2001 From: pnshiralkar Date: Tue, 5 May 2020 12:11:12 +0530 Subject: My workshops view for coordinator done --- .../templates/workshop_app/my_workshops.html | 190 ++--------------- .../templates/workshop_app/workshop_status.html | 234 +++++++++++++++++++++ 2 files changed, 253 insertions(+), 171 deletions(-) create mode 100644 workshop_app/templates/workshop_app/workshop_status.html (limited to 'workshop_app/templates') diff --git a/workshop_app/templates/workshop_app/my_workshops.html b/workshop_app/templates/workshop_app/my_workshops.html index b6e3731..b5b4add 100644 --- a/workshop_app/templates/workshop_app/my_workshops.html +++ b/workshop_app/templates/workshop_app/my_workshops.html @@ -1,203 +1,65 @@ {% extends "workshop_app/base.html" %} {% block title %} - Workshop Status + My Workshops {% endblock %} -{% block extra-dependencies %} - - - -{% endblock %} -{% block extra-custom-scripts %} - -{% endblock %} - - {% block content %} {% if workshops %} -

The status of your workshops

+

The status of your workshops


+
-

Workshops Accepted

+

Workshops Accepted

- {% 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 %} - {% endfor %}
Coordinator NameInstituteInstructor NameInstructor Name Workshop Name Workshop Day Status
- - {{ workshop.coordinator.get_full_name }}{{ workshop.coordinator.profile.institute }}{{ workshop.instructor.get_full_name }}{{ workshop.instructor.get_full_name }} {{ workshop.workshop_type |capfirst }}{{ workshop.date | date }} - event - - {{ workshop.date | date }}{{ workshop.date | date }} {{ workshop.get_status }}
- +
- - {% if request.user.profile.position == 'instructor' %} -

Workshops Proposed By Coordinators -

- {% else %} -

Workshops Proposed By Me

- {% endif %} +

Workshops Proposed By Me

- {% 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 +68,15 @@
Coordinator NameInstituteWorkshop Name Workshop Day StatusAction
- - {{ workshop.coordinator.get_full_name }}{{ workshop.coordinator.profile.institute }}{{ workshop.workshop_type }} {{ workshop.date | date }}{{ workshop.get_status }} -
- - - {% 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 }}

+

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 .

- {% endif %} +
{% endif %} {% endblock %} diff --git a/workshop_app/templates/workshop_app/workshop_status.html b/workshop_app/templates/workshop_app/workshop_status.html new file mode 100644 index 0000000..b6e3731 --- /dev/null +++ b/workshop_app/templates/workshop_app/workshop_status.html @@ -0,0 +1,234 @@ +{% extends "workshop_app/base.html" %} + +{% block title %} + Workshop Status +{% endblock %} + +{% block extra-dependencies %} + + + +{% endblock %} +{% block extra-custom-scripts %} + +{% endblock %} + + +{% block content %} + {% if workshops %} +

The status of your workshops

+
+ + +
+
+

Workshops Accepted

+ + + + {% 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.date > today %} + + {% else %} + + {% endif %} + + {% endif %} + + + + {% endfor %} + +
Coordinator NameInstituteInstructor NameWorkshop NameWorkshop DayStatus
+ + {{ workshop.coordinator.get_full_name }}{{ workshop.coordinator.profile.institute }}{{ workshop.instructor.get_full_name }}{{ workshop.workshop_type |capfirst }}{{ workshop.date | date }} + event + + {{ workshop.date | date }}{{ workshop.get_status }}
+
+ + + +
+
+ + {% if request.user.profile.position == 'instructor' %} +

Workshops Proposed By Coordinators +

+ {% else %} +

Workshops Proposed By Me

+ {% endif %} + + + + {% 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 request.user.profile.position == 'instructor' and workshop.status == 0 %} + + {% endif %} + {% endif %} + + + + {% endfor %} +
Coordinator NameInstituteWorkshop NameWorkshop DayStatusAction
+ + {{ workshop.coordinator.get_full_name }}{{ workshop.coordinator.profile.institute }}{{ workshop.workshop_type }}{{ workshop.date | date }}{{ workshop.get_status }} +
+ + + {% 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 .

+
+
+ {% endif %} + {% endif %} + +{% endblock %} -- cgit 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 From d0d6c70c3fb7d4c2f9d2a15da1564288b39251e1 Mon Sep 17 00:00:00 2001 From: pnshiralkar Date: Tue, 5 May 2020 13:12:07 +0530 Subject: Splitting my_workshop view done --- workshop_app/templates/workshop_app/workshop_status.html | 12 +++--------- 1 file changed, 3 insertions(+), 9 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 28d95b7..b2b17ee 100644 --- a/workshop_app/templates/workshop_app/workshop_status.html +++ b/workshop_app/templates/workshop_app/workshop_status.html @@ -108,12 +108,9 @@ onclick="changeDate('R,{{ workshop.date| safe }}, {{ forloop.counter }}')">event