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

    <div class="row">
        <div class="col-12 box-margin">
            <div class="card">
                <div class="card-body">
                    <div class="d-md-flex justify-content-between align-items-center mb-20">
                        <h4 class="card-title mb-0"><?php echo e(__('content.portfolio')); ?>

                            <div class="btn-group">
                                <button type="button" class="btn btn-primary btn-sm dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                                    <?php echo e(__('content.'.$style)); ?>

                                </button>
                                <div class="dropdown-menu">
                                    <a class="dropdown-item" href="<?php echo e(route('portfolio.index', ['style' => 'style1'])); ?>"><?php echo e(__('content.style1')); ?></a>
                                </div>
                            </div>
                            <!-- Button -->
                            <a id="hoverButton" class="iyzi-btn"><i class="fas fa-camera"></i> <?php echo e(__('content.view_draft')); ?></a>
                            <!-- Modal -->
                            <div id="imageModal" class="border border-success iyzi-modal">
                                <img class="img-fluid " src="<?php echo e(asset('uploads/img/dummy/style/portfolio-style1.jpg')); ?>" alt="draft image">
                            </div>
                        </h4>
                        <div>
                            <button type="button" class="btn btn-primary mb-3 mr-2" data-toggle="modal" data-target="#portfolioSectionModal"><?php echo e(__('content.section_title_and_description')); ?></button>
                            <a href="<?php echo e(url('admin/portfolio/create/'.$style)); ?>" class="btn btn-primary float-right mb-3">+ <?php echo e(__('content.add_portfolio')); ?></a>
                        </div>
                    </div>

                    <?php if(count($portfolios) > 0): ?>
                        <div>
                            <input id="check_all" type="checkbox" onclick="showHideDeleteButton(this)">
                            <label for="check_all"><?php echo e(__('content.all')); ?></label>
                            <a id="deleteChecked" class="ml-2" href="#" data-toggle="modal" data-target="#deleteCheckedModal">
                                <i class="fa fa-trash text-danger font-18"></i>
                            </a>
                        </div>
                        <?php if($demo_mode == "on"): ?>
                            <!-- Include Alert Blade -->
                            <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                        <?php else: ?>
                            <form onsubmit="return btnCheckListGet()" action="<?php echo e(route('portfolio.destroy_checked')); ?>" method="POST">
                                <?php echo method_field('DELETE'); ?>
                                <?php echo csrf_field(); ?>
                                <?php endif; ?>

                                <input type="hidden" id="checked_lists" name="checked_lists" value="">

                                <!-- Modal -->
                                <div class="modal fade" id="deleteCheckedModal" tabindex="-1" role="dialog" aria-labelledby="deleteCheckedModalCenterTitle" aria-hidden="true">
                                    <div class="modal-dialog modal-dialog-centered modal-sm" role="document">
                                        <div class="modal-content">
                                            <div class="modal-header">
                                                <h5 class="modal-title" id="deleteCheckedModalCenterTitle"><?php echo e(__('content.delete')); ?></h5>
                                                <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo e(__('content.close')); ?>">
                                                    <span aria-hidden="true">&times;</span>
                                                </button>
                                            </div>
                                            <div class="modal-body text-center">
                                                <?php echo e(__('content.delete_selected')); ?>

                                            </div>
                                            <div class="modal-footer">
                                                <button type="button" class="btn btn-danger" data-dismiss="modal"><?php echo e(__('content.cancel')); ?></button>
                                                <button onclick="btnCheckListGet()" type="submit" class="btn btn-success"><?php echo e(__('content.yes_delete_it')); ?></button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </form>
                            <table id="basic-datatable" class="table table-striped dt-responsive w-100">
                                <thead>
                                <tr>
                                    <th scope="col">#</th>
                                    <th><?php echo e(__('content.additional_features')); ?></th>
                                    <th><?php echo e(__('content.title')); ?></th>
                                    <th><?php echo e(__('content.category_name')); ?></th>
                                    <th><?php echo e(__('content.order')); ?></th>
                                    <th class="custom-width-action"><?php echo e(__('content.action')); ?></th>
                                </tr>
                                </thead>

                                <tbody>
                                <?php $desc = count($portfolios); $asc=0; ?>
                                <?php $__currentLoopData = $portfolios; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $portfolio): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                    <tr>
                                        <td>
                                            <input  name="check_list[]" type="checkbox" value="<?php echo e($portfolio->id); ?>" onclick="showHideDeleteButton2(this)"> <span class="d-none"><?php echo e($asc++); ?><?php echo e($desc--); ?></span>
                                        </td>
                                        <td>
                                            <div class="btn-group">
                                                <button type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><?php echo e(__('content.select')); ?></button>
                                                <div class="dropdown-menu">
                                                    <a class="dropdown-item"  href="<?php echo e(route('portfolio-content.create', $portfolio->id)); ?>"><?php echo e(__('content.portfolio_content')); ?></a>
                                                    <a class="dropdown-item"  href="<?php echo e(route('portfolio-detail.create', $portfolio->id)); ?>"><?php echo e(__('content.portfolio_details')); ?></a>
                                                    <a class="dropdown-item"  href="<?php echo e(route('portfolio-image.create', $portfolio->id)); ?>"><?php echo e(__('content.portfolio_images')); ?></a>
                                                </div>
                                            </div>
                                        </td>
                                        <td><?php echo e($portfolio->title); ?></td>
                                        <td><?php echo e($portfolio->category_name); ?></td>
                                        <td><?php echo e($portfolio->order); ?></td>
                                        <td>
                                            <div>
                                                <a href="<?php echo e(route('portfolio.edit', $portfolio->id)); ?>" class="mr-2">
                                                    <i class="fa fa-edit text-info font-18"></i>
                                                </a>
                                                <a href="#" data-toggle="modal" data-target="#deleteModal<?php echo e($portfolio->id); ?>">
                                                    <i class="fa fa-trash text-danger font-18"></i>
                                                </a>
                                            </div>
                                        </td>
                                    </tr>

                                    <!-- Modal -->
                                    <div class="modal fade" id="deleteModal<?php echo e($portfolio->id); ?>" tabindex="-1" role="dialog" aria-labelledby="counterModalCenterTitle" aria-hidden="true">
                                        <div class="modal-dialog modal-dialog-centered modal-sm" role="document">
                                            <div class="modal-content">
                                                <div class="modal-header">
                                                    <h5 class="modal-title" id="counterModalCenterTitle"><?php echo e(__('content.delete')); ?></h5>
                                                    <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo e(__('content.close')); ?>">
                                                        <span aria-hidden="true">&times;</span>
                                                    </button>
                                                </div>
                                                <div class="modal-body text-center">
                                                    <?php echo e(__('content.you_wont_be_able_to_revert_this')); ?>

                                                </div>
                                                <div class="modal-footer">
                                                    <?php if($demo_mode == "on"): ?>
                                                        <!-- Include Alert Blade -->
                                                        <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                                    <?php else: ?>
                                                        <form class="d-inline-block" action="<?php echo e(route('portfolio.destroy', $portfolio->id)); ?>" method="POST">
                                                            <?php echo method_field('DELETE'); ?>
                                                            <?php echo csrf_field(); ?>
                                                            <?php endif; ?>

                                                            <button type="button" class="btn btn-danger" data-dismiss="modal"><?php echo e(__('content.cancel')); ?></button>
                                                            <button type="submit" class="btn btn-success"><?php echo e(__('content.yes_delete_it')); ?></button>
                                                        </form>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                </tbody>
                            </table>
                            <?php else: ?>
                                <span><?php echo e(__('content.not_yet_created')); ?></span>
                            <?php endif; ?>

                </div> <!-- end card body-->
            </div> <!-- end card -->
        </div><!-- end col-->
    </div><!-- end row-->
    <div class="modal fade" id="portfolioSectionModal" tabindex="-1" role="dialog" aria-labelledby="portfolioSectionModalLabel" aria-modal="false">
        <div class="modal-dialog modal-md">
            <div class="modal-content">
                <div class="modal-header">
                    <h5 class="modal-title mt-0 font-16" id="portfolioSectionModalLabel"><?php echo e(__('content.section_title_and_description')); ?></h5>
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                </div>
                <div class="modal-body">
                    <?php if(isset($portfolio_section)): ?>
                        <?php if($demo_mode == "on"): ?>
                            <!-- Include Alert Blade -->
                            <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                        <?php else: ?>
                            <form action="<?php echo e(route('portfolio-section.update', $portfolio_section->id)); ?>" method="POST" enctype="multipart/form-data">
                                <?php echo method_field('PUT'); ?>
                                <?php echo csrf_field(); ?>
                                <?php endif; ?>

                                <input name="style" type="hidden" value="<?php echo e($style); ?>">

                                <div class="row">
                                    <div class="col-md-12">
                                        <div class="form-group">
                                            <label for="title"><?php echo e(__('content.title')); ?></label>
                                            <input type="text" name="title" class="form-control" id="title" value="<?php echo e($portfolio_section->title); ?>">
                                            <small class="form-text text-muted"><?php echo e(__('content.recommended_tags')); ?>

                                                <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('a', 'title')"><?php echo e(__('<a href="">')); ?></span>
                                                <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('br', 'title')"><?php echo e(__('<br>')); ?></span>
                                                <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('b', 'title')"><?php echo e(__('<b>')); ?></span>
                                                <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('i', 'title')"><?php echo e(__('<i>')); ?></span>
                                                <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('span', 'title')"><?php echo e(__('<span>')); ?></span>
                                                <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('p', 'title')"><?php echo e(__('<p>')); ?></span>
                                            </small>
                                        </div>
                                    </div>
                                    <div class="col-md-12">
                                        <div class="form-group">
                                            <label for="description"><?php echo e(__('content.description')); ?></label>
                                            <textarea name="description" class="form-control" id="description" rows="3"><?php echo e($portfolio_section->description); ?></textarea>
                                            <small class="form-text text-muted"><?php echo e(__('content.recommended_tags')); ?>

                                                <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('a', 'description')"><?php echo e(__('<a href="">')); ?></span>
                                                <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('br', 'description')"><?php echo e(__('<br>')); ?></span>
                                                <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('b', 'description')"><?php echo e(__('<b>')); ?></span>
                                                <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('i', 'description')"><?php echo e(__('<i>')); ?></span>
                                                <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('span', 'description')"><?php echo e(__('<span>')); ?></span>
                                                <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('p', 'description')"><?php echo e(__('<p>')); ?></span>
                                            </small>
                                        </div>
                                    </div>
                                    <div class="col-md-12">
                                        <div class="form-group">
                                            <label for="button_name"><?php echo e(__('content.button_name')); ?></label>
                                            <input type="text" name="button_name" class="form-control" id="button_name" value="<?php echo e($portfolio_section->button_name); ?>">
                                        </div>
                                    </div>
                                    <div class="col-md-12">
                                        <div class="form-group">
                                            <label for="button_url"><?php echo e(__('content.button_url')); ?></label>
                                            <input type="text" name="button_url" class="form-control" id="button_url" value="<?php echo e($portfolio_section->button_url); ?>">
                                        </div>
                                    </div>
                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label for="section_item"><?php echo e(__('content.section_item')); ?></label>
                                                <input type="number" name="section_item" class="form-control" id="section_item" value="<?php echo e($portfolio_section->section_item); ?>">
                                            </div>
                                        </div>
                                    <div class="col-md-12">
                                        <div class="form-group">
                                            <label for="paginate_item"><?php echo e(__('content.paginate_item')); ?></label>
                                            <input type="number" name="paginate_item" class="form-control" id="paginate_item" value="<?php echo e($portfolio_section->paginate_item); ?>">
                                        </div>
                                    </div>
                                </div>
                                <button type="submit" class="btn btn-sm btn-primary mr-2"><?php echo e(__('content.submit')); ?></button>
                                <a href="#" class="btn btn-sm btn-primary" data-toggle="modal" data-target="#portfolioSectionDestroyModal<?php echo e($portfolio_section->id); ?>">
                                    <i class="fa fa-trash"></i> <?php echo e(__('content.reset')); ?>

                                </a>
                            </form>

                            <!-- Modal -->
                            <div class="modal fade" id="portfolioSectionDestroyModal<?php echo e($portfolio_section->id); ?>" tabindex="-1" role="dialog" aria-labelledby="portfolioSectionDestroyModalCenterTitle" aria-hidden="true">
                                <div class="modal-dialog modal-dialog-centered modal-sm" role="document">
                                    <div class="modal-content">
                                        <div class="modal-header">
                                            <h5 class="modal-title" id="portfolioSectionDestroyModalCenterTitle"><?php echo e(__('content.delete')); ?></h5>
                                            <button type="button" class="close" data-dismiss="modal" aria-label="<?php echo e(__('content.close')); ?>">
                                                <span aria-hidden="true">&times;</span>
                                            </button>
                                        </div>
                                        <div class="modal-body text-center">
                                            <?php echo e(__('content.you_wont_be_able_to_revert_this')); ?>

                                        </div>
                                        <div class="modal-footer">
                                            <?php if($demo_mode == "on"): ?>
                                                <!-- Include Alert Blade -->
                                                <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                            <?php else: ?>
                                                <form class="d-inline-block" action="<?php echo e(route('portfolio-section.destroy', $portfolio_section->id)); ?>" method="POST">
                                                    <?php echo method_field('DELETE'); ?>
                                                    <?php echo csrf_field(); ?>
                                                    <?php endif; ?>

                                                <button type="button" class="btn btn-danger" data-dismiss="modal"><?php echo e(__('content.cancel')); ?></button>
                                                <button type="submit" class="btn btn-success"><?php echo e(__('content.yes_delete_it')); ?></button>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <?php else: ?>
                                <?php if($demo_mode == "on"): ?>
                                    <!-- Include Alert Blade -->
                                    <?php echo $__env->make('admin.demo_mode.demo-mode', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
                                <?php else: ?>
                                    <form action="<?php echo e(route('portfolio-section.store')); ?>"  method="POST" enctype="multipart/form-data">
                                        <?php echo csrf_field(); ?>
                                        <?php endif; ?>

                                        <input name="style" type="hidden" value="<?php echo e($style); ?>">

                                        <div class="row">
                                            <div class="col-md-12">
                                                <div class="form-group">
                                                    <label for="title"><?php echo e(__('content.title')); ?></label>
                                                    <input type="text" name="title" class="form-control" id="title">
                                                    <small class="form-text text-muted"><?php echo e(__('content.recommended_tags')); ?>

                                                        <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('a', 'title')"><?php echo e(__('<a href="">')); ?></span>
                                                        <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('br', 'title')"><?php echo e(__('<br>')); ?></span>
                                                        <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('b', 'title')"><?php echo e(__('<b>')); ?></span>
                                                        <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('i', 'title')"><?php echo e(__('<i>')); ?></span>
                                                        <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('span', 'title')"><?php echo e(__('<span>')); ?></span>
                                                        <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('p', 'title')"><?php echo e(__('<p>')); ?></span>
                                                    </small>
                                                </div>
                                            </div>
                                            <div class="col-md-12">
                                                <div class="form-group">
                                                    <label for="description"><?php echo e(__('content.description')); ?></label>
                                                    <textarea name="description" class="form-control" id="description" rows="3"></textarea>
                                                    <small class="form-text text-muted"><?php echo e(__('content.recommended_tags')); ?>

                                                        <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('a', 'description')"><?php echo e(__('<a href="">')); ?></span>
                                                        <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('br', 'description')"><?php echo e(__('<br>')); ?></span>
                                                        <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('b', 'description')"><?php echo e(__('<b>')); ?></span>
                                                        <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('i', 'description')"><?php echo e(__('<i>')); ?></span>
                                                        <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('span', 'description')"><?php echo e(__('<span>')); ?></span>
                                                        <span class="text-danger font-weight-bold custom-tag mr-1" onclick="insertTag('p', 'description')"><?php echo e(__('<p>')); ?></span>
                                                    </small>
                                                </div>
                                            </div>
                                            <div class="col-md-12">
                                                <div class="form-group">
                                                    <label for="button_name"><?php echo e(__('content.button_name')); ?></label>
                                                    <input type="text" name="button_name" class="form-control" id="button_name">
                                                </div>
                                            </div>
                                            <div class="col-md-12">
                                                <div class="form-group">
                                                    <label for="button_url"><?php echo e(__('content.button_url')); ?></label>
                                                    <input type="text" name="button_url" class="form-control" id="button_url">
                                                </div>
                                            </div>
                                                <div class="col-md-12">
                                                    <div class="form-group">
                                                        <label for="section_item"><?php echo e(__('content.section_item')); ?></label>
                                                        <input type="number" name="section_item" class="form-control" id="section_item" value="6">
                                                    </div>
                                                </div>
                                            <div class="col-md-12">
                                                <div class="form-group">
                                                    <label for="paginate_item"><?php echo e(__('content.paginate_item')); ?></label>
                                                    <input type="number" name="paginate_item" class="form-control" id="paginate_item" value="12">
                                                </div>
                                            </div>
                                        </div>
                                        <button type="submit" class="btn btn-sm btn-primary"><?php echo e(__('content.submit')); ?></button>
                                    </form>
                                <?php endif; ?>
                </div>
            </div><!-- /.modal-content -->
        </div><!-- /.modal-dialog -->
    </div><!-- /.modal -->
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin.master', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/lltrusti/casinonexus.online/ajay/resources/views/admin/portfolio/index.blade.php ENDPATH**/ ?>