rofl
This commit is contained in:
parent
b052697417
commit
43ca79f650
14 changed files with 292 additions and 57 deletions
4
templates/inventory_record/_delete_form.html.twig
Normal file
4
templates/inventory_record/_delete_form.html.twig
Normal file
|
@ -0,0 +1,4 @@
|
|||
<form method="post" action="{{ path('app_inventory_record_delete', {'id': inventory_record.id}) }}" onsubmit="return confirm('Are you sure you want to delete this item?');">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('delete' ~ inventory_record.id) }}">
|
||||
<button class="btn">Delete</button>
|
||||
</form>
|
4
templates/inventory_record/_form.html.twig
Normal file
4
templates/inventory_record/_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/inventory_record/edit.html.twig
Normal file
13
templates/inventory_record/edit.html.twig
Normal file
|
@ -0,0 +1,13 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Edit InventoryRecord{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Edit InventoryRecord</h1>
|
||||
|
||||
{{ include('inventory_record/_form.html.twig', {'button_label': 'Update'}) }}
|
||||
|
||||
<a href="{{ path('app_inventory_record_index') }}">back to list</a>
|
||||
|
||||
{{ include('inventory_record/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
41
templates/inventory_record/index.html.twig
Normal file
41
templates/inventory_record/index.html.twig
Normal file
|
@ -0,0 +1,41 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}InventoryRecord index{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>InventoryRecord index</h1>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Quantity</th>
|
||||
<th>Timestamp</th>
|
||||
<th>CreatedAt</th>
|
||||
<th>UpdatedAt</th>
|
||||
<th>actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for inventory_record in inventory_records %}
|
||||
<tr>
|
||||
<td>{{ inventory_record.id }}</td>
|
||||
<td>{{ inventory_record.quantity }}</td>
|
||||
<td>{{ inventory_record.timestamp ? inventory_record.timestamp|date('Y-m-d H:i:s') : '' }}</td>
|
||||
<td>{{ inventory_record.createdAt ? inventory_record.createdAt|date('Y-m-d H:i:s') : '' }}</td>
|
||||
<td>{{ inventory_record.updatedAt ? inventory_record.updatedAt|date('Y-m-d H:i:s') : '' }}</td>
|
||||
<td>
|
||||
<a href="{{ path('app_inventory_record_show', {'id': inventory_record.id}) }}">show</a>
|
||||
<a href="{{ path('app_inventory_record_edit', {'id': inventory_record.id}) }}">edit</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td colspan="6">no records found</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_inventory_record_new') }}">Create new</a>
|
||||
{% endblock %}
|
11
templates/inventory_record/new.html.twig
Normal file
11
templates/inventory_record/new.html.twig
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}New InventoryRecord{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Create new InventoryRecord</h1>
|
||||
|
||||
{{ include('inventory_record/_form.html.twig') }}
|
||||
|
||||
<a href="{{ path('app_inventory_record_index') }}">back to list</a>
|
||||
{% endblock %}
|
38
templates/inventory_record/show.html.twig
Normal file
38
templates/inventory_record/show.html.twig
Normal file
|
@ -0,0 +1,38 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}InventoryRecord{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>InventoryRecord</h1>
|
||||
|
||||
<table class="table">
|
||||
<tbody>
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<td>{{ inventory_record.id }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Quantity</th>
|
||||
<td>{{ inventory_record.quantity }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Timestamp</th>
|
||||
<td>{{ inventory_record.timestamp ? inventory_record.timestamp|date('Y-m-d H:i:s') : '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>CreatedAt</th>
|
||||
<td>{{ inventory_record.createdAt ? inventory_record.createdAt|date('Y-m-d H:i:s') : '' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>UpdatedAt</th>
|
||||
<td>{{ inventory_record.updatedAt ? inventory_record.updatedAt|date('Y-m-d H:i:s') : '' }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<a href="{{ path('app_inventory_record_index') }}">back to list</a>
|
||||
|
||||
<a href="{{ path('app_inventory_record_edit', {'id': inventory_record.id}) }}">edit</a>
|
||||
|
||||
{{ include('inventory_record/_delete_form.html.twig') }}
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue