Первый коммит: загрузка проекта SecretText
This commit is contained in:
@@ -0,0 +1,94 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Мои секреты{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="d-flex justify-content-between align-items-center mb-4">
|
||||
<h4 class="fw-normal">Мои секреты</h4>
|
||||
<a href="{{ url_for('index') }}" class="btn btn-secondary">
|
||||
<i class="bi"></i> Создать секрет
|
||||
</a>
|
||||
</div>
|
||||
|
||||
{% if secrets %}
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover align-middle">
|
||||
<thead class="table-light">
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Тип</th>
|
||||
<th>Примечание</th>
|
||||
<th>Создан</th>
|
||||
<th>Статус</th>
|
||||
<th>Просмотрен</th>
|
||||
<th>Действия</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for secret in secrets %}
|
||||
<tr>
|
||||
<td>
|
||||
<code class="text-muted small">{{ secret.secret_id[:12] }}...</code>
|
||||
</td>
|
||||
<td>
|
||||
{% if secret.is_request %}
|
||||
<span class="badge bg-warning text-dark">
|
||||
<i class="bi bi-arrow-down-circle"></i> Получен
|
||||
</span>
|
||||
{% else %}
|
||||
<span class="badge bg-info">
|
||||
<i class="bi bi-arrow-up-circle"></i> Создан
|
||||
</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if secret.request_note %}
|
||||
<span class="text-muted small">{{ secret.request_note|e if secret.request_note else '-' }}</span>
|
||||
{% elif secret.is_request %}
|
||||
<span class="text-muted fst-italic small">Без примечания</span>
|
||||
{% else %}
|
||||
<span class="text-muted fst-italic small">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<span class="text-muted small">{{ secret.created_at|format_datetime }}</span>
|
||||
</td>
|
||||
<td>
|
||||
{% if secret.is_viewed %}
|
||||
<span class="badge bg-secondary">Просмотрен</span>
|
||||
{% else %}
|
||||
<span class="badge bg-success">Активен</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
{% if secret.is_viewed %}
|
||||
<span class="text-muted small">{{ secret.viewed_at|format_datetime }}</span>
|
||||
{% else %}
|
||||
<span class="text-muted small">—</span>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td>
|
||||
<div class="btn-group btn-group-sm">
|
||||
{% if not secret.is_viewed %}
|
||||
<a href="{{ url_for('view_secret', secret_id=secret.secret_id) }}"
|
||||
class="btn btn-outline-secondary" title="Просмотреть секрет">
|
||||
<i class="bi bi-eye"></i>
|
||||
</a>
|
||||
{% else %}
|
||||
<span class="text-muted small">Просмотрен</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="text-center py-5">
|
||||
<i class="bi bi-inbox display-1 text-secondary"></i>
|
||||
<p class="text-secondary mt-3">У вас пока нет секретов</p>
|
||||
<a href="{{ url_for('index') }}" class="btn btn-secondary">Создать первый секрет</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user