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

    <a class="btn btn-dark" href="<?php echo e(URL::action('CompensationController@getAddCompensation')); ?>">
        <i class="fa fa-plus"></i> Add Compensation & Benefit
    </a>

<?php $__env->stopSection(); ?>
<?php $__env->startSection('title'); ?>
    <i class="icon icon-compensation"></i> Compensation & Benefits
<?php $__env->stopSection(); ?>
<?php $__env->startSection('content'); ?>
    <div class="table-responsive">
        <table class="table hr-table table-hover">
            <thead>
            <tr>
                <th> Name</th>
                <th> Details</th>
                <th>Actions</th>
            </tr>
            </thead>
            <tbody>
            <?php foreach($compensations as $item): ?>
                <tr>
                    <td> <?php echo e($item->name); ?></td>
                    <td> <?php echo e($item->details); ?></td>
                    <td>
                        <div class="hr-actions-cell">
                            <a href="<?php echo e(URL::action('CompensationController@getEditCompensation',['id'=>$item->id])); ?>"
                               class="btn btn-dark">
                                Edit
                            </a>
                            <a href="#delete_compensation_<?php echo e($item->id); ?>" data-toggle="modal"
                               class="btn btn-red">
                                Delete
                            </a>
                        </div>
                        <div class="modal fade" id="delete_compensation_<?php echo e($item->id); ?>">
                            <div class="modal-dialog">
                                <div class="modal-content">
                                    <div class="modal-body">
                                        <form class="form" method="post"
                                              action="<?php echo e(URL::action('CompensationController@postDeleteCompensation')); ?>">
                                            <?php echo csrf_field(); ?>

                                            <div class="help-block">
                                                Are you sure you want to delete the Compensation & Benefits
                                                "<?php echo e($item->name); ?>"
                                            </div>
                                            <input type="hidden" name="compensation_id" value="<?php echo e($item->id); ?>">
                                            <div class="form-actions">
                                                <button type="submit" class="btn btn-red">
                                                    Delete
                                                </button>
                                                <button type="button" data-dismiss="modal" class="btn btn-dark">
                                                    Back
                                                </button>
                                            </div>

                                        </form>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </td>
                </tr>
            <?php endforeach; ?>
            </tbody>
        </table>
    </div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layout', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>