added messages for cases of null sets

parent 3b655d81
{% extends 'base.html' %}
{% load static %}
{% block styles %}
{% load static %}
<link rel="stylesheet" type="text/css" href="{% static 'assignments/css/style.css' %}">
{% endblock %}
{% block title %}Assignments{% endblock %}
{% block content %}
{% block header %}Assignments Per Course{% endblock %}
<h1>Assignments Per Course</h1>
<p>List of courses:</p>
<ul>
{% block content %}
<p id="table-caption">List of courses:</p>
{% if all_courses.count == 0 %}
<p id="no-courses">No courses found.</p>
{% else %}
<ul id="table">
{% for course in all_courses %}
<li>{{course.code}} {{course.title}} {{course.section}}</li>
<ul>
{% if course.assignment_set.all.count == 0 %}
<li>No assignments found.</li>
{% else %}
{% for assignment in course.assignment_set.all %}
<a href='{{request.path}}{{assignment.pk}}/details'><li>{{assignment.name}}</li></a>
{% endfor %}
{% endif %}
</ul>
{% endfor %}
</ul>
{% endif %}
{% 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