sprint/templates/block.html
Egor Matveev 9c0123cbf2 initial
2021-07-11 10:28:12 +03:00

39 lines
1.5 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{% 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 %}