101 lines
2.3 KiB
HTML
101 lines
2.3 KiB
HTML
{% extends 'web/base.html' %}
|
|
|
|
{% block main %}
|
|
|
|
<div id='breadcrumbs'>
|
|
<ol class="breadcrumb">
|
|
<li class="breadcrumb-item">
|
|
<a href="{% url 'users' %}">
|
|
Главная
|
|
</a>
|
|
</li>
|
|
</ol>
|
|
</div>
|
|
|
|
<h1>{{ user }}</h1>
|
|
|
|
|
|
<div class="row">
|
|
<div class="col-sm">
|
|
<h2>Записи</h2>
|
|
|
|
<a class="btn btn-primary" href="{% url 'activity_log_create' user.id %}">
|
|
Создать новую запись
|
|
</a>
|
|
|
|
{% if activity_logs %}
|
|
<table class="table">
|
|
<thead>
|
|
<tr>
|
|
<th>
|
|
Активность
|
|
</th>
|
|
<th>
|
|
Когда начал
|
|
</th>
|
|
<th>
|
|
Когда закончил
|
|
</th>
|
|
<th>
|
|
</th>
|
|
<th>
|
|
</th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
{% for activity_log in activity_logs %}
|
|
<tr>
|
|
<td>
|
|
{{ activity_log.activity }}
|
|
</td>
|
|
<td>
|
|
{{ activity_log.start_time }}
|
|
</td>
|
|
<td>
|
|
{{ activity_log.end_time }}
|
|
</td>
|
|
<td>
|
|
|
|
|
|
<form method="get" action="{% url 'activity_log_update' user.id activity_log.id %}">{% csrf_token %}
|
|
<input class="btn btn-outline-primary" type="submit" value="изменить">
|
|
</form>
|
|
</td>
|
|
<td>
|
|
<form method="post" action="{% url 'activity_log_delete' user.id activity_log.id %}">{% csrf_token %}
|
|
<input class="btn btn-outline-primary" type="submit" value="удалить">
|
|
</form>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
{% else %}
|
|
<li>Ничего не залогано :(</li>
|
|
{% endif %}
|
|
</div>
|
|
|
|
<div class="col-sm">
|
|
<img src="{% url 'user_charts_pie' user.id %}"/>
|
|
|
|
<h2>Активности</h2>
|
|
<ul>
|
|
{% for activity in activities %}
|
|
<li>
|
|
<a href="{% url 'user_charts_activity' user.id activity.id %}">
|
|
{{ activity }}
|
|
</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
{% endblock %}
|