<? $i = ( $this -> current_page - 1 ) * 10 + 1;?>
<? foreach ( $this -> products as $product ):?>
  <tr>
    <td>
      <?= $i++;?>
    </td>
    <td>
      <div class="product-image">
        <? if ( $product['images'][0]['src'] ):?>
          <img src="<?= $product['images'][0]['src'];?>" alt="<?= $product['images'][0]['alt'];?>" class="img-responsive">
        <? else:?>
          <img src="/admin/layout/images/no-image.png" alt="Brak zdjęcia" class="img-responsive">
        <? endif;?>
      </div>
      <div class="product-name">
        <a href="/admin/shop_product/product_edit/id=<?= $product['id'];?>">
          <?= $product['languages']['pl']['name'];?>
        </a>
      </div>
      <small class="text-muted"><?= \admin\factory\ShopProduct::product_categories( $product['id'] );?></small>
    </td>
    <td class="text-center">
      <?= $product['price_brutto'];?>
    </td>
    <td class="text-center">
      <?= $product['price_brutto_promo'];?>
    </td>
    <td class="text-center">
      <span class="text-muted"><?= (int)\admin\factory\shopProduct::get_product_quantity_list( $product['id'] );?></span>
    </td>
    <td>
      <a href='/admin/shop_product/product_combination/product_id=<?= $product['id'];?>'>kombinacje (<?= \admin\factory\shopProduct::count_product_combinations( $product['id'] );?>)</a>
    </td>
    <td class="text-center">
      <a href='/admin/shop_product/product_edit/id=<?= $product['id'];?>'>edytuj</a>
    </td>
    <td class="text-center">
      <a href='/admin/product_archive/unarchive/product_id=<?= $product['id'];?>' class="product-unarchive">przywróć</a>
    </td>
  </tr>
<? endforeach;?>
