mirror of
https://forge.chapril.org/tykayn/caisse-bliss
synced 2025-11-19 23:00:37 +01:00
add api platform to entitites
This commit is contained in:
parent
c44ac9c522
commit
9c9f8984af
15 changed files with 13 additions and 369 deletions
|
|
@ -1,4 +0,0 @@
|
|||
<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>
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
{{ form_start(form) }}
|
||||
{{ form_widget(form) }}
|
||||
<button class="btn">{{ button_label|default('Save') }}</button>
|
||||
{{ form_end(form) }}
|
||||
|
|
@ -1,13 +0,0 @@
|
|||
{% 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 %}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
{% 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 %}
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
{% 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 %}
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
{% 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