

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

<div class="content-area">
    <div class="mr-breadcrumb">
        <div class="row">
            <div class="col-lg-12">
                <h4 class="heading"><?php echo e(__('Edit Articles')); ?></h4>
                <ul class="links">
                    <li>
                        <a href="<?php echo e(route('admin.dashboard')); ?>"><?php echo e(__('Dashboard')); ?> </a>
                    </li>
                    <li>
                        <a href="<?php echo e(route('categories.index')); ?>"><?php echo e(__('Articles')); ?></a>
                    </li>
                </ul>
            </div>
        </div>
    </div>
    <?php echo $__env->make('includes.admin.form-both', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?>
    <div class="gocover" style="background: url(<?php echo e(asset('assets/images/'.$gs->admin_loader)); ?>) no-repeat scroll center center rgba(45, 45, 45, 0.5);"></div>
    <form id="geniusformdata2" action="<?php echo e(route('article.update',$data->id)); ?>" enctype="multipart/form-data">
           <?php echo e(csrf_field()); ?>

    <input type="hidden" name="is_pending" value="<?php echo e($data->is_pending); ?>">
    <input type="hidden" name="post_type" value="<?php echo e($data->post_type); ?>">
    <input type="hidden" id="article_post_id" value="<?php echo e($data->id); ?>">
    <div class="row">
        <div class="col-lg-8">
            <div class="add-product-content">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="product-description">
                            <div class="body-area">
                                
                                <div class="row">
                                    <div class="col-lg-12">
                                        <div class="left-area">
                                            <h4 class="heading"><?php echo e(__('Language')); ?> *</h4>
                                        </div>
                                    </div>
                                    <div class="col-lg-12">
                                        <select name="language_id" id="article_language_id">
                                            <?php $__currentLoopData = $languages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option value="<?php echo e($language->id); ?>" <?php echo e($language->id == $data->language_id ? 'selected' : ''); ?>><?php echo e($language->language); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                    </div>
                                </div>

                                    <div class="row">
                                        <div class="col-lg-12">
                                            <div class="left-area">
                                                <h4 class="heading"><?php echo e(__('Title')); ?> *</h4>
                                                <p class="sub-heading"><?php echo e(__('(In Any Language)')); ?></p>
                                            </div>
                                        </div>
                                        <div class="col-lg-12">
                                            <input type="text" class="input-field" name="title"
                                        placeholder="<?php echo e(__('Title')); ?>" id="title" autocomplete="off" value="<?php echo e($data->title); ?>">
                                        </div>
                                    </div>
        
                                    <div class="row">
                                        <div class="col-lg-12">
                                            <div class="left-area">
                                                <h4 class="heading"><?php echo e(__('Slug')); ?> *</h4>
                                                <p class="sub-heading"><?php echo e(__('In English')); ?></p>
                                            </div>
                                        </div>
                                        <div class="col-lg-12">
                                            <input type="text" class="input-field" id="slug" name="slug"
                                                placeholder="<?php echo e(__('Slug')); ?>" value="<?php echo e($data->slug); ?>">
                                                <p id="slugCheck"></p>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-lg-12">
                                            <div class="left-area">
                                                <h4 class="heading"><?php echo e(__('Meta Keyword')); ?> *</h4>
                                            </div>
                                        </div>
                                        <div class="col-lg-12">
                                            <textarea class="input-field textarea" name="meta_tag" placeholder="<?php echo e(__('Keyword meta tag')); ?>"><?php echo e($data->meta_tag); ?></textarea>
                                        </div>
                                    </div>






                           <div class="row">
                                        <div class="col-lg-12">
                                            <div class="left-area">
                                                <h4 class="heading"><?php echo e(__('Images Caption')); ?> *</h4>
                                                <p class="sub-heading"><?php echo e(__('(In Any Language)')); ?></p>
                                            </div>
                                        </div>
                                        <div class="col-lg-12">
                                            <input type="text" class="input-field" name="images_caption"
                                        placeholder="<?php echo e(__('Images Caption')); ?>" id="images_caption" autocomplete="off" value="<?php echo e($data->images_caption); ?>">
                                        </div>
                                    </div>






                           <div class="row">
                                        <div class="col-lg-12">
                                            <div class="left-area">
                                                <h4 class="heading"><?php echo e(__('Reporter Name')); ?> *</h4>
                                                <p class="sub-heading"><?php echo e(__('(In Any Language)')); ?></p>
                                            </div>
                                        </div>
                                        <div class="col-lg-12">
                                            <input type="text" class="input-field" name="reporter_name"
                                        placeholder="<?php echo e(__('Reporter Name')); ?>" id="reporter_name" autocomplete="off" value="<?php echo e($data->reporter_name); ?>">
                                        </div>
                                    </div>






                                    <div class="row">
                                        <div class="col-lg-12">
                                            <div class="left-area">
                                                <h4 class="heading"><?php echo e(__('Short Description')); ?> *</h4>
                                            </div>
                                        </div>
                                        <div class="col-lg-12">
                                            <textarea class="input-field textarea" name="short_description" placeholder="<?php echo e(__('Short Details')); ?>"><?php echo e($data->short_description); ?></textarea>
                                        </div>
                                    </div>



                                    <div class="row">
                                        <div class="col-lg-12">
                                          <div class="left-area">
                                            <h4 class="heading">
                                                <?php echo e(__('Description')); ?> *
                                            </h4>
                                          </div>
                                        </div>
                                        <div class="col-lg-12 description">
                                            <textarea class="nic-edit" name="description" placeholder="<?php echo e(__('Description')); ?>" id="description"><?php echo e($data->description); ?></textarea> 
                                        </div>
                                    </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-lg-4">
           <div class="row">
               <div class="col-lg-12">
                <div class="add-product-content">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="product-description">
                                <div class="body-area">
                                    <div class="row">
                                        <div class="col-lg-12">
                                          <div class="left-area">
                                              <h4 class="heading"><?php echo e(__('Current Featured Image')); ?> *</h4>
                                          </div>
                                        </div>
                                        <div class="col-lg-12">
                                          <div class="img-upload custom-image-upload">
                                              <div id="image-preview" class="img-preview" style="background: url(<?php echo e($data->image_big ? asset('assets/images/post/'.$data->image_big) : asset('assets/admin/images/upload.png')); ?>);">
                                                <label for="image-upload" class="img-label" id="image-label"><i class="icofont-upload-alt"></i>Upload</label>
                                                  <input type="file" name="image_big" class="img-upload" id="image-upload">
                                              </div>
                                                <p class="text"><?php echo e(__('Prefered Size: (600x600) or Square Sized Image')); ?></p>
                                          </div>
                        
                                        </div>
                                    </div>


                                </div>
                            </div>
                        </div>
                    </div>
                </div>
               </div>
           </div>


           <div class="row mt-3 categoryDiv" style="display:none;">
            <div class="col-lg-12">
                <div class="add-product-content">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="product-description">
                                <div class="body-area">
                                    <div class="row">
                                        <div class="col-lg-4">
                                            <div class="left-area">
                                                <h4 class="heading"><?php echo e(__('Category')); ?> *</h4>
                                            </div>
                                        </div>
                                        <div class="col-lg-7">
                                            <select name="category_id" id="article_parent_id">
                                            </select>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-lg-4">
                                            <div class="left-area">
                                                <h4 class="heading"><?php echo e(__('Sub Category')); ?> *</h4>
                                            </div>
                                        </div>
                                        <div class="col-lg-7">
                                            <select name="subcategories_id" id="subcategory_id">
                                                <option value=""><?php echo e(__('Please a Sub Category(if any)')); ?></option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
           </div>


           <div class="row mt-3">
                <div class="col-lg-12">
                    <div class="add-product-content">
                        <div class="row">
                            <div class="col-lg-12">
                                <div class="product-description">
                                    <div class="body-area">
                                        
                                    <div class="row">
                                        <div class="col-lg-6">
                                            <div class="left-area">
                                                <h4 class="heading"><?php echo e(__('Add to Feature')); ?> *</h4>
                                            </div>
                                        </div>
                                        <div class="col-lg-6">
                                            <div class="custom-control custom-radio d-inline-block mr-5">
                                                <input type="radio" class="custom-control-input"  name="is_feature" value="1" id="is_feature1" <?php if($data->is_feature ==1): ?> checked <?php endif; ?>> 
                                                <label for="is_feature1" class="custom-control-label"><?php echo e(__('Yes')); ?></label>
                                            </div>    
                                            <div class="custom-control custom-radio d-inline-block mr-5">
                                                <input type="radio" class="custom-control-input" name="is_feature" value="0" id="is_feature2" <?php if($data->is_feature ==0): ?> checked <?php endif; ?>> 
                                                <label for="is_feature2" class="custom-control-label"><?php echo e(__('No')); ?></label>
                                            </div>   
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-lg-6">
                                            <div class="left-area">
                                                <h4 class="heading"><?php echo e(__('Add to Slider')); ?> *</h4>
                                            </div>
                                        </div>
                                        <div class="col-lg-6">
                                            <div class="custom-control custom-radio d-inline-block mr-5">
                                                <input type="radio" class="custom-control-input"  name="is_slider" value="1" id="slider1" <?php if($data->is_slider ==1): ?> checked <?php endif; ?>>
                                                <label for="slider1" class="custom-control-label"><?php echo e(__('Yes')); ?></label>
                                            </div>
                                             <div class="custom-control custom-radio d-inline-block mr-5">
                                                <input type="radio" class="custom-control-input" name="is_slider" value="0" id="slider2" <?php if($data->is_slider ==0): ?> checked <?php endif; ?>> 
                                                <label for="slider2" class="custom-control-label"><?php echo e(__('No')); ?></label>
                                            </div>   
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-lg-6">
                                            <div class="left-area">
                                                <h4 class="heading"><?php echo e(__('Slider Right Post')); ?> *</h4>
                                            </div>
                                        </div>
                                        <div class="col-lg-6">
                                            <div class="custom-control custom-radio d-inline-block mr-5">
                                                <input type="radio"  class="custom-control-input" name="slider_right" value="1" id="slider_right1" <?php if($data->slider_right ==1): ?> checked <?php endif; ?>> 
                                                <label for="slider_right1" class="custom-control-label"><?php echo e(__('Yes')); ?></label>
                                            </div>   
                                            <div class="custom-control custom-radio d-inline-block mr-5">
                                                <input type="radio" class="custom-control-input" name="slider_right" value="0" id="slider_right2" <?php if($data->slider_right ==0): ?> checked <?php endif; ?>> 
                                                <label for="slider_right2" class="custom-control-label"><?php echo e(__('No')); ?></label>
                                            </div>   
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-lg-6">
                                            <div class="left-area">
                                                <h4 class="heading"><?php echo e(__('Add to Trending News')); ?> *</h4>
                                            </div>
                                        </div>
                                        <div class="col-lg-6">
                                            <div class="custom-control custom-radio d-inline-block mr-5">
                                                <input type="radio" class="custom-control-input"  name="is_trending" value="1" id="is_trending1" <?php if($data->is_trending ==1): ?> checked <?php endif; ?>>
                                                <label for="is_trending1" class="custom-control-label"><?php echo e(__('Yes')); ?></label>
                                            </div>   
                                            <div class="custom-control custom-radio d-inline-block mr-5">
                                                <input type="radio" class="custom-control-input" name="is_trending" value="0" id="is_trending2" <?php if($data->is_trending ==0): ?> checked <?php endif; ?>>
                                                <label for="is_trending2" class="custom-control-label"><?php echo e(__('No')); ?></label>
                                            </div>   
                                        </div>
                                    </div>

                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
           </div> 


           <div class="row mt-3">
            <div class="col-lg-12">
                <div class="add-product-content">
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="product-description">
                                <div class="body-area">
                                    <div class="row" <?php if($data->schedule_post == 0): ?> ? style="display:none;" : style="display:block;" <?php endif; ?>>
                                        <div class="col-lg-12">
                                            <div class="left-area">
                                                <h4 class="heading"><?php echo e(__('Schedule Post')); ?> *</h4>
                                            </div>
                                        </div>
                                        <div class="col-lg-12">
                                        <input type="checkbox" class="schedule" name="schedule_post" value="<?php echo e($data->schedule_post); ?>" <?php echo e($data->schedule_post ==1 ? 'checked':''); ?> disabled >
                                        </div>
                                    </div>

                                    <div class="row datepick" style="display:none;">
                                        <div class="col-lg-12">
                                            <div class="left-area">
                                                <h4 class="heading"></h4>
                                            </div>
                                        </div>
                                        <div class="col-lg-12">
                                            <div class="form-group">
                                                <input id="from" class="input-field" type="text" name="schedule_post_date" autocomplete="off" placeholder="<?php echo e(__('Start Date')); ?>" required="" value="<?php echo e($data->schedule_post_date); ?>">
                                            </div>
                                        </div>
                                    </div>

                                    <div class="row">
                                        <div class="col-lg-12">
                                            
                                        </div>
                                        <div class="col-lg-12">
                                            <input type="submit" data-draft="0" class="btn btn-success submit-btn1" value="Update Post">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
           </div>  
        </div>
    </div>
</form>
</div>

<div class="modal fade-scale" id="setgallery" tabindex="-1" role="dialog" aria-labelledby="setgallery" aria-hidden="true">
    <div class="modal-dialog modal-dialog-centered  modal-lg" role="document">
        <div class="modal-content">
        <div class="modal-header">
            <h5 class="modal-title" id="exampleModalCenterTitle"><?php echo e(__("Image Gallery")); ?></h5>
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">×</span>
            </button>
        </div>
        <div class="modal-body">
            <div class="top-area">
                <div class="row">
                    <div class="col-sm-6 text-right">
                        <div class="upload-img-btn">
                            <form  method="POST" enctype="multipart/form-data" id="form-gallery">
                                <?php echo e(csrf_field()); ?>

                            <input type="hidden" id="post_id" name="post_id" value="<?php echo e($data->id); ?>">
                            <input type="file" name="gallery[]" class="hidden" id="article_upload_gallery_edit" accept="image/*" multiple>
                                    <label id="article_gallery_edit"><i class="icofont-upload-alt"></i><?php echo e(__("Upload File")); ?></label>
                            </form>
                        </div>
                    </div>
                    <div class="col-sm-6">
                        <a href="javascript:;" class="upload-done" data-dismiss="modal"> <i class="fas fa-check"></i> <?php echo e(__("Done")); ?></a>
                    </div>
                    <div class="col-sm-12 text-center">( <small><?php echo e(__("You can upload multiple Images.")); ?></small> )</div>
                </div>
            </div>
            <div class="gallery-images">
                <div class="selected-image">
                    <div class="row">


                    </div>
                </div>
            </div>
        </div>
        </div>
    </div>
</div>



<div class="modal fade-scale" id="post-approve" tabindex="-1" role="dialog" aria-labelledby="modal1" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">

            <div class="modal-header d-block text-center">
                <h4 class="modal-title d-inline-block"><?php echo e(__('Post Approve')); ?></h4>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>

            <!-- Modal body -->
            <div class="modal-body">
                <p class="text-center">
                    <?php echo e(__('You are about to approve this Post')); ?>.
                </p>
                <p class="text-center"><?php echo e(__('Do you want to proceed?')); ?></p>
            </div>

            <!-- Modal footer -->
            <div class="modal-footer justify-content-center">
                <button type="button" class="btn btn-default" data-dismiss="modal"><?php echo e(__('Cancel')); ?></button>
                <a class="btn btn-danger btn-ok"><?php echo e(__('Approve')); ?></a>
            </div>

        </div>
    </div>
</div>



<?php $__env->stopSection(); ?>


<?php $__env->startSection('scripts'); ?>
<script src="<?php echo e(asset('assets/admin/js/page.js')); ?>"></script>
<script src="<?php echo e(asset('assets/admin/js/articleEdit.js')); ?>"></script>
<script src="<?php echo e(asset('assets/admin/js/image_gallary.js')); ?>"></script>
<script src="<?php echo e(asset('assets/admin/js/tagify.js')); ?>"></script>
<script>
    $('.tags').tagify();
</script>

<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.admin', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH F:\xampp\htdocs\project\resources\views/admin/article/edit.blade.php ENDPATH**/ ?>