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.

33 lines
1.3 KiB

<html>
<body>
<nav>
<a href="{% url 'home' %}">Home</a>
{% if person.name == '' %}
<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 'logout' %}">Logout</a>
{% endif %}
</nav>
<form action="{% url 'search_form' %}" method="POST">
{% csrf_token %}
<fieldset>
<legend><h1>Search</h1></legend>
{% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
<label for="keywords">Keywords</label><br>
<input name="keywords" id="keywords" placeholder="Keywords separated by spaces"><br/>
</fieldset>
<input type="submit" value="Search">
</form>
{% if courses %}
{% for course in courses %}
<a href="{% url 'details' course.id %}">{{ course.title }}</a>
{% endfor %}
{% else %}
<p>No course found</p>
{% endif %}
</body>
</html>