collection-crud/templates/brand/index.html.twig

48 lines
1.0 KiB
Twig
Raw Normal View History

2022-09-29 20:09:31 -04:00
{% extends 'form.html.twig' %}
{% block title %}Brands{% endblock %}
{% block form %}
<h2>Brands</h2>
<div class="small callout primary">
<ul>
<li>
<a href="{{ path('brand_new') }}">Add a Brand</a>
</li>
</ul>
</div>
<table class="hover scroll sortable stack">
<thead>
<tr>
<th>Actions</th>
<th>Id</th>
<th>Name</th>
</tr>
</thead>
<tbody>
{% for brand in brands %}
<tr>
<td>
<ul>
<li>
<a href="{{ path('brand_show', {'id': brand.id}) }}">View 👁</a>
</li>
<li>
<a href="{{ path('brand_edit', {'id': brand.id}) }}">Edit <span class="edit-icon">&#9998;</span></a>
</li>
</ul>
</td>
<td>{{ brand.id }}</td>
<td>{{ brand.name }}</td>
</tr>
{% else %}
<tr>
<td colspan="3">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}