diff options
author | ankitjavalkar | 2017-04-19 11:01:08 +0530 |
---|---|---|
committer | ankitjavalkar | 2017-04-27 17:42:26 +0530 |
commit | 574b57c65d55d1f22a4907812ef22d2b44f8576c (patch) | |
tree | cf81bc252fef165d309e879d13d323ce9f47014e /yaksh | |
parent | 37a4f9704bcd7e3590b61ff4668bc547a232ed7f (diff) | |
download | online_test-574b57c65d55d1f22a4907812ef22d2b44f8576c.tar.gz online_test-574b57c65d55d1f22a4907812ef22d2b44f8576c.tar.bz2 online_test-574b57c65d55d1f22a4907812ef22d2b44f8576c.zip |
Display a message in case there are no courses to display
Diffstat (limited to 'yaksh')
-rw-r--r-- | yaksh/templates/yaksh/quizzes_user.html | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/yaksh/templates/yaksh/quizzes_user.html b/yaksh/templates/yaksh/quizzes_user.html index c34138f..4559e09 100644 --- a/yaksh/templates/yaksh/quizzes_user.html +++ b/yaksh/templates/yaksh/quizzes_user.html @@ -1,21 +1,26 @@ {% extends "user.html" %} {% block pagetitle %} {{ title }} {% endblock %} {% block main %} -<div class="row well"> - <form action="{{ URL_ROOT }}/exam/quizzes/" method="post" id="custom-search-form" class="form-search form-horizontal pull-right"> - {% csrf_token %} - <div class="col-md-12"> - <div class="input-group"> - <span class="input-group-addon" id="basic-addon1">Search Course</span> - <input type="text" name="course_code" class="form-control" placeholder="Course Code"> - <span class="input-group-btn"> - <button class="btn btn-default" type="submit">Search</button> - <button class="btn btn-default" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/quizzes/");'>Cancel</button> - </span> - </div> + {% if 'Enrolled Courses' not in title%} + <div class="row well"> + <form action="{{ URL_ROOT }}/exam/quizzes/" method="post" id="custom-search-form" class="form-search form-horizontal pull-right"> + {% csrf_token %} + <div class="col-md-12"> + <div class="input-group"> + <span class="input-group-addon" id="basic-addon1">Search Course</span> + <input type="text" name="course_code" class="form-control" placeholder="Course Code"> + <span class="input-group-btn"> + <button class="btn btn-default" type="submit">Search</button> + <button class="btn btn-default" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/exam/quizzes/");'>Cancel</button> + </span> + </div> + </div> + </form> </div> - </form> -</div> + {% endif %} +{% if not courses %} +No Courses to display +{% endif %} {% for course in courses %} <div class="row well"> <div class="col-md-12"> @@ -24,6 +29,8 @@ <h4><b><u> {{ course.name }} by {{ course.creator.get_full_name }}</u></b></h4> </div> <div class="col-md-4"> + {% if course.hidden %}<span class="label label-info">Hidden</span> + {% endif %} {% if user in course.requests.all %} <span class="label label-warning">Request Pending </span> {% elif user in course.rejected.all %}<span class="label label-danger">Request Rejected</span> {% elif user in course.students.all %}<span class="label label-info">Enrolled</span> |