67 lines
2.9 KiB
HTML
67 lines
2.9 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="ru">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Projects - Work Volume Tracker</title>
|
|
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet">
|
|
</head>
|
|
<body>
|
|
<div class="container mt-5">
|
|
<div class="d-flex justify-content-between align-items-center mb-4">
|
|
<h1>Projects</h1>
|
|
<div class="d-flex gap-2">
|
|
<a href="/projects/settings/database-reset" class="btn btn-outline-danger">Сброс базы</a>
|
|
<a href="/projects/import" class="btn btn-outline-primary">Импорт проекта</a>
|
|
<a href="/projects/new" class="btn btn-primary">+ Новый проект</a>
|
|
</div>
|
|
</div>
|
|
|
|
{% if request.query_params.get('reset') %}
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
Все данные проекта успешно удалены.
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Закрыть"></button>
|
|
</div>
|
|
{% endif %}
|
|
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
{% if projects %}
|
|
<div class="table-responsive">
|
|
<table class="table table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>ID</th>
|
|
<th>Название</th>
|
|
<th>Договор</th>
|
|
<th>Заказчик</th>
|
|
<th>Статус</th>
|
|
<th>Действия</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for proj in projects %}
|
|
<tr>
|
|
<td>{{ proj.id }}</td>
|
|
<td>{{ proj.name }}</td>
|
|
<td>{{ proj.contract_number }}</td>
|
|
<td>{{ proj.customer }}</td>
|
|
<td>{{ proj.status }}</td>
|
|
<td>
|
|
<a href="/projects/{{ proj.id }}" class="btn btn-sm btn-outline-primary">Открыть</a>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
{% else %}
|
|
<div class="alert alert-info">
|
|
Нет проектов. <a href="/projects/new" class="alert-link">Создайте первый проект</a>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</body>
|
|
</html> |