twig
This commit is contained in:
14
app/views/mainLayout.html
Normal file
14
app/views/mainLayout.html
Normal 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>
|
@ -1,3 +1,6 @@
|
||||
{% extends "mainLayout.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/admin/question" method="post">
|
||||
Вопрос: <br>
|
||||
<label>
|
||||
@ -6,4 +9,5 @@
|
||||
|
||||
<input type = "submit" value="Подтвердить">
|
||||
<input type="reset">
|
||||
</form>
|
||||
</form>
|
||||
{% endblock %}
|
@ -1,3 +1,6 @@
|
||||
{% extends "mainLayout.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/admin/user/" method="post">
|
||||
Логин:<br>
|
||||
<label>
|
||||
@ -11,9 +14,10 @@
|
||||
|
||||
Email адрес: <br>
|
||||
<label>
|
||||
<input type="Email" name="email" required>
|
||||
<input type="Email" name="email" required placeholder="Email">
|
||||
</label> <br><br>
|
||||
|
||||
<input type = "submit" value="Подтвердить">
|
||||
<input type="reset">
|
||||
</form>
|
||||
</form>
|
||||
{% endblock %}
|
26
app/views/userTable.html
Normal file
26
app/views/userTable.html
Normal 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 %}
|
@ -1,3 +1,6 @@
|
||||
{% extends "mainLayout.html" %}
|
||||
|
||||
{% block content %}
|
||||
<form action="/admin/user/edit" method="post">
|
||||
id пользователя:<br>
|
||||
<label>
|
||||
@ -11,7 +14,7 @@
|
||||
|
||||
Пароль:<br>
|
||||
<label>
|
||||
<input type = "text" name = "password" required size="50" placeholder="Пароль">
|
||||
<input type = "text" name = "password_hash" required size="50" placeholder="Пароль">
|
||||
</label> <br> <br>
|
||||
|
||||
Email адрес: <br>
|
||||
@ -21,4 +24,5 @@
|
||||
|
||||
<input type = "submit" value="Подтвердить">
|
||||
<input type="reset">
|
||||
</form>
|
||||
</form>
|
||||
{% endblock %}
|
Reference in New Issue
Block a user