added messages for cases of null sets

parent 3b655d81
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %}
{% block styles %} {% block styles %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'assignments/css/style.css' %}"> <link rel="stylesheet" type="text/css" href="{% static 'assignments/css/style.css' %}">
{% endblock %} {% endblock %}
{% block title %}Assignments{% endblock %} {% block title %}Assignments{% endblock %}
{% block content %} {% block header %}Assignments Per Course{% endblock %}
<h1>Assignments Per Course</h1> {% block content %}
<p>List of courses:</p> <p id="table-caption">List of courses:</p>
<ul> {% if all_courses.count == 0 %}
<p id="no-courses">No courses found.</p>
{% else %}
<ul id="table">
{% for course in all_courses %} {% for course in all_courses %}
<li>{{course.code}} {{course.title}} {{course.section}}</li> <li>{{course.code}} {{course.title}} {{course.section}}</li>
<ul> <ul>
{% if course.assignment_set.all.count == 0 %}
<li>No assignments found.</li>
{% else %}
{% for assignment in course.assignment_set.all %} {% for assignment in course.assignment_set.all %}
<a href='{{request.path}}{{assignment.pk}}/details'><li>{{assignment.name}}</li></a> <a href='{{request.path}}{{assignment.pk}}/details'><li>{{assignment.name}}</li></a>
{% endfor %} {% endfor %}
{% endif %}
</ul> </ul>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %}
{% endblock %} {% endblock %}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment