<?php
$ad_conf = [
    ['code' => 0, 'name' => ''],
    ['code' => 1, 'name' => '未'],
    ['code' => 2, 'name' => '可'],
    ['code' => 3, 'name' => '不可'],
];
?>


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

<div class="mt5">
    <?php echo $__env->make('admin.objects.components.hp-tab', ['title' => '賃貸物件', 'type' => 'lease'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
    <?php echo $__env->make('admin.objects.components.regist-band', ['title' => '賃貸物件'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
    <p class="mt-3 mb-3 recommend_text float-left">登録数　<?php echo e($leases->count()); ?>件</p>
    <span class="mt-4 mb-2 d-inline-block p-results-current-condition__panel--title">ドラッグ＆ドロップで並べ替えができます。</span>
    <div class="reform_list" id="lease-page">
        <table id="sortable_lease">
            <thead>
            <tr>
                <th class="w80">No.</th>
                <th class="w200 text-left">物件名 / 物件種別</th>
                <th class="text-left">所在地 / 交通</th>
                <th class="w120">賃料 / 面積</th>
                <th class="w120">公開/非公開</th>
                <th class="w250"></th>
            </tr>
            </thead>
            <?php $__currentLoopData = $leases; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $item): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
            <tbody class="<?php if($loop->iteration % 2 == 0): ?> even <?php else: ?> odd <?php endif; ?>">
            <tr>
                <td align="center" class="rank_td" rowspan="2"><span class="rank"><?php echo e($loop->iteration); ?></span></td>
                <td>
                    <?php echo e($item->name); ?>

                </td>
                <td>
                    <?php echo e($item->address); ?>

                </td>
                <td>
                    <strong style="color: #FF007C; font-weight: 500; font-size: 17px"><?php echo e($item->chinryo/10000); ?></strong>万円
                </td>
                <td rowspan="2" class="text-center"><?php echo $__env->make('admin.objects.components.switch-disp', ['name' => 'lease_display', 'checked' => $item->display], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?></td>
                <td rowspan="2">
                        <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'lease_id', 'value' => $item->id], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <?php echo $__env->make('admin.objects.components.link-btn-nostyle', ['url' => route('lease-edit', ['id' => $item->id]), 'title' => '編集', 'class' => 'edit_news_btn'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <button class="del_news_btn unset-modal-overlay" name="" data-toggle="modal" data-target="#deleteModal<?php echo e($item->id); ?>">削除</button>
                        <form action="<?php echo e(route('lease-delete', $item->id)); ?>" method="post">
                            <?php echo csrf_field(); ?>
                            <?php echo $__env->make('admin.objects.components.modal_confirm_delete', ['id' => $item->id, 'message' => 'この賃貸物件を削除しますがよろしいですか。'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        </form>
                </td>
            </tr>
            <tr>
                <td>
                    <?php echo e($item->type); ?>

                </td>
                <td>
                    <?php echo e($item->main_traffic); ?><br /><?php echo e($item->sub_traffic1); ?><br /><?php echo e($item->sub_traffic2); ?>

                </td>
                <td>
                    <?php echo e($item->area_val); ?>㎡
                </td>
            </tr>
            </tbody>
            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
        </table>
    </div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('footer-script'); ?>
    <script src="/admin/js/add-cp3.js"></script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layouts.base', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>