vibe
This commit is contained in:
parent
837cfb6d43
commit
939840a3ac
76 changed files with 6636 additions and 83 deletions
4
templates/drink_type/_delete_form.html.twig
Normal file
4
templates/drink_type/_delete_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
<form method="post" action="{{ path('app_drink_type_delete', {'id': drink_type.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ drink_type.id) }}">
|
||||
<button class="btn">Delete</button>
|
||||
</form>
|
4
templates/drink_type/_form.html.twig
Normal file
4
templates/drink_type/_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/drink_type/edit.html.twig
Normal file
13
templates/drink_type/edit.html.twig
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Edit DrinkType{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Edit DrinkType</h1>
|
||||
|
||||
{{ include('drink_type/_form.html.twig', {'button_label': 'Update'}) }}
|
||||
|
||||
<a href="{{ path('app_drink_type_index') }}">back to list</a>
|
||||
|
||||
{{ include('drink_type/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
46
templates/drink_type/index.html.twig
Normal file
46
templates/drink_type/index.html.twig
Normal file
|
@ -0,0 +1,46 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}DrinkType index{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>DrinkType index</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>CreatedAt</th>
|
||||
<th>UpdatedAt</th>
|
||||
<th>Name</th>
|
||||
<th>Description</th>
|
||||
<th>DesiredStock</th>
|
||||
<th>DrinkStock</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for drink_stock in drink_stocks %}
|
||||
{% set drink_type = drink_stock.record.drinkType %}
|
||||
<tr>
|
||||
<td>{{ drink_type.id }}</td>
|
||||
<td>{{ drink_type.createdAt ? drink_type.createdAt|date('Y-m-d H:i:s') : '' }}</td>
|
||||
<td>{{ drink_type.updatedAt ? drink_type.updatedAt|date('Y-m-d H:i:s') : '' }}</td>
|
||||
<td>{{ drink_type.name }}</td>
|
||||
<td>{{ drink_type.description }}</td>
|
||||
<td>{{ drink_type.desiredStock }}</td>
|
||||
<td>{{ drink_stock.record.quantity }}</td>
|
||||
<td>
|
||||
<a href="{{ path('app_drink_type_show', {'id': drink_type.id}) }}">show</a>
|
||||
<a href="{{ path('app_drink_type_edit', {'id': drink_type.id}) }}">edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="7">no records found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_drink_type_new') }}">Create new</a>
|
||||
{% endblock %}
|
11
templates/drink_type/new.html.twig
Normal file
11
templates/drink_type/new.html.twig
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}New DrinkType{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Create new DrinkType</h1>
|
||||
|
||||
{{ include('drink_type/_form.html.twig') }}
|
||||
|
||||
<a href="{{ path('app_drink_type_index') }}">back to list</a>
|
||||
{% endblock %}
|
42
templates/drink_type/show.html.twig
Normal file
42
templates/drink_type/show.html.twig
Normal file
|
@ -0,0 +1,42 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}DrinkType{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>DrinkType</h1>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<td>{{ drink_type.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>CreatedAt</th>
|
||||
<td>{{ drink_type.createdAt ? drink_type.createdAt|date('Y-m-d H:i:s') : '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>UpdatedAt</th>
|
||||
<td>{{ drink_type.updatedAt ? drink_type.updatedAt|date('Y-m-d H:i:s') : '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<td>{{ drink_type.name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Description</th>
|
||||
<td>{{ drink_type.description }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>DesiredStock</th>
|
||||
<td>{{ drink_type.desiredStock }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_drink_type_index') }}">back to list</a>
|
||||
|
||||
<a href="{{ path('app_drink_type_edit', {'id': drink_type.id}) }}">edit</a>
|
||||
|
||||
{{ include('drink_type/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue