summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/course_students.html154
1 files changed, 73 insertions, 81 deletions
diff --git a/yaksh/templates/yaksh/course_students.html b/yaksh/templates/yaksh/course_students.html
index 2052a69..e8ca800 100644
--- a/yaksh/templates/yaksh/course_students.html
+++ b/yaksh/templates/yaksh/course_students.html
@@ -3,7 +3,7 @@
<div id="accordian-upload" class="card">
<div class="card-header">
<a class="card-link" data-toggle="collapse" href="#upload_users_csv">
- Upload Users&nbsp;<i class="fa fa-angle-down"></i>
+ Upload Users <i class="fa fa-angle-down"></i>
</a>
</div>
</div>
@@ -48,60 +48,59 @@
<div id="accordian-request" class="card">
<div class="card-header">
<a class="card-link" data-toggle="collapse" href="#requested">
- Requested Students&nbsp;<i class="fa fa-angle-down"></i>
+ Requested Students <i class="fa fa-angle-down"></i>
</a>
</div>
</div>
<div id="requested" class="collapse show" data-parent="#accordion-request">
- {% if requested %}
+ {% if requested_users %}
<br>
- <input type="checkbox" class="checkall"/>&nbsp;
- <font size="5">Select all</font>
+ <input type="checkbox" class="checkall"/> Select all
<div id="enroll-all">
- <form action="{% url 'yaksh:enroll_users' course.id %}" method="post">
+ <form action="{% url 'yaksh:enroll_reject_user' course.id %}" method="post">
{% csrf_token %}
<table id="requested_table" class="tablesorter table table-striped table-responsive-sm course-detail" data-sortlist="[1,0]">
<thead>
<th></th>
- <th>Full Name&nbsp;<i class="fa fa-sort"></i></th>
- <th>Email&nbsp;<i class="fa fa-sort"></i></th>
- <th>Roll Number&nbsp;<i class="fa fa-sort"></i></th>
- <th>Institute&nbsp;<i class="fa fa-sort"></i></th>
- <th>Department&nbsp;<i class="fa fa-sort"></i></th>
+ <th>Full Name <i class="fa fa-sort"></i></th>
+ <th>Email <i class="fa fa-sort"></i></th>
+ <th>Roll Number <i class="fa fa-sort"></i></th>
+ <th>Institute <i class="fa fa-sort"></i></th>
+ <th>Department <i class="fa fa-sort"></i></th>
<th>Enroll/Reject</th>
</thead>
<tbody>
- {% for request in requested %}
+ {% for user in requested_users %}
<tr>
<td>
{{ forloop.counter }}.
- <input type="checkbox" name="check" value="{{ request.id }}">
+ <input type="checkbox" name="check" value="{{ user.id }}">
</td>
- <td>{{request.get_full_name}}</td>
- <td> {{request.email}}</td>
- {% with request.profile as request_profile %}
- <td> {{request_profile.roll_number}}</td>
- <td> {{request_profile.institute}}</td>
- <td> {{request_profile.department}}</td>
+ <td>{{user.get_full_name}}</td>
+ <td> {{user.email}}</td>
+ {% with user.profile as user_profile %}
+ <td> {{user_profile.roll_number}}</td>
+ <td> {{user_profile.institute}}</td>
+ <td> {{user_profile.department}}</td>
{% endwith %}
<td>
- <a class="btn btn-success"
- href="{% url 'yaksh:enroll_user' course.id request.id %}">
- <i class="fa fa-plus-square"></i>
- Enroll </a>
- <a class="btn btn-danger"
- href="{% url 'yaksh:reject_user' course.id request.id %}">
- <i class="fa fa-minus-square"></i>
- Reject </a>
+ <a class="btn btn-success" href="{% url 'yaksh:enroll_user' course.id user.id %}">
+ <i class="fa fa-plus-square"></i>
+ Enroll
+ </a>
+ <a class="btn btn-danger" href="{% url 'yaksh:reject_user' course.id user.id %}">
+ <i class="fa fa-minus-square"></i>
+ Reject
+ </a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
- <button class="btn btn-success btn-lg" type="submit" name='enroll' value='enroll'>
- <i class="fa fa-plus-square"></i>
- Enroll Selected
- </button> <br>
+ <input class="btn btn-success btn-lg" type="submit" name='enroll' value='enroll selected'>
+ </input>
+ <input class="btn btn-danger btn-lg" type="submit" name='reject' value='reject selected'>
+ </input>
</form>
</div>
{% else %}
@@ -116,45 +115,43 @@
<div id="accordian-enrolled" class="card">
<div class="card-header">
<a class="card-link" data-toggle="collapse" href="#enrolled">
- Enrolled Students&nbsp;<i class="fa fa-angle-down"></i>
+ Enrolled Students <i class="fa fa-angle-down"></i>
</a>
</div>
</div>
<div id="enrolled" class="collapse hide" data-parent="#accordion-enrolled">
- {% if enrolled %}
+ {% if enrolled_users %}
<br>
- <input type="checkbox" class="reject"/>&nbsp;
- <font size="5">Select all</font>
+ <input type="checkbox" class="reject"/> Select all
<div id="reject">
- <form action="{% url 'yaksh:reject_users' course.id %}" method="post" id="reject-form">
+ <form action="{% url 'yaksh:reject_enrolled_users' course.id %}" method="post" id="reject-form">
{% csrf_token %}
<table id="enrolled_table" class="tablesorter table table-striped table-responsive-sm course-detail" data-sortlist="[1,0]" style="width: 100%">
<thead>
<th></th>
- <th>Full Name&nbsp;<i class="fa fa-sort"></i></th>
- <th>Email&nbsp;<i class="fa fa-sort"></i></th>
- <th>Roll Number&nbsp;<i class="fa fa-sort"></i></th>
- <th>Institute&nbsp;<i class="fa fa-sort"></i></th>
- <th>Department&nbsp;<i class="fa fa-sort"></i></th>
+ <th>Full Name <i class="fa fa-sort"></i></th>
+ <th>Email <i class="fa fa-sort"></i></th>
+ <th>Roll Number <i class="fa fa-sort"></i></th>
+ <th>Institute <i class="fa fa-sort"></i></th>
+ <th>Department <i class="fa fa-sort"></i></th>
<th>Reject</th>
</thead>
<tbody>
- {% for enroll in enrolled %}
+ {% for user in enrolled_users %}
<tr>
<td>
{{ forloop.counter }}.
- <input type="checkbox" name="check" value="{{ enroll.id }}">
+ <input type="checkbox" name="check" value="{{ user.id }}">
</td>
- <td> {{ enroll.get_full_name|title }} </td>
- <td> {{enroll.email}}</td>
- {% with enroll.profile as enroll_profile %}
- <td> {{enroll_profile.roll_number}}</td>
- <td> {{enroll_profile.institute}}</td>
- <td> {{enroll_profile.department}}</td>
+ <td> {{ user.get_full_name|title }} </td>
+ <td> {{user.email}}</td>
+ {% with user.profile as user_profile %}
+ <td> {{user_profile.roll_number}}</td>
+ <td> {{user_profile.institute}}</td>
+ <td> {{user_profile.department}}</td>
{% endwith %}
<td>
- <a class="btn btn-danger"
- href="{% url 'yaksh:reject_user' course.id enroll.id %}">
+ <a class="btn btn-danger" href="{% url 'yaksh:reject_enrolled_user' course.id user.id %}">
<i class="fa fa-minus-square"></i>
Reject
</a>
@@ -163,10 +160,8 @@
{% endfor %}
</tbody>
</table>
- <button class="btn btn-danger btn-lg" type="submit" name='reject' value='reject'>
- <i class="fa fa-minus-square"></i>
- Reject Selected
- </button> <br>
+ <input class="btn btn-danger btn-lg" type="submit" name='reject' value='reject selected'>
+ </input>
</form>
</div>
{% else %}
@@ -182,56 +177,53 @@
<div id="accordian-rejected" class="card">
<div class="card-header">
<a class="card-link" data-toggle="collapse" href="#rejected">
- Rejected Students&nbsp;<i class="fa fa-angle-down"></i>
+ Rejected Students <i class="fa fa-angle-down"></i>
</a>
</div>
</div>
<div id="rejected" class="collapse hide" data-parent="#accordion-rejected">
- {% if rejected %}
+ {% if rejected_users %}
<br>
- <input type="checkbox" class="enroll"/>&nbsp;
- <font size="5">Select all</font>
+ <input type="checkbox" class="enroll"/> Select all
<div id="enroll">
- <form action="{% url 'yaksh:enroll_rejected' course.id %}" method="post">
+ <form action="{% url 'yaksh:enroll_rejected_users' course.id %}" method="post">
{% csrf_token %}
<table id="rejected_table" class="tablesorter table table-striped table-responsive-sm course-detail" data-sortlist="[1,0]">
<thead>
- <th>Full Name&nbsp;<i class="fa fa-sort"></i></th>
- <th>Email&nbsp;<i class="fa fa-sort"></i></th>
- <th>Roll Number&nbsp;<i class="fa fa-sort"></i></th>
- <th>Institute&nbsp;<i class="fa fa-sort"></i></th>
- <th>Department&nbsp;<i class="fa fa-sort"></i></th>
+ <th>Full Name <i class="fa fa-sort"></i></th>
+ <th>Email <i class="fa fa-sort"></i></th>
+ <th>Roll Number <i class="fa fa-sort"></i></th>
+ <th>Institute <i class="fa fa-sort"></i></th>
+ <th>Department <i class="fa fa-sort"></i></th>
<th>Enroll</th>
</thead>
<tbody>
- {% for reject in rejected %}
+ {% for user in rejected_users %}
<tr>
<td>
{{ forloop.counter }}.
- <input type="checkbox" name="check" value="{{ reject.id }}">
+ <input type="checkbox" name="check" value="{{ user.id }}">
</td>
- <td>{{reject.get_full_name|title}}</td>
- <td> {{reject.email}}</td>
- {% with reject.profile as reject_profile %}
- <td> {{reject_profile.roll_number}}</td>
- <td> {{reject_profile.institute}}</td>
- <td> {{reject_profile.department}}</td>
+ <td>{{user.get_full_name|title}}</td>
+ <td> {{user.email}}</td>
+ {% with user.profile as user_profile %}
+ <td> {{user_profile.roll_number}}</td>
+ <td> {{user_profile.institute}}</td>
+ <td> {{user_profile.department}}</td>
{% endwith %}
<td>
- <a class="btn btn-success"
- href="{% url 'yaksh:enroll_rejected' course.id reject.id %}">
- <i class="fa fa-plus-square"></i>
- Enroll </a>
+ <a class="btn btn-success" href="{% url 'yaksh:enroll_rejected_user' course.id user.id %}">
+ <i class="fa fa-plus-square"></i>
+ Enroll
+ </a>
</td>
</tr>
{% endfor %}
</tbody>
</table>
<br>
- <button class="btn btn-success btn-lg" type="submit" name='enroll' value='enroll'>
- <i class="fa fa-plus-square"></i>
- Enroll Selected
- </button>
+ <input class="btn btn-success btn-lg" type="submit" name='enroll' value='enroll selected'>
+ </input>
<br>
</form>
</div>