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

39
templates/block.html Normal file
View File

@@ -0,0 +1,39 @@
{% extends 'base.html' %}
{% load filters %}
{% block title %}{{ Block.name }}{% endblock %}
{% block content %}
<h3>{{ Block.name }} {% if can_edit %}<a style="color: black;" href="/admin/block?id={{ Block.id }}"><i class="fa fa-pencil"></i></a> {% endif %}</h3>
<h5>Таски</h5>
<table>
{% for task in Block.tasks %}
<tr>
<td>
<a href="/task?id={{ task.id }}">{{ task.name }}</a>
</td>
<td>
{% with mark=task|mark_for_task: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>
{% endfor %}
</table>
{% if Block.show_rating %}
<a href="/rating?block_id={{ Block.id }}" class="btn btn-dark" style="margin-top: 15px;"><i class="fa fa-star"></i> Рейтинг</a>
{% endif %}
<a href="/messages?block_id={{ Block.id }}" class="btn btn-dark" style="margin-top: 15px;"><i class="fa fa-comments"></i> Сообщения</a>
<hr>
{% if Block.opened %}
Открыто для просмотра
{% else %}
Закрыто для просмотра
{% endif %}
<br>Доступно с <b>{{ Block.time_start }}</b> до <b>{{ Block.time_end }}</b>
{% endblock %}