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/base.html7
-rw-r--r--workshop_app/templates/workshop_app/workshop_details.html83
-rw-r--r--workshop_app/templates/workshop_app/workshop_status_coordinator.html6
-rw-r--r--workshop_app/templates/workshop_app/workshop_status_instructor.html8
4 files changed, 94 insertions, 10 deletions
diff --git a/workshop_app/templates/workshop_app/base.html b/workshop_app/templates/workshop_app/base.html
index c7a454e..88ee1a1 100644
--- a/workshop_app/templates/workshop_app/base.html
+++ b/workshop_app/templates/workshop_app/base.html
@@ -43,7 +43,7 @@
<ul class="navbar-nav mr-auto">
{% if request.user.profile.position == 'coordinator' %}
<li class="nav-item">
- <a class="nav-link" href="/my_workshops/">Workshop Status</a>
+ <a class="nav-link" href="{% url 'workshop_status_coordinator' %}">Workshop Status</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/propose_workshop/">Propose Workshop</a>
@@ -53,7 +53,7 @@
</li>
{% elif request.user.profile.position == 'instructor' %}
<li class="nav-item">
- <a class="nav-link" href="/my_workshops/">Workshop Status</a>
+ <a class="nav-link" href="{% url 'workshop_status_instructor' %}">Workshop Status</a>
</li>
<li class="nav-item">
<a class="nav-link" href="/workshop_types/">Workshop Types</a>
@@ -91,10 +91,11 @@
</nav>
{% endblock %}
+<div class="container-fluid" style="margin-bottom: 44px">
{% block content %}
<h1>Base Template Content. Please override me</h1>
{% endblock %}
-
+</div>
</body>
<footer class="footer">
diff --git a/workshop_app/templates/workshop_app/workshop_details.html b/workshop_app/templates/workshop_app/workshop_details.html
new file mode 100644
index 0000000..3ca5a50
--- /dev/null
+++ b/workshop_app/templates/workshop_app/workshop_details.html
@@ -0,0 +1,83 @@
+{% extends 'workshop_app/base.html' %}
+
+{% block title %}
+ View Workshop details
+{% endblock %}
+
+{% block content %}
+ <div class="container">
+ <table class="table table-bordered">
+ <tr>
+ <th><label for="id_first_name">Workshop Type :</label></th>
+ <td><label for="id_first_name"><a
+ href="{% url 'workshop_type_details' workshop.workshop_type_id %}">{{ workshop.workshop_type }}</a></label>
+ </td>
+ </tr>
+ <tr>
+ <th><label for="id_last_name">Date :</label></th>
+ <td><label for="id_last_name">{{ workshop.date }}</label></td>
+ </tr>
+ <tr>
+ <th><label for="id_email">Coordinator :</label></th>
+ <td><label for="id_email"><a
+ href="{% url 'view_profile' workshop.coordinator_id %}">{{ workshop.coordinator }}</a></label>
+ </td>
+ </tr>
+ {% if workshop.status %}
+ <tr>
+ <th><label for="id_institute">Status :</label></th>
+ <td><span class="badge badge-success">{{ workshop.get_status }}</span></td>
+ </tr>
+ <tr>
+ <th><label for="id_phone_number">Instructor :</label></th>
+ <td><label for="id_email"><a
+ href="{% url 'view_profile' workshop.instructor_id %}">{{ workshop.instructor }}</a></label>
+ </td>
+ </tr>
+ {% else %}
+ <tr>
+ <th><label for="id_institute">Status :</label></th>
+ <td><span class="badge badge-warning">{{ workshop.get_status }}</span></td>
+ </tr>
+ {% endif %}
+ </table>
+ <br>
+ <div class="container">
+ <h2 class="text-center">Comments</h2>
+ <br>
+ {% for comment in workshop_comments %}
+ <div class="card my-2">
+ <div class="card-header">
+ <div class="row">
+ <div class="mx-3 font-weight-bold"><a
+ href="{% url 'view_profile' comment.author_id %}">{{ comment.author }}</a></div>
+ <div class="text-muted">{{ comment.created_date }}</div>
+ </div>
+ </div>
+ <div class="card-body">
+ <p>{{ comment.comment }}</p>
+ </div>
+ </div>
+ {% endfor %}
+ <br><br>
+ <div class="card mt-2 mb-5">
+ <form method="post">
+ <div class="card-header">
+ <div class="row">
+ <div class="mx-3 font-weight-bold">Post a comment</div>
+ {% if request.user.profile.position == 'instructor' %}
+ <div class="ml-5">{{ form.public }} Public</div>
+ <div class="ml-1 text-muted">(Non-public comments are visible only to instructors)</div>
+ {% endif %}
+ </div>
+ </div>
+ <div class="card-body">
+ {{ form.comment }}
+ </div>
+ <button type="submit" class="float-right btn btn-primary btn-md m-2">Post</button>
+ </form>
+ </div>
+ </div>
+ </div>
+
+{% endblock %} \ No newline at end of file
diff --git a/workshop_app/templates/workshop_app/workshop_status_coordinator.html b/workshop_app/templates/workshop_app/workshop_status_coordinator.html
index 07045de..489ba0a 100644
--- a/workshop_app/templates/workshop_app/workshop_status_coordinator.html
+++ b/workshop_app/templates/workshop_app/workshop_status_coordinator.html
@@ -26,8 +26,8 @@
<table class="table table-striped">
<thead>
<tr>
- <th>Instructor Name</th>
<th>Workshop Name</th>
+ <th>Instructor Name</th>
<th>Workshop Day</th>
<th>Status</th>
</tr>
@@ -37,8 +37,8 @@
<tbody>
<tr>
{% if workshop.status %}
+ <td><a href="{% url 'workshop_details' workshop.id %}" >{{ workshop.workshop_type |capfirst }}</a></td>
<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 %}
@@ -66,7 +66,7 @@
<tbody>
<tr>
{% if not workshop.status and workshop.tnc_accepted %}
- <td>{{ workshop.workshop_type }}</td>
+ <td><a href="{% url 'workshop_details' workshop.id %}" >{{ workshop.workshop_type |capfirst }}</a></td>
<td>{{ workshop.date | date }}</td>
<td><span class="badge badge-warning">{{ workshop.get_status }}</span></td>
{% endif %}
diff --git a/workshop_app/templates/workshop_app/workshop_status_instructor.html b/workshop_app/templates/workshop_app/workshop_status_instructor.html
index 0a246b3..dc6f18b 100644
--- a/workshop_app/templates/workshop_app/workshop_status_instructor.html
+++ b/workshop_app/templates/workshop_app/workshop_status_instructor.html
@@ -37,9 +37,9 @@
<table class="table table-striped">
<thead>
<tr>
+ <th>Workshop Name</th>
<th>Coordinator Name</th>
<th>Institute</th>
- <th>Workshop Name</th>
<th>Workshop Day</th>
<th>Status</th>
</tr>
@@ -48,12 +48,12 @@
<tbody>
<tr>
{% if workshop.status %}
+ <td><a href="{% url 'workshop_details' workshop.id %}" >{{ workshop.workshop_type |capfirst }}</a></td>
<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 %}
@@ -92,9 +92,9 @@
<table class="table table-striped">
<thead>
<tr>
+ <th>Workshop Name</th>
<th>Coordinator Name</th>
<th>Institute</th>
- <th>Workshop Name</th>
<th>Workshop Day</th>
<th>Status</th>
<th>Action</th>
@@ -105,12 +105,12 @@
<tbody>
<tr>
{% if not workshop.status and workshop.tnc_accepted %}
+ <td><a href="{% url 'workshop_details' workshop.id %}" >{{ workshop.workshop_type |capfirst }}</a></td>
<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>