summaryrefslogtreecommitdiff
path: root/workshop_app/templates
diff options
context:
space:
mode:
Diffstat (limited to 'workshop_app/templates')
-rw-r--r--workshop_app/templates/registration/password_reset_complete.html2
-rw-r--r--workshop_app/templates/registration/password_reset_done.html2
-rw-r--r--workshop_app/templates/registration/password_reset_form.html2
-rw-r--r--workshop_app/templates/workshop_app/activation.html21
-rw-r--r--workshop_app/templates/workshop_app/base.html38
-rw-r--r--workshop_app/templates/workshop_app/login.html52
-rw-r--r--workshop_app/templates/workshop_app/logout.html2
-rw-r--r--workshop_app/templates/workshop_app/workshop_details.html40
-rw-r--r--workshop_app/templates/workshop_app/workshop_status_coordinator.html8
-rw-r--r--workshop_app/templates/workshop_app/workshop_status_instructor.html12
-rw-r--r--workshop_app/templates/workshop_app/workshop_type_list.html8
11 files changed, 90 insertions, 97 deletions
diff --git a/workshop_app/templates/registration/password_reset_complete.html b/workshop_app/templates/registration/password_reset_complete.html
index 7b07cf8..13c4e8e 100644
--- a/workshop_app/templates/registration/password_reset_complete.html
+++ b/workshop_app/templates/registration/password_reset_complete.html
@@ -6,7 +6,7 @@
<center>
<div class="container">
<p>Your password has been reset. </p>
- <p><a href="{{ login_url }}" class="btn btn-success btn-lg">Log in</a></p>
+ <p><a href="{% url 'workshop_app:index' %}" class="btn btn-success btn-lg">Log in</a></p>
</div>
</center>
{% endblock %}
diff --git a/workshop_app/templates/registration/password_reset_done.html b/workshop_app/templates/registration/password_reset_done.html
index bc10a8d..b66f42b 100644
--- a/workshop_app/templates/registration/password_reset_done.html
+++ b/workshop_app/templates/registration/password_reset_done.html
@@ -9,6 +9,6 @@
Instruction for setting new password has been mailed to your registered email address
</div>
<br>
-<a class="btn btn-primary btn-lg" href="{% url 'index' %}">Go to Login</a>
+<a class="btn btn-primary btn-lg" href="{% url 'workshop:index' %}">Go to Login</a>
</center>
{% endblock %}
diff --git a/workshop_app/templates/registration/password_reset_form.html b/workshop_app/templates/registration/password_reset_form.html
index 031fd96..21bfee6 100644
--- a/workshop_app/templates/registration/password_reset_form.html
+++ b/workshop_app/templates/registration/password_reset_form.html
@@ -20,7 +20,7 @@
<button class="btn btn-success btn-lg" type="submit">
Request
</button>
- <a href="{% url 'index' %}" class="btn btn-primary btn-lg">
+ <a href="{% url 'workshop_app:index' %}" class="btn btn-primary btn-lg">
Cancel
</a>
</form>
diff --git a/workshop_app/templates/workshop_app/activation.html b/workshop_app/templates/workshop_app/activation.html
index fb8de48..9975920 100644
--- a/workshop_app/templates/workshop_app/activation.html
+++ b/workshop_app/templates/workshop_app/activation.html
@@ -12,10 +12,10 @@
</div>
<ul class="nav navbar-nav navbar-right">
{% if request.user.profile.is_email_verified %}
- <li><a href="{{ URL_ROOT }}/view_profile/"><span class="glyphicon glyphicon-user"></span>
+ <li><a href="{% url 'workshop_app:view_profile' %}"><span class="glyphicon glyphicon-user"></span>
Profile</a></li>
- <li><a href="{{ URL_ROOT }}/logout/"><span class="glyphicon glyphicon-log-out"></span> Logout</a>
+ <li><a href="{% url 'workshop_app:logout' %}"><span class="glyphicon glyphicon-log-out"></span> Logout</a>
</li>
{% endif %}
</ul>
@@ -31,15 +31,15 @@
{% if status == '2' %}
<div class="container">
<div class="jumbotron">
- <p> Your email is already verified, Please view your profile <a
- href="{{ URL_ROOT }}/view_profile/">here</a></p>
-
+ <p> Your email is already verified, Please view your profile
+ <a href="{% url 'workshop_app:view_profile' %}">here</a>
+ </p>
</div>
</div>
{% elif status == '1' %}
<script type="text/javascript">
window.setTimeout(function () {
- location.href = "{{ URL_ROOT }}/register/"
+ location.href = "{% url 'workshop_app:register' %}"
}, 3000);
</script>
<div class="container">
@@ -50,15 +50,15 @@
{% elif status == '0' %}
<div class="container">
<div class="jumbotron">
- <p> Your account has been activated. Please view your profile <a href="{{ URL_ROOT }}/view_profile/">here</a>
+ <p> Your account has been activated. Please view your profile
+ <a href="{% url 'workshop_app:view_profile' %}">here</a>
</p>
-
</div>
</div>
{% else %}
<script type="text/javascript">
window.setTimeout(function () {
- location.href = "{{ URL_ROOT }}/logout/"
+ location.href = "{% url 'workshop_app:logout' %}"
}, 5000);
</script>
@@ -66,7 +66,8 @@
<div class="jumbotron">
<h1>Activation Awaiting</h1>
<p>The Activation Link has been sent to your email. The link expires in <strong>24hours</strong> from
- the date of registration. You will be logged out automatically.</p>
+ the date of registration. You will be logged out automatically
+ </p>
</div>
</div>
{% endif %}
diff --git a/workshop_app/templates/workshop_app/base.html b/workshop_app/templates/workshop_app/base.html
index 9655d72..7535f6a 100644
--- a/workshop_app/templates/workshop_app/base.html
+++ b/workshop_app/templates/workshop_app/base.html
@@ -10,22 +10,20 @@
{% endblock %}
</title>
- <link rel="stylesheet" href="{% static 'workshop_app/css/bootstrap.min.css' %}">
<script src="{% static 'workshop_app/js/jquery-3.4.1.min.js' %}"></script>
+ <script src="{% static 'workshop_app/js/bootstrap.min.js' %}"></script>
<script src="{% static 'workshop_app/js/popper.min.js' %}"></script>
-
- <link rel="stylesheet" href="{% static 'workshop_app/css/toastr.min.css' %}">
<script src="{% static 'workshop_app/js/toastr.min.js' %}"></script>
{% block extra-dependencies %}
{% endblock %}
- <script src="{% static 'workshop_app/js/bootstrap.min.js' %}"></script>
+ <link rel="stylesheet" href="{% static 'workshop_app/css/bootstrap.min.css' %}">
+ <link rel="stylesheet" href="{% static 'workshop_app/css/toastr.min.css' %}">
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="stylesheet" href="{% static 'workshop_app/css/base.css' %}" type="text/css"/>
- <!-- favicon -->
- <link rel="shortcut icon" type="image/png" href="{{ URL_ROOT }}/static/workshop_app/img/fevicon_python.png"/>
+ <link rel="stylesheet" href="{% static 'workshop_app/css/font-awesome.css' %}" type="text/css"/>
{% block extra-custom-scripts %}
{% endblock %}
@@ -34,8 +32,12 @@
<body>
{% block header %}
- <nav class=" navbar-custom navbar navbar-expand-lg bg-light fixed-top">
- <a class="navbar-brand" href="/">FOSSEE Python Workshops</a>
+ <nav class="navbar navbar-dark navbar-expand-lg bg-dark fixed-top">
+ {% if user.is_authenticated %}
+ <a class="navbar-brand text-white" href="{% url 'workshop_app:index' %}">FOSSEE Workshops</a>
+ {% else %}
+ <a class="navbar-brand text-white" href="{{request.scheme}}://{{request.get_host}}">FOSSEE Workshops</a>
+ {% endif %}
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
@@ -44,19 +46,19 @@
{% if user.is_authenticated %}
<ul class="navbar-nav mr-auto">
<li class="nav-item">
- <a class="nav-link" href="{% url 'workshop_status_instructor' %}">
+ <a class="nav-link text-white" href="{% url 'workshop_app:workshop_status_instructor' %}">
Workshop Status
</a>
</li>
{% if not request.user|has_group:"instructor" %}
<li class="nav-item">
- <a class="nav-link" href="{% url 'propose_workshop' %}">
+ <a class="nav-link text-white" href="{% url 'workshop_app:propose_workshop' %}">
Propose Workshop
</a>
</li>
{% endif %}
<li class="nav-item">
- <a class="nav-link" href="{% url 'workshop_type_list' %}">
+ <a class="nav-link text-white" href="{% url 'workshop_app:workshop_type_list' %}">
Workshop Types
</a>
</li>
@@ -64,7 +66,7 @@
<div class="my-2 my-lg-0">
<ul class="navbar-nav mr-auto">
<li class="nav-item dropdown">
- <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button"
+ <a class="nav-link dropdown-toggle text-white" href="#" id="navbarDropdown" role="button"
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<span class="material-icons" style="vertical-align: middle">account_circle</span>
<p style="display: inline; vertical-align: middle">
@@ -72,8 +74,8 @@
</p>
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdown">
- <a class="dropdown-item" href="/view_profile/">Profile</a>
- <a class="dropdown-item" href="/logout">Logout</a>
+ <a class="dropdown-item" href="{% url 'workshop_app:view_own_profile' %}">Profile</a>
+ <a class="dropdown-item" href="{% url 'workshop_app:logout' %}">Logout</a>
</div>
</li>
</ul>
@@ -99,8 +101,10 @@
</body>
<footer class="footer">
- <div class="container">
- Developed by FOSSEE group, IIT Bombay
- </div>
+ {% block footer %}
+ <div class="container">
+ Developed by FOSSEE group, IIT Bombay
+ </div>
+ {% endblock %}
</footer>
</html>
diff --git a/workshop_app/templates/workshop_app/login.html b/workshop_app/templates/workshop_app/login.html
index fc50ae8..dae22bc 100644
--- a/workshop_app/templates/workshop_app/login.html
+++ b/workshop_app/templates/workshop_app/login.html
@@ -5,41 +5,29 @@
{% endblock %}
{% block content %}
- <div class="container" align="center">
- <br>
- <div class="col-md-6 col-md-offset-6">
- <div class="card border-primary">
- <div class="card-header">
- <h3>Log in</h3>
- </div>
- <div class="card-body">
- <div class="form-group">
- <form method="post">
- {% csrf_token %}
- {{ form.username }}
- <br>
- {{ form.password }}
- <br>
- <button class="btn btn-success btn-md" style="width: 40%" type="submit">
- Login
- </button>
- <br><br>
- <div class="row">
- <div class="col-md-6">
- <a class="btn btn-info" href="{% url 'register' %}">
- Register
- </a>
- </div>
- <div class="col-md-5">
- <a href="{% url 'password_reset' %}" class="btn btn-outline-primary">Forgot Password?
- </a>
- </div>
- </div>
+ <div class="container">
+ <div class="row justify-content-center">
+ <div class="col-md-6 col-md-offset-6">
+ <div class="card">
+ <div class="card-body">
+ <form class="px-3 py-3" method="post">
+ {% csrf_token %}
+ <div class="form-group">
+ <label for="id_username">Username</label>
+ {{ form.username }}
+ </div>
+ <div class="form-group">
+ <label for="id_password">Password</label>
+ {{ form.password }}
+ </div>
+ <button type="submit" class="btn btn-primary">Sign in</button>
</form>
+ <div class="dropdown-divider"></div>
+ <a class="dropdown-item" href="{% url 'workshop_app:register' %}">New around here? Sign up</a>
+ <a class="dropdown-item" href="{% url 'password_reset' %}">Forgot password?</a>
</div>
- </div>
+ </div>
</div>
</div>
- <br>
</div>
{% endblock %}
diff --git a/workshop_app/templates/workshop_app/logout.html b/workshop_app/templates/workshop_app/logout.html
index 316d3dc..3f89043 100644
--- a/workshop_app/templates/workshop_app/logout.html
+++ b/workshop_app/templates/workshop_app/logout.html
@@ -10,7 +10,7 @@
<br>
<h3>You have logged out successfully.</h3>
<h4>If you want to login again please
- <a href="{% url 'index' %}">click here</a>
+ <a href="/">click here</a>
</h4>
<br>
</div>
diff --git a/workshop_app/templates/workshop_app/workshop_details.html b/workshop_app/templates/workshop_app/workshop_details.html
index 723794d..c45e2bf 100644
--- a/workshop_app/templates/workshop_app/workshop_details.html
+++ b/workshop_app/templates/workshop_app/workshop_details.html
@@ -10,7 +10,7 @@
<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>
+ href="{% url 'workshop_app:workshop_type_details' workshop.workshop_type_id %}">{{ workshop.workshop_type }}</a></label>
</td>
</tr>
<tr>
@@ -41,6 +41,24 @@
</table>
<br>
<div class="container">
+ <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>
+ <br><br>
<h2 class="text-center">Comments</h2>
<br>
{% for comment in workshop_comments %}
@@ -48,7 +66,7 @@
<div class="card-header">
<div class="row">
<div class="ml-3 font-weight-bold"><a
- href="{% url 'view_profile' comment.author_id %}">{{ comment.author }}</a></div>
+ href="{% url 'workshop_app:view_profile' comment.author_id %}">{{ comment.author }}</a></div>
{% if not comment.public %}
<div class="ml-1"><span class="badge badge-dark">Hidden</span></div>
{% endif %}
@@ -60,24 +78,6 @@
</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>
diff --git a/workshop_app/templates/workshop_app/workshop_status_coordinator.html b/workshop_app/templates/workshop_app/workshop_status_coordinator.html
index e1c790a..413f7d2 100644
--- a/workshop_app/templates/workshop_app/workshop_status_coordinator.html
+++ b/workshop_app/templates/workshop_app/workshop_status_coordinator.html
@@ -30,7 +30,7 @@
<br>
<div class="container">
<h3 class="text-center table-heading"><strong>Workshops Accepted</strong></h3>
- <table class="table table-striped">
+ <table class="table table-striped table-responsive-sm">
<thead>
<tr>
<th>Workshop Name</th>
@@ -44,7 +44,7 @@
<tbody>
<tr>
{% if workshop.status %}
- <td><a href="{% url 'workshop_details' workshop.id %}" >{{ workshop.workshop_type |capfirst }}</a></td>
+ <td><a href="{% url 'workshop_app:workshop_details' workshop.id %}" >{{ workshop.workshop_type |capfirst }}</a></td>
<td>{{ workshop.instructor.get_full_name }}</td>
<td>{{ workshop.date | date }}</td>
<td><span class="badge badge-success">{{ workshop.get_status }}</span></td>
@@ -61,7 +61,7 @@
<br>
<div class="container">
<h3 class="text-center table-heading"><strong>Workshops Proposed By Me</strong></h3>
- <table class="table table-striped">
+ <table class="table table-striped table-responsive-sm">
<thead>
<tr>
<th>Workshop Name</th>
@@ -73,7 +73,7 @@
<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 'workshop_app: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 2cb25d9..f699641 100644
--- a/workshop_app/templates/workshop_app/workshop_status_instructor.html
+++ b/workshop_app/templates/workshop_app/workshop_status_instructor.html
@@ -40,7 +40,7 @@
<br>
<div class="container">
<h3 align="center" class="table-heading"><strong>Workshops Accepted</strong></h3>
- <table class="table table-striped">
+ <table class="table table-striped table-responsive-sm">
<thead>
<tr>
<th>Coordinator Name</th>
@@ -55,7 +55,7 @@
<tr>
{% if workshop.status %}
<td>
- <a href="{% url 'view_profile' workshop.coordinator.profile.user.id %}">
+ <a href="{% url 'workshop_app:view_profile' workshop.coordinator.id %}">
{{ workshop.coordinator.get_full_name }}</a>
</td>
<td>{{ workshop.coordinator.profile.institute }}</td>
@@ -70,7 +70,7 @@
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 %}">
+ <form method="post" action="{% url 'workshop_app:change_workshop_date' workshop.id %}">
<input type="text" placeholder="New date" name="new_date"
class="rDate{{ forloop.counter }}"/><br>
{% csrf_token %}
@@ -95,7 +95,7 @@
<div class="container">
<h3 class="text-center table-heading"><strong>Workshops Proposed By Coordinators</strong>
</h3>
- <table class="table table-striped">
+ <table class="table table-striped table-responsive-sm">
<thead>
<tr>
<th>Coordinator Name</th>
@@ -112,7 +112,7 @@
<tr>
{% if not workshop.status and workshop.tnc_accepted %}
<td>
- <a href="{% url 'view_profile' workshop.coordinator.profile.user.id %}">
+ <a href="{% url 'workshop_app:view_profile' workshop.coordinator.id %}">
{{ workshop.coordinator.get_full_name }}</a>
</td>
<td>{{ workshop.coordinator.profile.institute }}</td>
@@ -120,7 +120,7 @@
<td>{{ workshop.date | date }}</td>
<td><span class="badge badge-warning">{{ workshop.get_status }}</span></td>
<td>
- <a href="{% url 'accept_workshop' workshop.id %}" class="btn btn-primary btn-sm" onclick="return confirm('Once accepted you cannot reject, you have to personally contact the Coordinator if the workshop is to be cancelled. Are you sure you want to accept the workshop?')">
+ <a href="{% url 'workshop_app:accept_workshop' workshop.id %}" class="btn btn-primary btn-sm" onclick="return confirm('Once accepted you cannot reject, you have to personally contact the Coordinator if the workshop is to be cancelled. Are you sure you want to accept the workshop?')">
Accept
</a>
</td>
diff --git a/workshop_app/templates/workshop_app/workshop_type_list.html b/workshop_app/templates/workshop_app/workshop_type_list.html
index 3b60656..2369cc9 100644
--- a/workshop_app/templates/workshop_app/workshop_type_list.html
+++ b/workshop_app/templates/workshop_app/workshop_type_list.html
@@ -9,7 +9,7 @@
<h2 class="text-center">Workshop Types</h2>
<br>
{% if request.user|has_group:"instructor" %}
- <a href="{% url 'add_workshop_type' %}">
+ <a href="{% url 'workshop_app:add_workshop_type' %}">
<button class="btn btn-md btn-primary float-right mb-3 mx-4">Add Workshop Type</button>
</a>
<br>
@@ -18,9 +18,9 @@
<table class="table table-hover">
<thead>
<tr>
- <th>id</th>
+ <th>Sr No</th>
<th>Workshop Name</th>
- <th>Workshop Duration</th>
+ <th>Workshop Duration (Days)</th>
<th>Action</th>
</tr>
</thead>
@@ -31,7 +31,7 @@
<td scope="row" id="{{ forloop.counter }}">{{ forloop.counter }}</td>
<td>{{ w.name }}</td>
<td>{{ w.duration }}</td>
- <td><a href="{{URL_ROOT}}/workshop_type_details/{{ w.id }}" class="btn btn-outline-info" class="accordion-toggle" >View Workshop Details</a></td>
+ <td><a href="{% url 'workshop_app:workshop_type_details' w.id %}" class="btn btn-outline-info" class="accordion-toggle" >View Workshop Details</a></td>
</tr>
</tbody>
{% endfor %}