Skip to content

Commit 9494a32

Browse files
committed
step 4 done.
1 parent b00fd6b commit 9494a32

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
{% extends 'layout.html' %}
2+
{% block sidebar %}
3+
{% with messages = get_flashed_messages(with_categories=true) %}
4+
{% if messages %}
5+
<div>
6+
{% for category, message in messages %}
7+
<div class="alert alert-{{ category }}" role="alert">
8+
{{ message }}
9+
</div>
10+
{% endfor %}
11+
</div>
12+
{% endif %}
13+
{% endwith %}
14+
{% endblock sidebar %}
15+
{% block content %}
16+
<body>
17+
<div class="container mt-4">
18+
<h1>Детали URL</h1>
19+
<p><strong>ID:</strong> {{ url[0] }}</p>
20+
<p><strong>Название:</strong> {{ url[1] }}</p> <!-- name -->
21+
<p><strong>Дата создания:</strong> {{ url[2] }}</p> <!-- created_at -->
22+
23+
<form method="POST" action="{{ url_for('add_check', url_id=url[0]) }}">
24+
<button type="submit" class="btn btn-primary">Добавить проверку</button>
25+
</form>
26+
27+
<h2>Проверки:</h2>
28+
<table class="table" data-test="checks">
29+
<thead>
30+
<tr>
31+
<th>ID</th>
32+
<th>Дата проверки</th>
33+
</tr>
34+
</thead>
35+
<tbody>
36+
{% for check in checks %}
37+
<tr>
38+
<td>{{ check[0] }}</td>
39+
<td>{{ check[6] }}</td> <!-- created_at -->
40+
</tr>
41+
{% endfor %}
42+
</tbody>
43+
</table>
44+
45+
<a href="{{ url_for('urls') }}" class="btn btn-secondary">Назад к списку</a>
46+
</div>
47+
</body>
48+
</html>
49+
{% endblock %}

0 commit comments

Comments
 (0)