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.
65 lines
2.8 KiB
65 lines
2.8 KiB
<html>
|
|
<head>
|
|
{% load static %}
|
|
<link rel="stylesheet" href="{% static 'redis_app/style.css' %}">
|
|
</head>
|
|
<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>
|
|
<div class="body">
|
|
<div class="container">
|
|
<div class="div-container">
|
|
<div class="create-container">
|
|
{% if error_message %}
|
|
<p class="error-message">{{ error_message }}</p>
|
|
{% endif %}
|
|
{% if success_message %}
|
|
<p class="success-message">{{ success_message }}</p>
|
|
{% endif %}
|
|
{% if person %}
|
|
{% if person.role == "Teacher" %}
|
|
<div>
|
|
<a href="{% url 'create_course' %}" class="create-course">
|
|
<p class="plus">
|
|
+
|
|
</p>
|
|
<p>
|
|
Create
|
|
</p>
|
|
</a>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
</div>
|
|
<h1>Courses for {{ person.name }}</h1>
|
|
{% if courses %}
|
|
<div class="courses">
|
|
{% for course in courses %}
|
|
<a href="{% url 'details' course.id %}" class="course-link">{{ course.title }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
{% else %}
|
|
<p class="no-courses">No course yet</p>
|
|
{% endif %}
|
|
<p class="register-link">
|
|
Register to a course by <a href="{% url 'search' %}">Searching</a>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |