diff options
author | Akshen | 2017-04-16 11:22:35 +0530 |
---|---|---|
committer | Akshen | 2017-05-19 15:30:31 +0530 |
commit | 670fc54e65004ee3f6402f095694fdbcf0b26e6c (patch) | |
tree | 568b63066d533aeec120f84c60c35f83a20d1c64 /workshop_app/templates | |
parent | 90699284a392734c65d5f08608997c659a893a98 (diff) | |
download | workshop_booking-670fc54e65004ee3f6402f095694fdbcf0b26e6c.tar.gz workshop_booking-670fc54e65004ee3f6402f095694fdbcf0b26e6c.tar.bz2 workshop_booking-670fc54e65004ee3f6402f095694fdbcf0b26e6c.zip |
Multiple Workshop Creation and Handling
multiple workshops from instructor can be created and handled
TODO separate view for deleted, accepted and pending workshops on My Workshop
Diffstat (limited to 'workshop_app/templates')
-rw-r--r-- | workshop_app/templates/workshop_app/booking.html | 17 | ||||
-rw-r--r-- | workshop_app/templates/workshop_app/index.html | 15 | ||||
-rw-r--r-- | workshop_app/templates/workshop_app/login.html | 15 | ||||
-rw-r--r-- | workshop_app/templates/workshop_app/logout.html | 15 | ||||
-rw-r--r-- | workshop_app/templates/workshop_app/manage.html | 12 | ||||
-rw-r--r-- | workshop_app/templates/workshop_app/my_workshops.html | 8 | ||||
-rw-r--r-- | workshop_app/templates/workshop_app/register.html | 15 | ||||
-rw-r--r-- | workshop_app/templates/workshop_app/view_course_list.html | 2 | ||||
-rw-r--r-- | workshop_app/templates/workshop_app/view_profile.html | 2 |
9 files changed, 86 insertions, 15 deletions
diff --git a/workshop_app/templates/workshop_app/booking.html b/workshop_app/templates/workshop_app/booking.html index 051dfeb..9321e33 100644 --- a/workshop_app/templates/workshop_app/booking.html +++ b/workshop_app/templates/workshop_app/booking.html @@ -13,11 +13,13 @@ <script> // Button function function sendData(d){ + console.log(d); + var $dialog = $('<div></div').html( '<form id="myform" action="">\ <input type="checkbox" id="one"\ - name="one" value="one"/>We will give minimum 50 participants for the workshop.<br/>\ - <input type="checkbox" id="two" name="two" value="two" />We agree that this booking won\'t be cancelled(if you want to cancel please contact the instructor 2days before the event).<br/>\ + name="one" value="one"/> I will give minimum 50 participants for the workshop.<br/>\ + <input type="checkbox" id="two" name="two" value="two" /> I agree that this booking won\'t be cancelled(if you want to cancel please contact the instructor 2days before the event).<br/>\ </form> ') .dialog({ autoOpen: false, @@ -40,7 +42,7 @@ $dialog.dialog('open'); } -function booking_confirmed(d){ + function booking_confirmed(d){ var URL = "{{ URL_ROOT }}/book_workshop/"; $.ajax({ @@ -69,6 +71,7 @@ function booking_confirmed(d){ </div> <ul class="nav navbar-nav"> <li class="active"><a href="{{ URL_ROOT}}/my_workshops">My Workshops</a></li> + <li class="active"><a href="{{ URL_ROOT }}/view_course_list">View Course List</a></li> </ul> <ul class="nav navbar-nav navbar-right"> <li><a href="{{ URL_ROOT }}/view_profile"><span class="glyphicon glyphicon-user"></span> Profile </a></li> @@ -79,6 +82,8 @@ function booking_confirmed(d){ {% endblock %} {% block content %} + <h4 align="center">This is the list of events available, if you haved booked a workshop please goto My Workshops and check your workshop status.</h4> + <br> <div class="container"> <table class="table table-hover"> <thead> @@ -95,10 +100,10 @@ function booking_confirmed(d){ <tbody> <tr> - <td id="instructor-name">{{ workshop.1.0 }}</td> - <td id="course-name">{{ workshop.1.1 }}</td> + <td id="instructor-name">{{ workshop.1 }}</td> + <td id="course-name">{{ workshop.2 }}</td> <td id="workshop-date{{ forloop.counter }}">{{ workshop.0 }}</td> - <td><button class="btn btn-primary btn-sm" id="book-btn" onClick="sendData('{{workshop.0}},{{workshop.1.2}},{{workshop.1.3}}')" > Book</button></td> + <td><button class="btn btn-primary btn-sm" id="book-btn" onClick="sendData('{{workshop.0}},{{workshop.3}},{{workshop.4}}')" > Book</button></td> </tr> </tbody> diff --git a/workshop_app/templates/workshop_app/index.html b/workshop_app/templates/workshop_app/index.html index a7664ed..10ba623 100644 --- a/workshop_app/templates/workshop_app/index.html +++ b/workshop_app/templates/workshop_app/index.html @@ -7,6 +7,21 @@ Welcome {% endblock %} </head> + + {% block header %} + <nav class="navbar navbar-inverse"> + <div class="container-fluid"> + <div class="navbar-header"> + <a class="navbar-brand" href="{{ URL_ROOT }}/">Booking</a> + </div> + + <ul class="nav navbar-nav navbar-right"> + <li><a href="{{ URL_ROOT }}/register"><span class="glyphicon glyphicon-user"></span> Register</a></li> + <li><a href="{{ URL_ROOT }}/login"><span class="glyphicon glyphicon-log-in"></span> Login</a></li> + </ul> + </div> + </nav> + {% endblock %} {% block content %} <div class="container"> diff --git a/workshop_app/templates/workshop_app/login.html b/workshop_app/templates/workshop_app/login.html index cc733c7..6c4b82b 100644 --- a/workshop_app/templates/workshop_app/login.html +++ b/workshop_app/templates/workshop_app/login.html @@ -4,6 +4,21 @@ Login {% endblock %} +{% block header %} + <nav class="navbar navbar-inverse"> + <div class="container-fluid"> + <div class="navbar-header"> + <a class="navbar-brand" href="{{ URL_ROOT }}/">Booking</a> + </div> + + <ul class="nav navbar-nav navbar-right"> + <li><a href="{{ URL_ROOT }}/register"><span class="glyphicon glyphicon-user"></span> Register</a></li> + <li><a href="{{ URL_ROOT }}/login"><span class="glyphicon glyphicon-log-in"></span> Login</a></li> + </ul> + </div> + </nav> + {% endblock %} + {% block content %} <div class="container" align="center"> <br> diff --git a/workshop_app/templates/workshop_app/logout.html b/workshop_app/templates/workshop_app/logout.html index 793bf5a..492f914 100644 --- a/workshop_app/templates/workshop_app/logout.html +++ b/workshop_app/templates/workshop_app/logout.html @@ -4,6 +4,21 @@ Logged out {% endblock %} +{% block header %} + <nav class="navbar navbar-inverse"> + <div class="container-fluid"> + <div class="navbar-header"> + <a class="navbar-brand" href="{{ URL_ROOT }}/">Booking</a> + </div> + + <ul class="nav navbar-nav navbar-right"> + <li><a href="{{ URL_ROOT }}/register"><span class="glyphicon glyphicon-user"></span> Register</a></li> + <li><a href="{{ URL_ROOT }}/login"><span class="glyphicon glyphicon-log-in"></span> Login</a></li> + </ul> + </div> + </nav> + {% endblock %} + {% block content %} <div class="container" align="center"> diff --git a/workshop_app/templates/workshop_app/manage.html b/workshop_app/templates/workshop_app/manage.html index 070bd00..235f985 100644 --- a/workshop_app/templates/workshop_app/manage.html +++ b/workshop_app/templates/workshop_app/manage.html @@ -4,7 +4,7 @@ <nav class="navbar navbar-inverse"> <div class="container-fluid"> <div class="navbar-header"> - <a class="navbar-brand" href="#">WebSiteName</a> + <a class="navbar-brand" href="#">Instructor Profile</a> </div> <ul class="nav navbar-nav"> <li class="active"><a href="{{ URL_ROOT }}/create_workshop">Create Event</a></li> @@ -42,12 +42,16 @@ alert("Refreshing Page please wait, if you don't see your changes, please refresh this page again."); } </script> + + {% endblock %} {% block content %} {% if workshop_occurence_list %} + <h4 align="center">This is the list of workshops you have created, you can delete a workshop if you are not availble on that day. </h4> + <br> <div class="container"> <table class="table table-hover"> <thead> @@ -58,17 +62,15 @@ </tr> </thead> {% csrf_token %} - {% for workshop in workshop_occurence_list %} - {% for w in workshop %} + {% for w in workshop_occurence_list %} <tbody> <tr> <td>{{ w.user }}</td> <td>{{ w.workshop }}</td> <td>{{ w.date | date}}</td> - <td><button 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 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> </tr> </tbody> - {% endfor %} {% endfor %} </table> </div> diff --git a/workshop_app/templates/workshop_app/my_workshops.html b/workshop_app/templates/workshop_app/my_workshops.html index c5189a7..ced8758 100644 --- a/workshop_app/templates/workshop_app/my_workshops.html +++ b/workshop_app/templates/workshop_app/my_workshops.html @@ -59,6 +59,8 @@ {% block content %} {% if workshop_occurences %} + <h3 align="center">The status of your workshops </h3> + <br> <div class="container"> <table class="table table-hover"> <thead> @@ -91,9 +93,9 @@ {% else %} <td><span class = "label label-danger">{{ workshop.status }}</span></td> {% endif %} - {% if request.user.profile.position == 'instructor' %} - <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 }},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 }},REJECTED')" > Reject </button></td> + {% 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> {% endif %} </tr> </tbody> diff --git a/workshop_app/templates/workshop_app/register.html b/workshop_app/templates/workshop_app/register.html index 3009048..db69118 100644 --- a/workshop_app/templates/workshop_app/register.html +++ b/workshop_app/templates/workshop_app/register.html @@ -4,6 +4,21 @@ Register {% endblock %} + {% block header %} + <nav class="navbar navbar-inverse"> + <div class="container-fluid"> + <div class="navbar-header"> + <a class="navbar-brand" href="{{ URL_ROOT }}/">Booking</a> + </div> + + <ul class="nav navbar-nav navbar-right"> + <li><a href="{{ URL_ROOT }}/register"><span class="glyphicon glyphicon-user"></span> Register</a></li> + <li><a href="{{ URL_ROOT }}/login"><span class="glyphicon glyphicon-log-in"></span> Login</a></li> + </ul> + </div> + </nav> + {% endblock %} + {% block content %} <div class="container" > <br> diff --git a/workshop_app/templates/workshop_app/view_course_list.html b/workshop_app/templates/workshop_app/view_course_list.html index d1fb343..bd2bcea 100644 --- a/workshop_app/templates/workshop_app/view_course_list.html +++ b/workshop_app/templates/workshop_app/view_course_list.html @@ -12,7 +12,9 @@ <a class="navbar-brand" href="{{ URL_ROOT}}/manage/">WebSiteName</a> </div> <ul class="nav navbar-nav"> + {% if request.user.profile.position == 'instructor'%} <li class="active"><a href="{{ URL_ROOT }}/create_workshop">Create Workshop</a></li> + {% endif %} <li class="active"><a href="{{ URL_ROOT }}/my_workshops">My Workshops</a></li> </ul> diff --git a/workshop_app/templates/workshop_app/view_profile.html b/workshop_app/templates/workshop_app/view_profile.html index c223a66..f3f0652 100644 --- a/workshop_app/templates/workshop_app/view_profile.html +++ b/workshop_app/templates/workshop_app/view_profile.html @@ -8,10 +8,10 @@ <nav class="navbar navbar-inverse"> <div class="container-fluid"> <div class="navbar-header"> - <a class="navbar-brand" href="#">WebSiteName</a> </div> {% if request.user.profile.position == 'instructor' %} <ul class="nav navbar-nav"> + <li class="active"><a href="{{ URL_ROOT }}/manage">Home</a></li> <li class="active"><a href="{{ URL_ROOT }}/create_workshop">Create Event</a></li> <li class="active"><a href="{{ URL_ROOT }}/view_course_list">View Course List</a></li> <li class="active"><a href="{{ URL_ROOT }}/my_workshops">My Workshops</a></li> |