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

56 lines
1.2 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>
2022-10-07 22:00:14 -04:00
<th>&nbsp;</th>
2022-09-29 20:09:31 -04:00
<th>Id</th>
<th>Name</th>
2022-10-07 22:00:14 -04:00
<th>Categories</th>
2022-09-29 20:09:31 -04:00
</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>
2022-10-07 22:00:14 -04:00
<td>
<ul>
{% for category in brand.categories %}
<li>{{ category }}</li>
{% endfor %}
</ul>
</td>
2022-09-29 20:09:31 -04:00
</tr>
{% else %}
<tr>
<td colspan="3">no records found</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}