diff options
Diffstat (limited to 'workshop_app/templates')
-rw-r--r-- | workshop_app/templates/workshop_app/base.html | 1 | ||||
-rw-r--r-- | workshop_app/templates/workshop_app/booking.html | 57 | ||||
-rw-r--r-- | workshop_app/templates/workshop_app/create_workshop.html | 4 | ||||
-rw-r--r-- | workshop_app/templates/workshop_app/manage.html | 73 |
4 files changed, 125 insertions, 10 deletions
diff --git a/workshop_app/templates/workshop_app/base.html b/workshop_app/templates/workshop_app/base.html index cebab31..9971dd4 100644 --- a/workshop_app/templates/workshop_app/base.html +++ b/workshop_app/templates/workshop_app/base.html @@ -17,6 +17,7 @@ <link rel="stylesheet" href="{{ URL_ROOT }}/static/workshop_app/css/sticky-footer.css" type="text/css" /> </head> + <!-- For js/ajax and other related scripts --> {% block extra %} {% endblock %} diff --git a/workshop_app/templates/workshop_app/booking.html b/workshop_app/templates/workshop_app/booking.html index 01cd609..4657b4a 100644 --- a/workshop_app/templates/workshop_app/booking.html +++ b/workshop_app/templates/workshop_app/booking.html @@ -4,6 +4,10 @@ Booking {% endblock %} +{% block extra %} + +{% endblock %} + {% block header %} <nav class="navbar navbar-inverse"> <div class="container-fluid"> @@ -19,4 +23,57 @@ </ul> </div> </nav> +{% endblock %} + +{% block content %} + <div class="container"> + <table class="table table-hover"> + <thead> + <tr> + <th>Instructor Name</th> + <th>Course Name</th> + <th>Course Day</th> + <th>Booking</th> + </tr> + </thead> + {% csrf_token %} + {% for workshop in workshop_details %} + <tbody> + <tr> + <td>{{ workshop.1.0 }}</td> + <td>{{ workshop.1.1 }}</td> + <td>{{ workshop.0 }}</td> + <td><button id="book-btn" class="btn btn-primary btn-sm">Book</button></td> + </tr> + </tbody> + {% endfor %} + </table> + </div> + + <div class="container"> + <div class="Page-Nav" align="center"> + <nav aria-label="Page navigation"> + <ul class="pagination pagination-sm"> + <li class="page-item"> + {% if workshop_details.has_previous %} + <a class="page-link" tabindex="-1" + href="?page={{ workshop_details.previous_page_number }}">Previous</a> + {% endif %} + </li> + <li class="page-item"> + <span class="current"> + Page {{ workshop_details.number }} of {{ workshop_details.paginator.num_pages }} + </span> + </li> + <li class="page-item"> + {% if workshop_details.has_next %} + <a class="page-link" href="?page={{ workshop_details.next_page_number }}">Next + </a> + {% endif %} + </li> + </ul> + </nav> + </div> + </div> + {% endblock %}
\ No newline at end of file diff --git a/workshop_app/templates/workshop_app/create_workshop.html b/workshop_app/templates/workshop_app/create_workshop.html index 93de011..e643594 100644 --- a/workshop_app/templates/workshop_app/create_workshop.html +++ b/workshop_app/templates/workshop_app/create_workshop.html @@ -40,7 +40,11 @@ <div class="container"> <form method="post"> {% csrf_token %} + <br/> + {{ form.media }} {{ form.as_p }} + + <br> <button class="btn btn-success" type="submit">Save</button> </form> diff --git a/workshop_app/templates/workshop_app/manage.html b/workshop_app/templates/workshop_app/manage.html index b2404ed..3afca6b 100644 --- a/workshop_app/templates/workshop_app/manage.html +++ b/workshop_app/templates/workshop_app/manage.html @@ -20,15 +20,68 @@ {% block content %} -<div class="container"> - {% csrf_token %} - {% for w in workshop_details %} - {{ w.date }}<br> - {{ w.start_time }}<br> - {{ w.end_time }}<br> - {{ w.workshop_creator }}<br> - {{ w.workshop_title }} - {% endfor %} -</div> + {% if workshop_occurence_list %} + <div class="container"> + <table class="table table-hover"> + <thead> + <tr> + <th>Instructor Name</th> + <th>Course Name</th> + <th>Course Day</th> + <th>Booking</th> + </tr> + </thead> + {% csrf_token %} + {% for workshop in workshop_occurence_list %} + {% for w in workshop %} + <tbody> + <tr> + <td>{{ w.user }}</td> + <td>{{ w.workshop }}</td> + <td>{{ w.date }}</td> + </tr> + </tbody> + {% endfor %} + {% endfor %} + </table> + </div> + + <div class="container"> + <div class="Page-Nav" align="center"> + <nav aria-label="Page navigation"> + <ul class="pagination pagination-sm"> + <li class="page-item"> + {% if workshop_occurence_list.has_previous %} + <a class="page-link" tabindex="-1" + href="?page={{ workshop_occurence_list.previous_page_number }}">Previous</a> + {% endif %} + </li> + <li class="page-item"> + <span class="current"> + Page {{ workshop_occurence_list.number }} of {{ workshop_occurence_list.paginator.num_pages }} + </span> + </li> + <li class="page-item"> + {% if workshop_occurence_list.has_next %} + <a class="page-link" href="?page={{ workshop_occurence_list.next_page_number }}">Next + </a> + {% endif %} + </li> + </ul> + </nav> + </div> + </div> + + {% else %} + <div class="container"> + <div class="jumbotron"> + <h1>Welcome Instructor</h1> + <p>Please navigate to <b>View Course list</b> and depending upon + your expertise and availability create a workshop by going to + <b>Create Event</b>.</p> + + </div> + </div> + {% endif %} {% endblock %}
\ No newline at end of file |