summaryrefslogtreecommitdiff
path: root/yaksh/templates
diff options
context:
space:
mode:
authoradityacp2016-03-31 19:42:44 +0530
committeradityacp2016-04-15 14:01:51 +0530
commitc140d65ab1a3c4faa97789e08223d563cf283d25 (patch)
tree1604dc89ae0a7e66f18e4a6f8fde3eda7e5b54af /yaksh/templates
parent234cf831861045796a7bcf4e08a46b0c38016f75 (diff)
downloadonline_test-c140d65ab1a3c4faa97789e08223d563cf283d25.tar.gz
online_test-c140d65ab1a3c4faa97789e08223d563cf283d25.tar.bz2
online_test-c140d65ab1a3c4faa97789e08223d563cf283d25.zip
changes in edit profile, enrollment, change password
Diffstat (limited to 'yaksh/templates')
-rw-r--r--yaksh/templates/yaksh/course_detail.html55
-rw-r--r--yaksh/templates/yaksh/editprofile.html4
-rw-r--r--yaksh/templates/yaksh/view_profile.html22
3 files changed, 44 insertions, 37 deletions
diff --git a/yaksh/templates/yaksh/course_detail.html b/yaksh/templates/yaksh/course_detail.html
index 2e17035..dbb7b73 100644
--- a/yaksh/templates/yaksh/course_detail.html
+++ b/yaksh/templates/yaksh/course_detail.html
@@ -9,73 +9,78 @@
{% endblock %}
{% block script %}
<script language="JavaScript" type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/jquery-1.4.2.min.js"></script>
-<script>
-$(document).ready(function(){
-$(".checkall").click( function(){
- if($(this).attr("checked")) {
- $("#enroll-all input:checkbox").each(function(index, element) {
- $(this).attr('checked', true);
- });
- }
- else {
- $("#enroll-all input:checkbox").each(function(index, element) {
- $(this).attr('checked', false);
- });
- }
- });
-});
-</script>
+<script language="JavaScript" type="text/javascript" src="{{ URL_ROOT }}/static/yaksh/js/course.js"></script>
{% endblock %}
{% block manage %}
<div class="row">
<div class="span6 wrap">
<center><b><u>Requests</u></b></center><br>
- <form action="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}" method="post">
- {% csrf_token %}
- <input type="checkbox" class="checkall"/><font size="2">Enroll all</font>
+ {% if course.get_requests %}
+ <input type="checkbox" class="checkall"/>&nbsp;<font size="2">Select all</font>
<div id="enroll-all">
+ <form action="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}/" method="post">
+ {% csrf_token %}
{% for request in course.get_requests %}
<div class="well">
<div class="row">
- <div class="span3" style="padding-top:10px">
- <input type="checkbox" name="check" value="{{ request.id }}"></input>&nbsp;&nbsp;<a href="#" data-toggle="tooltip" title=" Institute: {{ request.profile.institute }}&#013;Department: {{ request.profile.department}}&#013;Roll Number: {{ request.profile.roll_number }}">{{ request.username }}</a><br>
+ <div class="span3" style="padding-top:10px">
+ <input type="checkbox" name="check" value="{{ request.id }}">&nbsp;<a href="#" data-toggle="tooltip" title=" Institute: {{ request.profile.institute }}&#013;Department: {{ request.profile.department}}&#013;Roll Number: {{ request.profile.roll_number }}">&nbsp;{{ request.username }}</a><br>
</div>
<a class="btn success" href="{{URL_ROOT}}/exam/manage/enroll/{{ course.id }}/{{ request.id }}/"> Enroll </a> <a class="btn danger" href="{{URL_ROOT}}/exam/manage/reject/{{ course.id }}/{{ request.id }}/"> Reject </a>
</div>
</div>
{% endfor %}
+ <button class="btn success" type="submit" name='enroll' value='enroll'>Enroll Selected</button>
</div>
+ {% endif %}
+ </form>
</div>
<div class="span6 wrap">
<center><b><u>Rejected</u></b></center><br>
+ {% if course.get_rejected %}
+ <input type="checkbox" class="enroll"/>&nbsp;<font size="2">Select all</font>
+ <div id="enroll">
{% for rejected in course.get_rejected %}
+ <form action="{{URL_ROOT}}/exam/manage/enroll/rejected/{{ course.id }}/" method="post">
+ {% csrf_token %}
<div class="well">
<div class="row">
<div class="span4" style="padding-top:10px">
- {{ rejected.username }}
+ <input type="checkbox" name="check" value="{{ rejected.id }}">&nbsp;{{ rejected.username }}
</div>
<a class="btn success" href="{{URL_ROOT}}/exam/manage/enroll/rejected/{{ course.id }}/{{ rejected.id }}/"> Enroll </a>
</div>
</div>
{% endfor %}
+ <button class="btn success" type="submit" name='enroll' value='enroll'>Enroll Selected</button>
+ </div>
+ {% endif %}
+ </form>
</div>
</div>
<br>
-<button class="btn" type="submit" name='enroll' value='enroll'>Enroll</button>
-</form>
<div class="row">
<div class="span6 offset4 wrap">
<center><b><u>Enrolled</u></b></center><br>
+ {% if course.get_enrolled %}
+ <input type="checkbox" class="reject"/>&nbsp;<font size="2">Select all</font>
+ <div id="reject">
{% for enrolled in course.get_enrolled %}
+ <form action="{{URL_ROOT}}/exam/manage/enrolled/reject/{{ course.id }}/" method="post">
+ {% csrf_token %}
<div class="well">
<div class="row">
<div class="span4" style="padding-top:10px">
- {{ enrolled.username }}
+ <input type="checkbox" name="check" value="{{ enrolled.id }}">&nbsp;{{ enrolled.username }}
</div>
<a class="btn danger" href="{{URL_ROOT}}/exam/manage/enrolled/reject/{{ course.id }}/{{ enrolled.id }}/"> Reject </a>
</div>
</div>
{% endfor %}
+ <button class="btn danger" type="submit" name='reject' value='reject'>Reject Selected</button>
+ </div>
+ {% endif %}
+ </form>
</div>
</div>
<div class="pull-right">
diff --git a/yaksh/templates/yaksh/editprofile.html b/yaksh/templates/yaksh/editprofile.html
index b4cf037..f04f8fb 100644
--- a/yaksh/templates/yaksh/editprofile.html
+++ b/yaksh/templates/yaksh/editprofile.html
@@ -14,8 +14,8 @@
{{ form.as_table }}
</table>
</center>
- <center><button class="btn" type="submit">Edit Profile</button>
- <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/");'>Cancel</button> </center>
+ <center><button class="btn" type="submit">Save</button>
+ <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/manage/viewprofile");'>Cancel</button> </center>
</form>
{% endblock content %}
diff --git a/yaksh/templates/yaksh/view_profile.html b/yaksh/templates/yaksh/view_profile.html
index 27bc5da..a419d92 100644
--- a/yaksh/templates/yaksh/view_profile.html
+++ b/yaksh/templates/yaksh/view_profile.html
@@ -5,44 +5,46 @@
{% block pagetitle %} Online Test {% endblock %}
{% block css %}
<link rel="stylesheet" media="all" type="text/css" href="{{ URL_ROOT }}/static/yaksh/css/base.css" />
+
{% endblock %}
{% block content %}
<ul>
- <a href={{ URL_ROOT }}/exam/manage/editprofile>Edit Profile</a>
- <a href={{ URL_ROOT }}/exam/>Back to Home</a>
+ <a href="{{ URL_ROOT }}/exam/manage/editprofile">Edit Profile</a>
+ <a href="{{ URL_ROOT }}/exam/">Back to Home</a>
</ul>
-
+<div class="well">
<table width="398" border="0" align="center" cellpadding="0">
<tr>
<td height="26" colspan="2"><h2>Your Profile Information</h2> </td>
</tr>
<tr>
- <td width="82" valign="top"><h3>Firstname:</h3></td>
+ <td width="82" valign="top"><h4>Firstname:</h4></td>
<td width="165" valign="top"><h4>{{ user.first_name }}</h4></td>
</tr>
<tr>
- <td valign="top"><h3>Lastname:</h3></td>
+ <td valign="top"><h4>Lastname:</h4></td>
<td valign="top"><h4>{{ user.last_name }}</h4></td>
</tr>
<tr>
- <td valign="top"><h3>Email:</h3><h3></td>
+ <td valign="top"><h4>Email:</h4></td>
<td valign="top"><h4>{{ user.email }}</h4></td>
</tr>
<tr>
- <td valign="top"><h3>Institute:</h3></td>
+ <td valign="top"><h4>Institute:</h4></td>
<td valign="top"><h4>{{ user.profile.institute }}</h4></td>
</tr>
<tr>
- <td valign="top"><h3>Department:</h3></td>
+ <td valign="top"><h4>Department:</h4></td>
<td valign="top"><h4>{{ user.profile.department }}</h4></td>
</tr>
<tr>
- <td valign="top"><h3>Roll Number:</h3></td>
+ <td valign="top"><h4>Roll Number:</h4></td>
<td valign="top"><h4>{{ user.profile.roll_number }}</h4></td>
</tr>
<tr>
- <td valign="top"><h3>Position:</h3></td>
+ <td valign="top"><h4>Position:</h4></td>
<td valign="top"><h4>{{ user.profile.position }}</h4></td>
</tr>
</table>
+</div>
{% endblock %}