{% 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> </th> <th>Id</th> <th>Name</th> <th>Categories</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">✎</span></a> </li> </ul> </td> <td>{{ brand.id }}</td> <td>{{ brand.name }}</td> <td> <ul> {% for category in brand.categories %} <li>{{ category }}</li> {% endfor %} </ul> </td> </tr> {% else %} <tr> <td colspan="3">no records found</td> </tr> {% endfor %} </tbody> </table> {% endblock %}