mirror of
https://forge.chapril.org/tykayn/caisse-bliss
synced 2025-06-20 01:44:42 +02:00
up templates
This commit is contained in:
parent
71bce538af
commit
a39b6239b0
71 changed files with 1536 additions and 262 deletions
4
templates/category/_delete_form.html.twig
Normal file
4
templates/category/_delete_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
<form method="post" action="{{ path('app_category_delete', {'id': category.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ category.id) }}">
|
||||
<button class="btn">Delete</button>
|
||||
</form>
|
4
templates/category/_form.html.twig
Normal file
4
templates/category/_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
||||
{{ form_end(form) }}
|
13
templates/category/edit.html.twig
Normal file
13
templates/category/edit.html.twig
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Edit Category{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Edit Category</h1>
|
||||
|
||||
{{ include('category/_form.html.twig', {'button_label': 'Update'}) }}
|
||||
|
||||
<a href="{{ path('app_category_index') }}">back to list</a>
|
||||
|
||||
{{ include('category/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
35
templates/category/index.html.twig
Normal file
35
templates/category/index.html.twig
Normal file
|
@ -0,0 +1,35 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Category index{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Category index</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Name</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for category in categories %}
|
||||
<tr>
|
||||
<td>{{ category.id }}</td>
|
||||
<td>{{ category.name }}</td>
|
||||
<td>
|
||||
<a href="{{ path('app_category_show', {'id': category.id}) }}">show</a>
|
||||
<a href="{{ path('app_category_edit', {'id': category.id}) }}">edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="3">no records found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_category_new') }}">Create new</a>
|
||||
{% endblock %}
|
11
templates/category/new.html.twig
Normal file
11
templates/category/new.html.twig
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}New Category{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Create new Category</h1>
|
||||
|
||||
{{ include('category/_form.html.twig') }}
|
||||
|
||||
<a href="{{ path('app_category_index') }}">back to list</a>
|
||||
{% endblock %}
|
26
templates/category/show.html.twig
Normal file
26
templates/category/show.html.twig
Normal file
|
@ -0,0 +1,26 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Category{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Category</h1>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<td>{{ category.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td>{{ category.name }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_category_index') }}">back to list</a>
|
||||
|
||||
<a href="{{ path('app_category_edit', {'id': category.id}) }}">edit</a>
|
||||
|
||||
{{ include('category/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue