<?
global $gdb;

ob_start();
?>
  <ol class="sortable" id="article-list">
    <?
      if ( is_array( $this -> products ) ) foreach ( $this -> products as $product )
      {
        ?>
          <li id="list_<?= $product['product_id'];?>">
            <div class="content <? if ( !$product['status'] ) echo 'text-danger';?>"><button type="button" class="disclose layout-tree-toggle" aria-expanded="false" title="Przesuń"><i class="fa fa-arrows"></i></button> <?= $product['name'];?></div>
          </li>
        <?
      }
    ?>
  </ol>
<?
$out = ob_get_clean();

$gridId = 'category-products';
$gridTitle = 'Lista produktów';
$gridSaveUrl = '';
$gridBackUrl = '';
$gridHidden = [];
$gridContent = $out;
$gridPersist = false;
include __DIR__ . '/../components/grid-edit-replacement.php';
?>
<?= \Shared\Tpl\Tpl::view( 'shop-category/category-products-custom-script', [ 'category_id' => $this -> category_id ] ); ?>