summaryrefslogtreecommitdiff
path: root/workshop_app/templates
diff options
context:
space:
mode:
Diffstat (limited to 'workshop_app/templates')
-rw-r--r--workshop_app/templates/workshop_app/manage.html14
-rw-r--r--workshop_app/templates/workshop_app/my_workshops.html118
2 files changed, 113 insertions, 19 deletions
diff --git a/workshop_app/templates/workshop_app/manage.html b/workshop_app/templates/workshop_app/manage.html
index 235f985..302f715 100644
--- a/workshop_app/templates/workshop_app/manage.html
+++ b/workshop_app/templates/workshop_app/manage.html
@@ -23,8 +23,18 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
-
+ <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script>
+ //ToolTip PopUp function onhover
+ $(document).ready(function(){
+ $('[data-toggle="popover"]').popover({
+ placement : 'top',
+ trigger : 'hover'
+ });
+ });
+
function sendData(d){
var URL = "{{ URL_ROOT }}/my_workshops/"
console.log(d);
@@ -68,7 +78,7 @@
<td>{{ w.user }}</td>
<td>{{ w.workshop }}</td>
<td>{{ w.date | date}}</td>
- <td><button data-toggle="tooltip" data-placement="top" title="Tooltip on top" class="btn btn-danger btn-sm" id="delete-btn" onClick="sendData('{{ w.user}},{{w.date | safe}},{{ w.workshop.id }},DELETED')" > Delete Event </button></td>
+ <td><button class="btn btn-danger btn-sm" id="delete-btn" onClick="sendData('{{ w.user}},{{w.date | safe}},{{ w.workshop.id }},DELETED')" data-toggle="popover" title="Please Note" data-content="Once Deleted you cannot revoke this action." > Delete Event </button></td>
</tr>
</tbody>
{% endfor %}
diff --git a/workshop_app/templates/workshop_app/my_workshops.html b/workshop_app/templates/workshop_app/my_workshops.html
index ced8758..672f9f9 100644
--- a/workshop_app/templates/workshop_app/my_workshops.html
+++ b/workshop_app/templates/workshop_app/my_workshops.html
@@ -8,8 +8,17 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/smoothness/jquery-ui.css">
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>
-
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script>
+ //ToolTip popup function onhover
+ $(document).ready(function(){
+ $('[data-toggle="popover"]').popover({
+ placement : 'top',
+ trigger : 'hover'
+ });
+ });
+
function sendData(d){
var URL = "{{ URL_ROOT }}/my_workshops/"
console.log(d);
@@ -61,8 +70,11 @@
{% if workshop_occurences %}
<h3 align="center">The status of your workshops </h3>
<br>
+
+ <!-- Pending View -->
<div class="container">
- <table class="table table-hover">
+ <h3 align="center"><strong><u>Pending</u></strong></h3>
+ <table class="table table-striped">
<thead>
<tr>
{% if request.user.profile.position == 'instructor' %}
@@ -79,23 +91,95 @@
{% for workshop in workshop_occurences %}
<tbody>
<tr>
- {% if request.user.profile.position == 'instructor' %}
- <td>{{ workshop.requested_workshop_coordinator }}</td>
- {% else %}
- <td>{{ workshop.requested_workshop_instructor }}</td>
- {% endif %}
- <td>{{ workshop.requested_workshop_title }}</td>
- <td>{{ workshop.requested_workshop_date }}</td>
{% if workshop.status == 'Pending' %}
- <td><span class = "label label-warning">{{ workshop.status }}</span></td>
- {% elif workshop.status == 'ACCEPTED' %}
- <td><span class = "label label-success">{{ workshop.status }}</span></td>
- {% else %}
- <td><span class = "label label-danger">{{ workshop.status }}</span></td>
+ {% if request.user.profile.position == 'instructor' %}
+ <td>{{ workshop.requested_workshop_coordinator }}</td>
+ {% else %}
+ <td>{{ workshop.requested_workshop_instructor }}</td>
+ {% endif %}
+ <td>{{ workshop.requested_workshop_title }}</td>
+ <td>{{ workshop.requested_workshop_date }}</td>
+ <td><span class = "label label-warning">{{ workshop.status }}</span></td>
+ {% endif %}
+ {% if request.user.profile.position == 'instructor' and workshop.status == 'Pending' %}
+ <td><button class="btn btn-primary btn-sm" id="book-btn" onClick="sendData('{{workshop.requested_workshop_coordinator}},{{workshop.requested_workshop_date| safe}},{{ workshop.requested_workshop_title_id }},ACCEPTED')" 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></td>
+ <td><button class="btn btn-danger btn-sm" id="book-btn" onClick="sendData('{{workshop.requested_workshop_coordinator}},{{workshop.requested_workshop_date| safe}},{{ workshop.requested_workshop_title_id }},REJECTED')" data-toggle="popover" title="Please Note" data-content="Once Rejected you cannot revoke this action."> Reject </button></td>
+ {% endif %}
+ </tr>
+ </tbody>
+
+ {% endfor %}
+ </table>
+ </div>
+
+ <!-- Accepted View -->
+ <div class="container">
+ <h3 align="center"><strong><u>Accepted</u></strong></h3>
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ {% if request.user.profile.position == 'instructor' %}
+ <th>Coordinator Name</th>
+ {% else %}
+ <th>Instructor Name</th>
+ {% endif %}
+ <th>Course Name</th>
+ <th>Course Day</th>
+ <th>Status</th>
+ </tr>
+ </thead>
+ {% csrf_token %}
+ {% for workshop in workshop_occurences %}
+ <tbody>
+ <tr>
+ {% if workshop.status == 'ACCEPTED' %}
+ {% if request.user.profile.position == 'instructor' %}
+ <td>{{ workshop.requested_workshop_coordinator }}</td>
+ {% else %}
+ <td>{{ workshop.requested_workshop_instructor }}</td>
+ {% endif %}
+ <td>{{ workshop.requested_workshop_title }}</td>
+ <td>{{ workshop.requested_workshop_date }}</td>
+ <td><span class = "label label-success">{{ workshop.status }}</span></td>
{% endif %}
- {% if request.user.profile.position == 'instructor' and workshop.status != 'DELETED' %}
- <td><button class="btn btn-primary btn-sm" id="book-btn" onClick="sendData('{{workshop.requested_workshop_coordinator}},{{workshop.requested_workshop_date| safe}},{{ workshop.requested_workshop_title_id }},ACCEPTED')" > Accept</button></td>
- <td><button class="btn btn-danger btn-sm" id="book-btn" onClick="sendData('{{workshop.requested_workshop_coordinator}},{{workshop.requested_workshop_date| safe}},{{ workshop.requested_workshop_title_id }},REJECTED')" > Reject </button></td>
+ </tr>
+ </tbody>
+
+ {% endfor %}
+
+ </table>
+ </div>
+
+<!-- Deleted/Rejected View -->
+<div class="container">
+ <h3 align="center"><strong><u>Deleted/Rejected</u></strong></h3>
+ <table class="table table-striped">
+ <thead>
+ <tr>
+ {% if request.user.profile.position == 'instructor' %}
+ <th>Coordinator Name</th>
+ {% else %}
+ <th>Instructor Name</th>
+ {% endif %}
+ <th>Course Name</th>
+ <th>Course Day</th>
+ <th>Status</th>
+ </tr>
+ </thead>
+ {% csrf_token %}
+ {% for workshop in workshop_occurences %}
+ <tbody>
+ <tr>
+ {% if workshop.status == 'DELETED' or workshop.status == 'REJECTED' %}
+ {% if request.user.profile.position == 'instructor' %}
+ <td>{{ workshop.requested_workshop_coordinator }}</td>
+ {% else %}
+ <td>{{ workshop.requested_workshop_instructor }}</td>
+ {% endif %}
+ <td>{{ workshop.requested_workshop_title }}</td>
+ <td>{{ workshop.requested_workshop_date }}</td>
+
+ <td><span class = "label label-danger">{{ workshop.status }}</span></td>
{% endif %}
</tr>
</tbody>