initial
This commit is contained in:
39
templates/block.html
Normal file
39
templates/block.html
Normal 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 %}
|
Reference in New Issue
Block a user