This commit is contained in:
2024-07-12 11:31:04 +03:00
parent 6d38f62e8d
commit 91dc9194e0
13 changed files with 38 additions and 32 deletions

View File

@ -0,0 +1,14 @@
<!DOCTYPE html>
<html lang="ru-RU">
<head>
<meta charset="UTF-8">
<title>Примеры шаблонизатора Twig</title>
</head>
<body>
<h1>HEADER</h1>
{% block content %}
{% endblock %}
<h1>FOOTER</h1>
</body>
</html>

View File

@ -0,0 +1,13 @@
{% extends "main_layout.html.twig" %}
{% block content %}
<form action="/admin/question" method="post">
Вопрос: <br>
<label>
<textarea name = "question" rows="10" cols="50" placeholder="Введите здесь ваш вопрос"></textarea>
</label> <br> <br>
<input type = "submit" value="Подтвердить">
<input type="reset">
</form>
{% endblock %}

View File

@ -0,0 +1,23 @@
{% extends "mainLayout.html" %}
{% block content %}
<form action="/admin/user/" method="post">
Логин:<br>
<label>
<input type = "text" name = "username" required size="50" autofocus placeholder="Логин">
</label> <br> <br>
Пароль:<br>
<label>
<input type = "text" name = "password_hash" required size="50" placeholder="Пароль">
</label> <br> <br>
Email адрес: <br>
<label>
<input type="Email" name="email" required placeholder="Email">
</label> <br><br>
<input type = "submit" value="Подтвердить">
<input type="reset">
</form>
{% endblock %}

View File

@ -0,0 +1,26 @@
{% extends "mainLayout.html" %}
{% block content %}
<table border="1" style="width: 80%;">
<thead>
<tr>
<td>id</td>
<td>Username</td>
<td>Email</td>
<td>Created at</td>
<td>Updated at</td>
</tr>
</thead>
<tbody>
{% for users in userArr %}
<tr>
<td>{{ users.id }}</td>
<td>{{ users.username }}</td>
<td>{{ users.email }}</td>
<td>{{ users.created_at }}</td>
<td>{{ users.updated_at }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}

View File

@ -0,0 +1,28 @@
{% extends "mainLayout.html" %}
{% block content %}
<form action="/admin/user/edit" method="post">
id пользователя:<br>
<label>
<input type = "text" name = "id" required size="50" autofocus placeholder="id">
</label> <br> <br>
Логин:<br>
<label>
<input type = "text" name = "username" required size="50" autofocus placeholder="Логин">
</label> <br> <br>
Пароль:<br>
<label>
<input type = "text" name = "password_hash" required size="50" placeholder="Пароль">
</label> <br> <br>
Email адрес: <br>
<label>
<input type="Email" name="email" required>
</label> <br><br>
<input type = "submit" value="Подтвердить">
<input type="reset">
</form>
{% endblock %}