fields in listing
This commit is contained in:
parent
a3b1753d9a
commit
4e1cf2e348
|
@ -7,6 +7,7 @@
|
|||
<thead class="bg-dark">
|
||||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Category</th>
|
||||
<th>Name</th>
|
||||
<th>Image</th>
|
||||
<th>Price</th>
|
||||
|
@ -22,6 +23,7 @@
|
|||
<a class="btn btn-primary"
|
||||
href="{{ path('product_show', { 'id': product.id }) }}">{{ product.id }}</a>
|
||||
</td>
|
||||
<td>{{ product.category.name }}</td>
|
||||
<td>{{ product.name }}</td>
|
||||
<td>{{ product.image }}</td>
|
||||
<td>{{ product.price }}</td>
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<tr>
|
||||
<th>Id</th>
|
||||
<th>Nom</th>
|
||||
<th>Produits</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
@ -19,6 +20,7 @@
|
|||
href="{{ path('productcategory_show', { 'id': productCategory.id }) }}">{{ productCategory.id }}</a>
|
||||
</td>
|
||||
<td>{{ productCategory.name }}</td>
|
||||
<td>{{ productCategory.products|length }}</td>
|
||||
<td>
|
||||
<ul>
|
||||
<li>
|
||||
|
@ -30,6 +32,7 @@
|
|||
<a class="btn btn-primary"
|
||||
href="{{ path('productcategory_edit', { 'id': productCategory.id }) }}">
|
||||
<i class="fa fa-pencil"></i>
|
||||
edit
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
|
|
|
@ -23,7 +23,8 @@ class ProductCategoryController extends Controller {
|
|||
public function indexAction() {
|
||||
$em = $this->getDoctrine()->getManager();
|
||||
|
||||
$productCategories = $em->getRepository( 'AppBundle:ProductCategory' )->findByUser($this->getUser() );
|
||||
$currentUser = $this->getUser();
|
||||
$productCategories = $currentUser->getCategories();
|
||||
|
||||
return $this->render( 'productcategory/index.html.twig',
|
||||
[
|
||||
|
|
Loading…
Reference in New Issue