|
8 | 8 | <div class="container"> |
9 | 9 | <div class="row mb-5"> |
10 | 10 | <div class="col"> |
11 | | - <h1 class="mt-4 mb-3">{{ module.title }}</h1> |
| 11 | + <h1 class="mt-4 mb-3">{{ module.title }} - |
| 12 | + {% if module.finished_topics_count == module.topics_count %} |
| 13 | + <span class="badge badge-pill btn-success">{{ module.finished_topics_count }}/{{ module.topics_count }}</span> |
| 14 | + {% else %} |
| 15 | + <span class="badge badge-pill btn-danger">{{ module.finished_topics_count }}/{{ module.topics_count }}</span> |
| 16 | + {% endif %} |
| 17 | + </h1> |
12 | 18 | <dt>Objetivo</dt> |
13 | 19 | <dd> |
14 | 20 | <ul> |
@@ -40,15 +46,34 @@ <h1 class="mt-4 mb-3">{{ module.title }}</h1> |
40 | 46 | <dd> |
41 | 47 | <ol> |
42 | 48 | {% for section in module.sections %} |
43 | | - <li><a href="{{ section.get_absolute_url }}">{{ section.title }}</a></li> |
| 49 | + <li><a href="{{ section.get_absolute_url }}">{{ section.title }}</a> - |
| 50 | + {% if section.finished_topics_count == section.topics_count %} |
| 51 | + <span class="badge badge-pill btn-success">{{ section.finished_topics_count }}/{{ section.topics_count }}</span> |
| 52 | + {% else %} |
| 53 | + <span class="badge badge-pill btn-danger">{{ section.finished_topics_count }}/{{ section.topics_count }}</span> |
| 54 | + {% endif %} |
| 55 | + </li> |
44 | 56 | <dd> |
45 | 57 | <ol> |
46 | 58 | {% for chapter in section.chapters %} |
47 | | - <li><a href="{{ chapter.get_absolute_url }}">{{ chapter.title }}</a></li> |
| 59 | + <li><a href="{{ chapter.get_absolute_url }}">{{ chapter.title }} - |
| 60 | + {% if chapter.finished_topics_count == chapter.topics_count %} |
| 61 | + <span class="badge badge-pill btn-success">{{ chapter.finished_topics_count }}/{{ chapter.topics_count }}</span> |
| 62 | + {% else %} |
| 63 | + <span class="badge badge-pill btn-danger">{{ chapter.finished_topics_count }}/{{ chapter.topics_count }}</span> |
| 64 | + {% endif %} |
| 65 | + </a></li> |
48 | 66 | <dd> |
49 | 67 | <ol> |
50 | 68 | {% for topic in chapter.topics %} |
51 | 69 | <li><a href="{{ topic.get_absolute_url }}">{{ topic.title }}</a> |
| 70 | + {% if topic.finished_topics_count == 1 %} |
| 71 | + - |
| 72 | + <span class="badge badge-pill badge-success">✓</span> |
| 73 | + {% else %} |
| 74 | + - |
| 75 | + <span class="badge badge-pill badge-danger">X</span> |
| 76 | + {% endif %} |
52 | 77 | </li> |
53 | 78 | {% empty %} |
54 | 79 | <li>Nenhuma aula foi definida ainda</li> |
|
0 commit comments