Simplified printing of courses in index
- Author
- Maarten 'Vngngdn' Vangeneugden
- Date
- April 14, 2018, 11:08 p.m.
- Hash
- 3b1bea45175455d37fa5e39b6fa0119d32b30d32
- Parent
- 9bb1f8344aad5caca54a93e25fa2a4f30d14150b
- Modified file
- courses/templates/courses/index.djhtml
courses/templates/courses/index.djhtml ¶
4 additions and 6 deletions.
View changes Hide changes
1 |
1 |
{% load i18n %} |
2 |
2 |
|
3 |
3 |
{% block title %} |
4 |
4 |
{#{% trans "◀ Joeni /▶ | Courses" %}#} |
5 |
5 |
{% trans "Courses" %} | {{ block.super }} |
6 |
6 |
{% endblock %} |
7 |
7 |
|
8 |
8 |
{% block main %} |
9 |
9 |
<h1>{% trans "Your courses" %}</h1> |
10 |
10 |
<ul> |
11 |
- | {% for course in courses %} |
+ |
11 |
{% for course in courses %} |
12 |
12 |
<li> |
+ |
13 |
|
+ |
14 |
<li> |
13 |
15 |
<a href="{% url 'courses-course-index' course_slug=course.slug_name %}"> |
14 |
16 |
{{ course.name|lower|capfirst }} |
15 |
- | {% if course.number < 10 %}(000{{ course.number }}) |
16 |
- | {% elif course.number < 100 %}(00{{ course.number }}) |
17 |
- | {% elif course.number < 1000 %}(0{{ course.number }}) |
18 |
- | {% else %}({{ course.number }}){% endif %} |
19 |
- | </a> |
+ |
17 |
</a> |
20 |
18 |
</li> |
21 |
19 |
{% endfor %} |
22 |
20 |
</ul> |
23 |
21 |
{% endblock main %} |
24 |
22 |