
<?php $__env->startSection('title', 'Proizvodi'); ?>

<?php $__env->startSection('content_header'); ?>
<h1 class="m-0 text-dark">Proizvodi</h1>
<a href="<?php echo e(URL::route('admin/products-create')); ?>" class="btn btn-default"><?php echo e(Lang::get('Dodaj novi proizvod')); ?></a>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('content'); ?>

    <?php $__env->startSection('content'); ?>
    <table id="data-table" class="display" cellspacing="0" width="100%">
        <thead>
            <tr>
                <th><?php echo Lang::get('common.id'); ?></th>
                <th><?php echo Lang::get('common.sku'); ?></th>
                <th><?php echo Lang::get('common.product_name'); ?></th>
                <th><?php echo Lang::get('common.actions'); ?></th>
            </tr>
        </thead>

        <tbody>
            <?php $__currentLoopData = $products; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tr>
                <td><?php echo $item->id; ?></td>
                <td><a href="<?php echo e(route('admin/products-view', ['id'=>$item->id])); ?>"><?php echo $item->sku; ?></a></td>
                <td><?php echo $item->getName(); ?></td>
                <td>
                    <div class="btn-group post-category">
                        <button id="action-secondary-btn" data-toggle="dropdown" class="btn btn-warning dropdown-toggle"
                            data-original-title="" title="">
                            <?php echo e(Lang::get('Izaberi')); ?> <span class="caret"></span>
                        </button>
                        <ul class="dropdown-menu">
                            <li>
                                <a href="<?php echo e(URL::route('admin.product.edit', [$item->id])); ?>"><?php echo e(Lang::get('Izmijeni')); ?></a>
                            </li>
                            <li>
                                <a class='erase-action' data-href="<?php echo URL::route('admin.product.destroy', [$item->id]); ?>"><?php echo Lang::get('Obriši'); ?></a>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </tbody>
    </table>
    <?php echo e($products->links()); ?>

    <?php $__env->stopSection(); ?>
    <?php $__env->startSection('js'); ?>
    <?php $__env->startSection('plugins.Datatables', true); ?>
    <script>
        $(document).ready(function() {

            $('#data-table').DataTable({
                "paging": false,
                "lengthChange": false,
                "searching": true,
                "ordering": true,
                "info": false,
                "autoWidth": false
            });
    } );


    </script>
    <?php $__env->stopSection(); ?>
<?php $__env->stopSection(); ?>


<?php echo $__env->make('adminlte::page', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH D:\Projects\laravel\laravel-shop\resources\themes\default\views/admin/products/index.blade.php ENDPATH**/ ?>