<div class="d-flex justify-content-between align-items-center mb-4">
    <h4 class="mb-0"><i class="fas fa-tags me-2"></i><?= lang('board.special_offers') ?></h4>
    <?php if (auth_can('offers.manage')): ?>
    <a href="/offers/create" class="btn btn-primary"><i class="fas fa-plus me-1"></i><?= lang('common.create') ?></a>
    <?php endif; ?>
</div>
<div class="card">
    <div class="card-body">
        <table id="offersTable" class="table table-striped table-hover w-100"
               data-url="/offers/datatable"
               data-columns='[{"data":"id","title":"#","width":"50px"},{"data":"code","title":"Code"},{"data":"name","title":"Name"},{"data":"type","title":"Type"},{"data":"dates","title":"Dates"},{"data":"uses","title":"Uses"},{"data":"status","title":"Status"},{"data":"actions","title":"Actions","orderable":false,"searchable":false}]'>
            <thead><tr><th>#</th><th>Code</th><th>Name</th><th>Type</th><th>Dates</th><th>Uses</th><th>Status</th><th>Actions</th></tr></thead>
        </table>
    </div>
</div>
<?php $__view->push('scripts') ?>
<script>document.addEventListener('DOMContentLoaded', function(){ DataTableHelper.init('offersTable'); });</script>
<?php $__view->endPush() ?>