<?php $request = app('Illuminate\Http\Request'); ?>


<?php $__env->startSection('content'); ?>
    <h3 class="page-title"><?php echo app('translator')->get('quickadmin.secret-buyer-rating.list'); ?></h3>
    <div class="panel panel-default rating-table">
        <div class="panel-heading header-block">
            <div class="col-xs-12 col-lg-4">
                <div class="row">
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('planning_create')): ?>
                        <a href="<?php echo e(route('admin.secret_buyer_ratings.create')); ?>"
                           class="btn btn-success"><?php echo app('translator')->get('quickadmin.qa_add_new'); ?></a>
                    <?php endif; ?>
                </div>
            </div>

            <?php if(request('show_deleted') != 1): ?>
                <div class="col-xs-12 col-lg-4">
                    <form action="<?php echo e(route('admin.secret_buyer_ratings.index')); ?>" method="GET">
                        <div class="row">
                            <div class="input-group">
                                <?php echo Form::select('residental_complex_id', $residential_complexes, $residental_complex_id, ['class' => 'form-control select2']); ?>

                                
                                
                                <div class="input-group-btn">
                                    <button class="btn btn-primary" type="submit">
                                        <span class="glyphicon glyphicon-search"></span>
                                    </button>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            <?php endif; ?>

            <div class="col-xs-12 col-lg-4">
                <div class="row">
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('planning_delete')): ?>
                        <ul class="list-inline">
                            <li><a href="<?php echo e(route('admin.secret_buyer_ratings.index')); ?>"
                                   style="<?php echo e(request('show_deleted') == 1 ? '' : 'font-weight: 700'); ?>"><?php echo app('translator')->get('quickadmin.qa_all'); ?></a>
                            </li>
                            |
                            <li><a href="<?php echo e(route('admin.secret_buyer_ratings.index')); ?>?show_deleted=1"
                                   style="<?php echo e(request('show_deleted') == 1 ? 'font-weight: 700' : ''); ?>"><?php echo app('translator')->get('quickadmin.qa_trash'); ?></a>
                            </li>
                        </ul>
                    <?php endif; ?>
                </div>
            </div>
        </div>

        <div class="panel-body table-responsive">
            <table class="table table-bordered table-striped <?php echo e(count($secret_buyer_ratings) > 0 ? 'datatable' : ''); ?> <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('secret_buyer_rating_delete')): ?> <?php if( request('show_deleted') != 1 ): ?> dt-select <?php endif; ?> <?php endif; ?>">
                <thead>
                <tr>
                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('secret_buyer_rating_delete')): ?>
                        <?php if( request('show_deleted') != 1 ): ?>
                            <th style="text-align:center;"><input type="checkbox" id="select-all"/></th><?php endif; ?>
                    <?php endif; ?>

                    <th><?php echo app('translator')->get('quickadmin.secret-buyer-rating.fields.position'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.secret-buyer-rating.fields.infrastructure'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.secret-buyer-rating.fields.transport-hub'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.secret-buyer-rating.fields.planning'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.secret-buyer-rating.fields.price-quality'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.secret-buyer-rating.fields.enabled'); ?></th>
                    <th><?php echo app('translator')->get('quickadmin.secret-buyer-rating.fields.residental-complex'); ?></th>
                    <?php if( request('show_deleted') == 1 ): ?>
                        <th><?php echo app('translator')->get('quickadmin.qa_action'); ?></th>
                    <?php else: ?>
                        <th><?php echo app('translator')->get('quickadmin.qa_action'); ?></th>
                    <?php endif; ?>
                </tr>
                </thead>

                <tbody>
                <?php if(count($secret_buyer_ratings) > 0): ?>
                    <?php $__currentLoopData = $secret_buyer_ratings; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $secret_buyer_rating): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <tr data-entry-id="<?php echo e($secret_buyer_rating->id); ?>">
                            <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('secret_buyer_rating_delete')): ?>
                                <?php if( request('show_deleted') != 1 ): ?>
                                    <td></td><?php endif; ?>
                            <?php endif; ?>

                            <td field-key='position'><?php echo e($secret_buyer_rating->position); ?></td>
                            <td field-key='infrastructure'><?php echo e($secret_buyer_rating->infrastructure); ?></td>
                            <td field-key='transport_hub'><?php echo e($secret_buyer_rating->transport_hub); ?></td>
                            <td field-key='planning'><?php echo e($secret_buyer_rating->planning); ?></td>
                            <td field-key='price_quality'><?php echo e($secret_buyer_rating->price_quality); ?></td>
                            <td field-key='enabled'><?php echo e(Form::checkbox("enabled", 1, $secret_buyer_rating->enabled == 1 ? true : false, ["disabled"])); ?></td>
                            <td field-key='residental_complex'><?php echo e($secret_buyer_rating->residental_complex->name ?? ''); ?></td>
                            <?php if( request('show_deleted') == 1 ): ?>
                                <td class="action">
                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('secret_buyer_rating_delete')): ?>
                                        <?php echo Form::open(array(
        'style' => 'display: inline-block;',
        'method' => 'POST',
        'onsubmit' => "return confirm('".trans("quickadmin.qa_are_you_sure")."');",
        'route' => ['admin.secret_buyer_ratings.restore', $secret_buyer_rating->id])); ?>

                                        <?php echo Form::submit(trans('quickadmin.qa_restore'), array('class' => 'btn btn-xs btn-success')); ?>

                                        <?php echo Form::close(); ?>

                                    <?php endif; ?>
                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('secret_buyer_rating_delete')): ?>
                                        <?php echo Form::open(array(
        'style' => 'display: inline-block;',
        'method' => 'DELETE',
        'onsubmit' => "return confirm('".trans("quickadmin.qa_are_you_sure")."');",
        'route' => ['admin.secret_buyer_ratings.perma_del', $secret_buyer_rating->id])); ?>

                                        <?php echo Form::submit(trans('quickadmin.qa_permadel'), array('class' => 'btn btn-xs btn-danger')); ?>

                                        <?php echo Form::close(); ?>

                                    <?php endif; ?>
                                </td>
                            <?php else: ?>
                                <td class="action">
                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('secret_buyer_rating_view')): ?>
                                        <a href="<?php echo e(route('admin.secret_buyer_ratings.show',[$secret_buyer_rating->id])); ?>"
                                           class="btn btn-xs btn-primary"><?php echo app('translator')->get('quickadmin.qa_view'); ?></a>
                                    <?php endif; ?>
                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('secret_buyer_rating_edit')): ?>
                                        <a href="<?php echo e(route('admin.secret_buyer_ratings.edit',[$secret_buyer_rating->id])); ?>"
                                           class="btn btn-xs btn-info"><?php echo app('translator')->get('quickadmin.qa_edit'); ?></a>
                                    <?php endif; ?>
                                    <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('secret_buyer_rating_delete')): ?>
                                        <?php echo Form::open(array(
                                                                                'style' => 'display: inline-block;',
                                                                                'method' => 'DELETE',
                                                                                'onsubmit' => "return confirm('".trans("quickadmin.qa_are_you_sure")."');",
                                                                                'route' => ['admin.secret_buyer_ratings.destroy', $secret_buyer_rating->id])); ?>

                                        <?php echo Form::submit(trans('quickadmin.qa_delete'), array('class' => 'btn btn-xs btn-danger')); ?>

                                        <?php echo Form::close(); ?>

                                    <?php endif; ?>
                                </td>
                            <?php endif; ?>
                        </tr>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php else: ?>
                    <tr>
                        <td colspan="14"><?php echo app('translator')->get('quickadmin.qa_no_entries_in_table'); ?></td>
                    </tr>
                <?php endif; ?>
                </tbody>
            </table>
            <?php if( !isset($residental_complex_id) && request('show_deleted') != 1): ?>
                <?php echo e($secret_buyer_ratings->links()); ?>

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

<?php $__env->startSection('javascript'); ?>
    <script>
        <?php if (app(\Illuminate\Contracts\Auth\Access\Gate::class)->check('secret_buyer_rating_delete')): ?>
                <?php if( request('show_deleted') != 1 ): ?> window.route_mass_crud_entries_destroy = '<?php echo e(route('admin.secret_buyer_ratings.mass_destroy')); ?>'; <?php endif; ?>
        <?php endif; ?>

    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /var/www/html/vdoma/resources/views/admin/secret_buyer_ratings/index.blade.php ENDPATH**/ ?>