summaryrefslogtreecommitdiff
path: root/workshop_app/templates
diff options
context:
space:
mode:
authorpnshiralkar2020-05-14 16:33:13 +0530
committerpnshiralkar2020-05-14 16:33:13 +0530
commit7ff5c969cf51354acdebf5cc63bf533a0edb977a (patch)
treede6b4b3ec527c9f266b474473775776fb72fb1c0 /workshop_app/templates
parentc72ac71318caf14d559074a4b02f5e14afcff2e0 (diff)
parentc1b55f7a9a3e11ce4363206e86b6be3dfec90dd6 (diff)
downloadworkshop_booking-7ff5c969cf51354acdebf5cc63bf533a0edb977a.tar.gz
workshop_booking-7ff5c969cf51354acdebf5cc63bf533a0edb977a.tar.bz2
workshop_booking-7ff5c969cf51354acdebf5cc63bf533a0edb977a.zip
Resolved merge conflicts
Diffstat (limited to 'workshop_app/templates')
-rw-r--r--workshop_app/templates/workshop_app/my_workshops.html234
-rw-r--r--workshop_app/templates/workshop_app/workshop_status_coordinator.html88
-rw-r--r--workshop_app/templates/workshop_app/workshop_status_instructor.html139
3 files changed, 227 insertions, 234 deletions
diff --git a/workshop_app/templates/workshop_app/my_workshops.html b/workshop_app/templates/workshop_app/my_workshops.html
deleted file mode 100644
index b6e3731..0000000
--- a/workshop_app/templates/workshop_app/my_workshops.html
+++ /dev/null
@@ -1,234 +0,0 @@
-{% extends "workshop_app/base.html" %}
-
-{% block title %}
- Workshop Status
-{% endblock %}
-
-{% block extra-dependencies %}
- <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
- <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
- <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) {
- var previous_date = new Date(date);
- var dateToday = new Date();
- var 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();
- 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 {
- var counter = date.split(" ");
- var id = counter.slice(-1).pop();
- 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>
-{% endblock %}
-
-
-{% block content %}
- {% if workshops %}
- <h3 align="center" style="color:#2952a2;">The status of your workshops </h3>
- <br>
-
- <!-- Accepted View -->
- <br>
- <div class="container">
- <h3 align="center" style="color: #04a9cf;"><strong>Workshops Accepted</strong></h3>
- <table class="table table-striped">
- <thead>
- <tr>
- {% if request.user.profile.position == 'instructor' %}
- <th>Coordinator Name</th>
- <th>Institute</th>
- {% else %}
- <th>Instructor Name</th>
- {% endif %}
- <th>Workshop Name</th>
- <th>Workshop Day</th>
- <th>Status</th>
- </tr>
- </thead>
- {% csrf_token %}
- {% for workshop in workshops %}
- <tbody>
- <tr>
- {% if workshop.status == 1 and workshop.workshop_type %}
- {% if request.user.profile.position == 'instructor' %}
- <td>
- <a href="{{ URL_ROOT }}/view_profile/{{ workshop.coordinator.profile.user.id }}">
- {{ workshop.coordinator.get_full_name }}</a></td>
- <td>{{ workshop.coordinator.profile.institute }}</td>
- {% else %}
- <td>{{ workshop.instructor.get_full_name }}</td>
- {% endif %}
- <td>{{ workshop.workshop_type |capfirst }}</td>
- {% if workshop.date > today %}
- <td>{{ workshop.date | date }}
- <span class="material-icons" style="cursor:pointer;" data-toggle="popinfo"
- title="Note"
- data-content="Click here to change date"
- class="datepicker"
- onclick="changeDate('R,{{ workshop.date| safe }}, {{ forloop.counter }}')">event</span>
- <div class="myDialogR{{ forloop.counter }}" style="display: none;"
- title="Select New Date">
- <form method="post">
- <input type="text" name="new_date" class="rDate{{ forloop.counter }}"/><br>
- <input type="hidden" name="action" value="change_date">
- <input type="hidden" name="workshop_id" value="{{ workshop.id }}">
- <input type="hidden" name="cid" value="{{ workshop.coordinator.id }}">
- {% csrf_token %}
- <button class="btn btn-primary btn-xs" type="submit">Save</button>
- </form>
- </div>
- </td>
- {% else %}
- <td>{{ workshop.date | date }}</td>
- {% endif %}
- <td><span class="badge badge-success">{{ workshop.get_status }}</span></td>
- {% endif %}
- </tr>
- </tbody>
-
- {% endfor %}
-
- </table>
- </div>
-
-
- <!-- Proposed View -->
- <br>
- <div class="container">
-
- {% if request.user.profile.position == 'instructor' %}
- <h3 align="center" style="color: #04a9cf;"><strong>Workshops Proposed By Coordinators</strong>
- </h3>
- {% else %}
- <h3 align="center" style="color: #04a9cf;"><strong>Workshops Proposed By Me</strong></h3>
- {% endif %}
- <table class="table table-striped">
- <thead>
- <tr>
- {% if request.user.profile.position == 'instructor' %}
- <th>Coordinator Name</th>
- <th>Institute</th>
- {% else %}
-
- {% endif %}
- <th>Workshop Name</th>
- <th>Workshop Day</th>
- <th>Status</th>
- {% if request.user.profile.position == 'instructor' %}
- <th>Action</th>
- {% endif %}
- </tr>
- </thead>
- {% csrf_token %}
- {% for workshop in workshops %}
- <tbody>
- <tr>
- {% if workshop.status == 0 and workshop.tnc_accepted %}
- {% if request.user.profile.position == 'instructor' %}
-
- <td>
- <a href="{{ URL_ROOT }}/view_comment_profile/{{ workshop.coordinator.profile.user.id }}">
- {{ workshop.coordinator.get_full_name }}</a></td>
- <td>{{ workshop.coordinator.profile.institute }}</td>
- {% endif %}
- <td>{{ workshop.workshop_type }}</td>
- <td>{{ workshop.date | date }}</td>
-
- <td><span class="badge badge-warning">{{ workshop.get_status }}</span></td>
- {% if request.user.profile.position == 'instructor' and workshop.status == 0 %}
- <td>
- <form method="post">
- <input type="hidden" name="action" value="accept">
- <input type="hidden" name="workshop_id" value="{{ workshop.id }}">
- {% csrf_token %}
- <button class="btn btn-primary btn-sm" id="book-btn" data-toggle="popover"
- title="Please Note"
- data-content="Once Accepted you can't Reject, you have to personally contact the Coordinator if the workshop is to be cancelled">
- Accept
- </button>
- </form>
- </td>
- {% endif %}
- {% endif %}
- </tr>
- </tbody>
-
- {% endfor %}
- </table>
- </div>
-
-
-
- {% else %}
- {% if request.user.profile.position == 'instructor' %}
- <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 %}
- <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 %}
- {% endif %}
-
-{% endblock %}
diff --git a/workshop_app/templates/workshop_app/workshop_status_coordinator.html b/workshop_app/templates/workshop_app/workshop_status_coordinator.html
new file mode 100644
index 0000000..00e28b3
--- /dev/null
+++ b/workshop_app/templates/workshop_app/workshop_status_coordinator.html
@@ -0,0 +1,88 @@
+{% extends "workshop_app/base.html" %}
+
+{% block title %}
+ My Workshops
+{% endblock %}
+
+{% block extra-custom-scripts %}
+<style >
+ .table-heading{
+ color: #04a9cf;
+ }
+ </style>
+{% endblock %}
+
+{% block content %}
+ {% 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>Propose Workshop tab</strong> .</p>
+ </div>
+ </div>
+ {% else %}
+ <h3 class="text-center">The status of your workshops </h3>
+ <br>
+
+ <!-- Accepted View -->
+
+ <br>
+ <div class="container">
+ <h3 class="text-center table-heading"><strong>Workshops Accepted</strong></h3>
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>Instructor Name</th>
+ <th>Workshop Name</th>
+ <th>Workshop Day</th>
+ <th>Status</th>
+ </tr>
+ </thead>
+
+ {% for workshop in workshops %}
+ <tbody>
+ <tr>
+ {% if workshop.status %}
+ <td>{{ workshop.instructor.get_full_name }}</td>
+ <td>{{ workshop.workshop_type |capfirst }}</td>
+ <td>{{ workshop.date | date }}</td>
+ <td><span class="badge badge-success">{{ workshop.get_status }}</span></td>
+ {% endif %}
+ </tr>
+ </tbody>
+ {% endfor %}
+
+ </table>
+ </div>
+
+ <!-- Proposed View -->
+
+ <br>
+ <div class="container">
+ <h3 class="text-center table-heading"><strong>Workshops Proposed By Me</strong></h3>
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>Workshop Name</th>
+ <th>Workshop Day</th>
+ <th>Status</th>
+ </tr>
+ </thead>
+ {% for workshop in workshops %}
+ <tbody>
+ <tr>
+ {% if not workshop.status and workshop.tnc_accepted %}
+ <td>{{ workshop.workshop_type }}</td>
+ <td>{{ workshop.date | date }}</td>
+ <td><span class="badge badge-warning">{{ workshop.get_status }}</span></td>
+ {% endif %}
+ </tr>
+ </tbody>
+
+ {% endfor %}
+ </table>
+ </div>
+ {% endif %}
+
+{% endblock %}
diff --git a/workshop_app/templates/workshop_app/workshop_status_instructor.html b/workshop_app/templates/workshop_app/workshop_status_instructor.html
new file mode 100644
index 0000000..ef64a70
--- /dev/null
+++ b/workshop_app/templates/workshop_app/workshop_status_instructor.html
@@ -0,0 +1,139 @@
+{% extends "workshop_app/base.html" %}
+
+{% block title %}
+ Workshop Status
+{% endblock %}
+
+{% block extra-dependencies %}
+ <style >
+ .table-heading{
+ color: #04a9cf;
+ }
+ </style>
+ <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
+ <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
+{% endblock %}
+{% block extra-custom-scripts %}
+ {% load static %}
+ <script src="{% static 'workshop_app/js/datepicker.js' %}"></script>
+{% endblock %}
+
+
+{% block content %}
+ {% 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">The status of your workshops </h3>
+ <br>
+
+ <!-- Accepted View -->
+ <br>
+ <div class="container">
+ <h3 align="center" class="table-heading"><strong>Workshops Accepted</strong></h3>
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>Coordinator Name</th>
+ <th>Institute</th>
+ <th>Workshop Name</th>
+ <th>Workshop Day</th>
+ <th>Status</th>
+ </tr>
+ </thead>
+ {% for workshop in workshops %}
+ <tbody>
+ <tr>
+ {% if workshop.status %}
+ <td>
+ <a href="{% url 'view_profile' workshop.coordinator.profile.user.id %}">
+ {{ workshop.coordinator.get_full_name }}</a>
+ </td>
+ <td>{{ workshop.coordinator.profile.institute }}</td>
+ <td>{{ workshop.workshop_type |capfirst }}</td>
+ <td>{{ workshop.date | date }}
+
+ {% if workshop.date > today %}
+ <span class="material-icons datepicker btn"
+ data-toggle="popinfo"
+ title="Note"
+ data-content="Click here to change date"
+ onclick="changeDate('R,{{ workshop.date| safe }}, {{ forloop.counter }}')">event</span>
+ <div class="myDialogR{{ forloop.counter }}" style="display: none;"
+ title="Select New Date">
+ <form method="post" action="{% url 'change_workshop_date' workshop.id %}">
+ <input type="text" placeholder="New date" name="new_date"
+ class="rDate{{ forloop.counter }}"/><br>
+ {% csrf_token %}
+ <button class="btn btn-primary btn-xs" type="submit">Save</button>
+ </form>
+ </div>
+ {% endif %}
+ </td>
+ <td><span class="badge badge-success">{{ workshop.get_status }}</span></td>
+ {% endif %}
+ </tr>
+ </tbody>
+
+ {% endfor %}
+
+ </table>
+ </div>
+
+
+ <!-- Proposed View -->
+ <br>
+ <div class="container">
+ <h3 class="text-center table-heading"><strong>Workshops Proposed By Coordinators</strong>
+ </h3>
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ <th>Coordinator Name</th>
+ <th>Institute</th>
+ <th>Workshop Name</th>
+ <th>Workshop Day</th>
+ <th>Status</th>
+ <th>Action</th>
+ </tr>
+ </thead>
+ {% csrf_token %}
+ {% for workshop in workshops %}
+ <tbody>
+ <tr>
+ {% if not workshop.status and workshop.tnc_accepted %}
+ <td>
+ <a href="{% url 'view_profile' workshop.coordinator.profile.user.id %}">
+ {{ workshop.coordinator.get_full_name }}</a>
+ </td>
+ <td>{{ workshop.coordinator.profile.institute }}</td>
+ <td>{{ workshop.workshop_type }}</td>
+ <td>{{ workshop.date | date }}</td>
+ <td><span class="badge badge-warning">{{ workshop.get_status }}</span></td>
+ <td>
+ <a href="{% url 'accept_workshop' workshop.id %}">
+ <button class="btn btn-primary btn-sm" id="book-btn" data-toggle="popover"
+ title="Please Note"
+ data-content="Once Accepted you can't Reject, you have to personally contact the Coordinator if the workshop is to be cancelled">
+ Accept
+ </button>
+ </a>
+ </td>
+ {% endif %}
+ </tr>
+ </tbody>
+
+ {% endfor %}
+ </table>
+ </div>
+ {% endif %}
+
+{% endblock %}