You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
2.1 KiB
59 lines
2.1 KiB
<html>
|
|
<body>
|
|
<nav>
|
|
<a href="{% url 'home' %}">Home</a>
|
|
{% if person == '' %}
|
|
<a href="{% url 'login_form' %}">Login</a>
|
|
<a href="{% url 'register_form' %}">Register</a>
|
|
{% else %}
|
|
<a href="{% url 'courses' %}">Courses</a>
|
|
<a href="{% url 'profile' %}">Profile</a>
|
|
<a href="{% url 'search' %}">Search</a>
|
|
<a href="{% url 'notifications_view' %}">Notifications</a>
|
|
{% if person.role == 'Teacher' %}
|
|
<a href="{% url 'publish_message' %}">Publish a message</a>
|
|
{% endif %}
|
|
<a href="{% url 'logout' %}">Logout</a>
|
|
{% endif %}
|
|
</nav>
|
|
{% if error_message %}
|
|
{{ error_message }}
|
|
{% endif %}
|
|
{% if success_message %}
|
|
{{ success_message }}
|
|
{% endif %}
|
|
{% if course %}
|
|
<h1>Welcome in the course {{ course.title }}!</h1>
|
|
<p>
|
|
{{ course.summary }}
|
|
</p>
|
|
<p>
|
|
This course is for {{ course.getLevel }} students
|
|
</p>
|
|
<p>
|
|
There's only {{ course.places }} places
|
|
</p>
|
|
<p>
|
|
The course has been created by {{ course.teacher_name }}
|
|
</p>
|
|
{% else %}
|
|
<h1>No course found!</h1>
|
|
{% endif %}
|
|
{% if person %}
|
|
{% if person.role == "Teacher" %}
|
|
<a href="{% url 'delete_course' course.id %}">Delete</a>
|
|
<a href="{% url 'update_course' course.id %}">Update</a>
|
|
{% else %}
|
|
{% if register %}
|
|
<a href="{% url 'course_unregister' course.id %}">Unregister</a>
|
|
{% else %}
|
|
{% if full == False %}
|
|
<a href="{% url 'course_register' course.id %}">Register</a>
|
|
{% else %}
|
|
<p>The course if full.</p>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endif %}
|
|
</body>
|
|
</html> |