🎉 first commit

This commit is contained in:
2026-07-18 00:01:27 +02:00
commit 78346ffece
63 changed files with 11664 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
<form method="post" action="{{ path('app_todo_delete', {'id': todo.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ todo.id) }}">
<button class="btn">Delete</button>
</form>
+4
View File
@@ -0,0 +1,4 @@
{{ form_start(form) }}
{{ form_widget(form) }}
<button class="btn">{{ button_label|default('Save') }}</button>
{{ form_end(form) }}
+13
View File
@@ -0,0 +1,13 @@
{% extends 'base.html.twig' %}
{% block title %}Edit Todo{% endblock %}
{% block body %}
<h1>Edit Todo</h1>
{{ include('todo/_form.html.twig', {'button_label': 'Update'}) }}
<a href="{{ path('app_todo_index') }}">back to list</a>
{{ include('todo/_delete_form.html.twig') }}
{% endblock %}
+39
View File
@@ -0,0 +1,39 @@
{% extends 'base.html.twig' %}
{% block title %}Todo index{% endblock %}
{% block body %}
<h1>Todo index</h1>
<table class="table">
<thead>
<tr>
<th>Id</th>
<th>Title</th>
<th>Completed</th>
<th>CreatedAt</th>
<th>actions</th>
</tr>
</thead>
<tbody>
{% for todo in todos %}
<tr>
<td>{{ todo.id }}</td>
<td>{{ todo.title }}</td>
<td>{{ todo.completed ? 'Yes' : 'No' }}</td>
<td>{{ todo.createdAt ? todo.createdAt|date('Y-m-d H:i:s') : '' }}</td>
<td>
<a href="{{ path('app_todo_show', {'id': todo.id}) }}">show</a>
<a href="{{ path('app_todo_edit', {'id': todo.id}) }}">edit</a>
</td>
</tr>
{% else %}
<tr>
<td colspan="5">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
<a href="{{ path('app_todo_new') }}">Create new</a>
{% endblock %}
+11
View File
@@ -0,0 +1,11 @@
{% extends 'base.html.twig' %}
{% block title %}New Todo{% endblock %}
{% block body %}
<h1>Create new Todo</h1>
{{ include('todo/_form.html.twig') }}
<a href="{{ path('app_todo_index') }}">back to list</a>
{% endblock %}
+34
View File
@@ -0,0 +1,34 @@
{% extends 'base.html.twig' %}
{% block title %}Todo{% endblock %}
{% block body %}
<h1>Todo</h1>
<table class="table">
<tbody>
<tr>
<th>Id</th>
<td>{{ todo.id }}</td>
</tr>
<tr>
<th>Title</th>
<td>{{ todo.title }}</td>
</tr>
<tr>
<th>Completed</th>
<td>{{ todo.completed ? 'Yes' : 'No' }}</td>
</tr>
<tr>
<th>CreatedAt</th>
<td>{{ todo.createdAt ? todo.createdAt|date('Y-m-d H:i:s') : '' }}</td>
</tr>
</tbody>
</table>
<a href="{{ path('app_todo_index') }}">back to list</a>
<a href="{{ path('app_todo_edit', {'id': todo.id}) }}">edit</a>
{{ include('todo/_delete_form.html.twig') }}
{% endblock %}