<tr>
    <th>
        アットホーム入稿用画像<br />（内外観・地図・周辺写真・その他）<br />
        <strong class="<?php if(count($portal_athome_image)>40): ?> alart <?php endif; ?>"><?php echo e(count($portal_athome_image)); ?>/40枚</strong><br />
        <p class="text-color-red mt10">※画像１は間取図（平面図）を<br />ご登録ください。<br />画像２は外観を推奨しています。</p>
        <p class="kt-color-5 mt10">※「メインに設定」にチェック<br />を入れると、ATBB物件一覧の<br />サムネイルとして使用されます。</p>
        <p class="text-color-red kt-bg-icon mt10">ドラッグ＆ドロップで<br />並べ替えができます</p>
        <?php if($portal_athome_status == 1): ?>
            <a href="javascript:imageFileUploadPortal(<?php echo e($article_id); ?>, 'all', '', 'athome')" class="modal-open-portal kt-bt kt-bg-4 mt-4">画像をセット（すべて）</a>
        <?php else: ?>
            <button type="button" class="modal-open-portal kt-bt kt-bg-4 mt-4" data-n="3" autocomplete="off">物件画像をセット（すべて）</button>
        <?php endif; ?>
        <button type="button" class="modal-portal-detail kt-bt kt-bg-5 mt-2" data-n="4" autocomplete="off">物件画像をセット（一部）</button>

    </th>
    <td class="athome-images">
        <div id="sortable_article_image" class="p-regist__sorttable portal_image_trash_group">
            <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'athome_del_photo_id', 'value' => '', 'class' => 'delete_portal_image_input'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
            <div id="image_list_portal" class="row portal_sorttable">
                <?php $stt = 0; ?>
                <?php $__currentLoopData = $portal_athome_image; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php $stt++; ?>
                    <div class="col-2 mt10 mb10 sorttable_item <?php if($stt>40): ?>line-red <?php endif; ?>">
                        <span class="bg-non-dark position-relative fontsize12 title_number mb10">画像<?php echo e($stt); ?> <span class="box__status"><input type="radio" <?php if($photo->status == 1): ?> checked <?php endif; ?> name="status<?php echo e($stt); ?>" value="1"> メインに設定</span></span>
                        <label class="p-portalupload w-100 file_multiple_label" data-id="<?php echo e($stt); ?>" for="fileMutilInputAthome<?php echo e($stt); ?>">
                            <img class="p-img-size" src="<?php echo e($photo->storageLink.'?v='.strtotime(now())); ?>">
                            <canvas width="0" height="0"></canvas>
                            <p class="p-imgupload__text">クリックまたは<br>ドラッグ&amp;ドロップ</p>
                            <input id="fileMutilInputAthome<?php echo e($stt); ?>" type="file" accept="image/png, image/gif, image/jpeg" name="athome_file_input[<?php echo e($stt); ?>]" class="file_multiple_input d-none">
                            <input type="hidden" name="athome_file_path<?php echo e($stt); ?>" value="<?php echo e($photo->file_path); ?>">
                        </label>
                        <div class="w-100 position-relative mt10">
                            <label class="require-portal float-left">必須</label>
                            <?php echo $__env->make('admin.objects.components.selectbox', ['class'  =>  'w100 position-relative', 'name' => 'athome_property_sub'.$stt, 'options' => $photo_property_athome, 'selected' => selectedPhotoPropertyAthome($photo->facility, $photo->property_sub, $article_property, $photo->type_upload, $photo->mansion)], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        </div>
                        <div class="w-100 position-relative mt10">
                            <?php echo $__env->make('admin.objects.components.input', ['name' => 'athome_photo_created_at'.$stt, 'class' => 'cal_picker_maxdate w-100', 'placeholder' => '撮影日', 'value' => \Carbon\Carbon::parse($photo->created_at)->format('Y/m/d')] , \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        </div>
                        <?php echo $__env->make('admin.objects.components.textarea_house', ['name' => 'athome_photo_comment'.$stt, 'class' => 'img_text mt10 position-relative', 'count' => 50, 'site' => 1, 'placeholder' => '画像コメント', 'value' => $photo->memo], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>

                        <div class="mt10 w-100">
                            <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'athome_photo_id'.$stt, 'value' => $photo->id], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                            <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'athome_facility'.$stt, 'value' => $photo->facility], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                            <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'athome_order'.$stt, 'value' => '', 'class' => 'portal_order'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                            <?php echo $__env->make('admin.objects.components.btn', ['name' => 'athome_del_photo_portal', 'class' => 'btn_imagedel w-100 position-relative delete_portal_image_btn', 'title' => '削除', 'type' => 'button', 'dataPhoto' => $photo->id], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        </div>
                    </div>
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <?php if($stt < 40): ?>
                    <?php for($j = $stt+1; $j <= 40;$j++): ?>
                        <div class="col-2 mt10 mb10 sorttable_item">
                            <span class="bg-non-dark title_number mb10">画像<?php echo e($j); ?> <span class="box__status"><input type="radio" name="status<?php echo e($j); ?>" value="1"> メインに設定</span></span>
                            <label class="p-portalupload w-100 file_multiple_label" data-id="<?php echo e($j); ?>" for="fileMutilInputAthome<?php echo e($j); ?>">
                                <canvas width="0" height="0"></canvas>
                                <p class="p-imgupload__text">クリックまたは<br>ドラッグ&amp;ドロップ</p>
                                <input id="fileMutilInputAthome<?php echo e($j); ?>" type="file" accept="image/png, image/gif, image/jpeg" name="athome_file_input[<?php echo e($j); ?>]" class="file_multiple_input d-none">
                                <input type="hidden" name="athome_file_path<?php echo e($j); ?>" value="">
                            </label>

                            <div class="w-100 position-relative mt10">
                                <label class="require-portal float-left">必須</label>
                                <?php echo $__env->make('admin.objects.components.selectbox', ['class'  =>  'w100 position-relative', 'name' => 'athome_property_sub'.$j, 'options' => $photo_property_athome, 'selected' => ''], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                            </div>
                            <div class="w-100 position-relative mt10">
                                <?php echo $__env->make('admin.objects.components.input', ['name' => 'athome_photo_created_at'.$j, 'class' => 'cal_picker_maxdate w-100', 'placeholder' => '撮影日'] , \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                            </div>
                            <?php echo $__env->make('admin.objects.components.textarea_house', ['name' => 'athome_photo_comment'.$j, 'class' => 'img_text mt10 position-relative', 'count' => 50, 'site' => 1, 'placeholder' => '画像コメント', 'value' => ''], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>

                            <div class="mt10 w-100 position-relative">
                                <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'athome_photo_id'.$j, 'value' => ''], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'athome_facility'.$j, 'value' => ''], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'athome_order'.$j, 'value' => '', 'class' => 'portal_order'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                <?php echo $__env->make('admin.objects.components.btn', ['name' => 'athome_del_photo_portal', 'class' => 'btn_imagedel w-100', 'title' => '削除', 'type' => 'button'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                            </div>
                        </div>
                    <?php endfor; ?>
                <?php endif; ?>
            </div>
        </div>
        <?php if(count($portal_athome_image_del) > 0): ?>
            <div class="button_bar pt-close">
                <a class="p-search-common__collapse-link p-search-common__collapse-link--open" data-toggle="collapse" href="#athome_image_del" role="button" aria-expanded="true" aria-controls="athome_image_del">前回のデータ</a>
            </div>
            <div id="athome_image_del" class="p-regist__sorttable portal_image_delete_group collapse">
                <div id="image_list_portal" class="row portal_sorttable">
                    <?php
                        $num_portal_athome = count($portal_athome_image_del) > 40 ? count($portal_athome_image_del) : 40;
                        $stt = $num_portal_athome
                    ?>
                    <?php $__currentLoopData = $portal_athome_image_del; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $photo): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php $stt++; ?>
                        <div class="col-2 mt10 mb10 sorttable_item">
                            <span class="bg-non-dark position-relative fontsize12 title_number mb10">画像<?php echo e($stt - $num_portal_athome); ?> <span class="box__status"><input type="radio" <?php if($photo->status == 1): ?> checked <?php endif; ?> name="status<?php echo e($stt); ?>" value="1"> メインに設定</span></span>
                            <label class="p-portalupload w-100 file_multiple_label" data-id="<?php echo e($stt); ?>" for="fileMutilInputAthome<?php echo e($stt); ?>">
                                <img class="p-img-size" src="<?php echo e($photo->storageLink); ?>">
                                <canvas width="0" height="0"></canvas>
                                <p class="p-imgupload__text">クリックまたは<br>ドラッグ&amp;ドロップ</p>
                                <input id="fileMutilInputAthome<?php echo e($stt); ?>" type="file" accept="image/png, image/gif, image/jpeg" name="athome_file_input[<?php echo e($stt); ?>]" class="file_multiple_input d-none">
                                <input type="hidden" name="athome_file_path<?php echo e($stt); ?>" value="<?php echo e($photo->file_path); ?>">
                            </label>
                            <div class="w-100 position-relative mt10">
                                <label class="require-portal float-left">必須</label>
                                <?php echo $__env->make('admin.objects.components.selectbox', ['class'  =>  'w100 position-relative', 'name' => 'athome_property_sub'.$stt, 'options' => $photo_property_athome, 'selected' => selectedPhotoPropertyAthome($photo->facility, $photo->property_sub, $article_property, $photo->type_upload, $photo->mansion)], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                            </div>
                            <div class="w-100 position-relative mt10">
                                <?php echo $__env->make('admin.objects.components.input', ['name' => 'athome_photo_created_at'.$stt, 'class' => 'cal_picker_maxdate w-100', 'placeholder' => '撮影日', 'value'=>\Carbon\Carbon::parse($photo->created_at)->format('Y/m/d')] , \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                            </div>
                            <?php echo $__env->make('admin.objects.components.textarea_house', ['name' => 'athome_photo_comment'.$stt, 'class' => 'img_text mt10 position-relative', 'count' => 50, 'site' => 1, 'placeholder' => '自社HP：100文字まで', 'value' => $photo->memo], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>

                            <div class="mt10 w-100">
                                <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'athome_photo_id'.$stt, 'value' => $photo->id, 'class' => 'portal_photo_id'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'athome_facility'.$stt, 'value' => $photo->facility], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                <?php echo $__env->make('admin.objects.components.hidden', ['name' => 'athome_order'.$stt, 'value' => '', 'class' => 'portal_order'], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                                <?php echo $__env->make('admin.objects.components.btn', ['name' => '', 'class' => 'btn_imagedel w-100 position-relative delete_portal_image_btn', 'title' => '削除', 'type' => 'button', 'dataPhoto' => $photo->id], \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                            </div>
                        </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    <div class="col-4 mt10 mb10 item-center">
                        <a href="javascript:void(0)" class="restore_portal_image_btn saved_del" data-photo="<?php echo e(implode(',', $portal_athome_image_del->pluck('id')->toArray())); ?>">この内容で上枠内を上書きする</a>
                    </div>
                </div>
            </div>
        <?php endif; ?>
    </td>
</tr>
