<?= $this->extend("layout/index"); ?>
<?= $this->section('content'); ?>

<div class="content-wrapper" style="min-height: 357.039px;">
    <section class="content mt-3">
        <div class="card card-default">
            <div class="card-header">
                <h3 class="card-title text-bold"><?= $title ?></h3>

                <span class="float-right">
                    <?= anchor($locale . "/inv/mobilier/add", "<i class='fa fa-pencil'></i> Nouveau", ['class' => 'btn btn-primary btn-sm']) ?>
                </span>
            </div>

            <div class="card-body">
                <div class="row">
                    <div class="col-md-4">
                        <?= form_label("Province"); ?>
                        <?php
                        echo form_dropdown('province_id', $provinces, set_value('province_id'), "class = 'form-control' id='province_id'");
                        ?>
                    </div>
                    <div class="col-md-3"></div>

                    <div class="col-md-2 mt-5">
                        <button class='btn btn-info' id='mobilierExport'>Generer <i class='fa fa-file-csv'></i></button>
                    </div>
                    <div class="col-md-2 ml-1 mt-5" id>
                        <p id="mobilierExportBtn"></p>
                    </div>
                </div>

                <div class="table-responsive">
                    <?php

                    use CodeIgniter\View\Table;


                    $table = new Table();

                    $template = [
                        'table_open' => '<table class="table table-bordered" id="tables">',
                    ];

                    $table->setTemplate($template);
                    $table->setHeading("#", "DESCRIPTION", "MARQUE", "DATE ACHAT", "VALEUR",  "FOURNISSEUR", "VALEUR ACQUISITION", "STATUT", "RESPONSABLE", "OPTIONS");
                    echo $table->generate();
                    ?>
                </div>
            </div>
        </div>


    </section>
</div>


<?= $this->endSection(); ?>