This commit is contained in:
Egor Matveev
2021-07-11 10:28:12 +03:00
commit 9c0123cbf2
102 changed files with 6285 additions and 0 deletions

30
templates/main.html Normal file
View File

@@ -0,0 +1,30 @@
{% extends 'base.html' %}
{% load filters %}
{% block title %}Главная{% endblock %}
{% block content %}
<h2>Доступные курсы</h2>
{% for key, value in blocks.items %}
<h5>{{ key.name }}</h5>
{% for block in value %}
<table>
<tr>
<td>
<a href="/block?id={{ block.id }}">{{ block.name }}</a>
</td>
<td>
{% with mark=block|mark_for_block:user %}
{% if mark|marked %}
<div style="margin-left: 20px; border: 1px solid black; background: {{ mark|mark_color }}; width: 25px; text-align: center;">
{{ mark }}
</div>
{% endif %}
{% endwith %}
</td>
</tr>
</table>
{% endfor %}
{% endfor %}
{% endblock %}