





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





    <div class="page-content">


        <!-- BEGIN PAGE HEADER-->


        <!-- BEGIN PAGE BAR -->


        <div class="page-bar">


            <ul class="page-breadcrumb">


                <li>


                    <a href="<?php echo e(url(getCurrentLocale() . '/manager')); ?>"><?php echo e(trans('general.bcHome')); ?></a>


                    <i class="fa fa-circle"></i>


                </li>


                


            </ul>


        </div>


        <!-- END PAGE BAR -->


        <!-- BEGIN PAGE TITLE-->


        <h3 class="page-title"> <?php echo e(trans('general.ptEditArticle')); ?>



        </h3>


        <!-- END PAGE TITLE-->


        <!-- END PAGE HEADER-->


        <a href="<?php echo e(url(getCurrentLocale() . '/manager/collection/' . $collectionId . '/article')); ?>" class="btn green btn-outline sbold uppercase margin-bottom-20" data-action="collapse-all"><i class="fa fa-arrow-left"></i> <?php echo e(trans('general.back')); ?></a>


        <!-- END BACK BTN -->


        <div class="portlet light bordered">


            <div class="portlet-body form">





                <div class="tabbable-line">





                    <?php $langs = array_keys(LaravelLocalization::getSupportedLocales()); ?>


                    <div class="clearfix">


                        <ul class="nav nav-tabs pull-left">





                            <?php for($i = 0; $i < count($langs); $i++): ?>





                                <?php $item = LaravelLocalization::getSupportedLocales()[$langs[$i]]; ?>





                                <li class="<?php if($langs[$i] == getCurrentLocale()): ?> <?php echo e('active'); ?> <?php endif; ?>">


                                    <a href="#tab_<?php echo e($i); ?>" data-toggle="tab" aria-expanded="false"><?php echo e($item['name']); ?></a>


                                </li>





                            <?php endfor; ?>





                        </ul>

                        


                            <ul class="nav nav-tabs pull-right">


                                


                                <li>


                                    <a href="<?php echo e(url(getCurrentLocale() . '/manager/collection/' . $collectionId . '/article/' . $articleId . '/image')); ?>"><i class="fa fa-file-image-o"></i> <?php echo e(trans('general.attachImages')); ?></a>


                                </li>


                            </ul>
                        


                    </div>





                    <div class="tab-content">





                        <?php for($i = 0; $i < count($langs); $i++): ?>

		



                            <div id="tab_<?php echo e($i); ?>" class="tab-pane <?php if($langs[$i] == getCurrentLocale()): ?> <?php echo e('active'); ?> <?php endif; ?>">





                                <?php echo Form::open(array('method' => 'PATCH', 'url' => getCurrentLocale().'/manager/collection/' . $article[$i]->id . '/article/update', 'id' => 'form_' . $langs[$i], 'class' => 'form-horizontal form_ajax')); ?>






                                    <div class="form-body">


                                        <input type="hidden" name="lang" value="<?php echo e($langs[$i]); ?>">


                                        <input type="hidden" name="id" value="<?php echo e($article[$i]->id); ?>">


                                        <div class="form-group">


                                            <label class="col-md-2 control-label"><?php echo e(trans('general.fclbName')); ?>



                                                <span aria-required="true" class="required"> * </span>


                                            </label>


                                            <div class="col-md-7">


                                                <input type="text" name="name" class="form-control input-lg" value="<?php echo e($article[$i]->name); ?>">


                                            </div>


                                        </div>
                                                 <?php if($langs[$i] == "ka"): ?>
                                     <!--   <div class="form-group">



                                            <label class="col-md-2 control-label">თარიღი</label>



                                            <div class="col-md-7">

 											<div class="input-group input-medium date date-picker" data-date-format="yyyy-mm-dd" >
                                                            <input type="text" name="sDate"  class="form-control" value="<?php echo e($article[$i]->sDate); ?>" readonly="">
                                                            <span class="input-group-btn">
                                                                <button class="btn default" type="button">
                                                                    <i class="fa fa-calendar"></i>
                                                                </button>
                                                            </span>
                                                        </div>

												
                                            </div>



                                        </div>-->
                                        <?php endif; ?>
                                        
                                        


                                        <div class="form-group">


                                            <label class="control-label col-md-2"><?php echo e(trans('general.fclbPhoto')); ?></label>


                                            <div class="col-md-3">


                                                <div class="photo">


                                                    <button type="button" class="btn btn-primary red remove-filemanager-photo">


                                                        <i class="fa fa-close"></i>


                                                    </button>


                                                    <img src="<?php echo e((!empty($article[$i]->imgurl)) ? $article[$i]->imgurl : url('assets/nn_cms/custom/images/default-780x450.png')); ?>" data-default-photo-src="<?php echo e(url('assets/nn_cms/custom/images/default-780x450.png')); ?>" id="showImg_<?php echo e($langs[$i]); ?>" class="img-responsive img-thumbnail center-block img" alt="article photo">


                                                    <input type="hidden" name="imgurl" id="imgurl_<?php echo e($langs[$i]); ?>"  data-required="1" class="form-control" value="<?php echo e($article[$i]->imgurl); ?>">


                                                </div>


                                                <button type="button" class="btn green-sharp btn-block sbold uppercase margin-top-10 filemanager-btn" data-lang="<?php echo e($langs[$i]); ?>"><?php echo e(trans('general.fclbSetPhotoBtn')); ?></button>


                                            </div>


                                        </div>
                                        <div class="form-group">



<label class="control-label col-md-2">og:<?php echo e(trans('general.fclbPhoto')); ?></label>



<div class="col-md-3">



    <div class="photo">



        <button type="button" class="btn btn-primary red remove-filemanager-photo">



            <i class="fa fa-close"></i>



        </button>



        <img src="<?php echo e((!empty($article[$i]->ogimgurl)) ? $article[$i]->ogimgurl : url('assets/nn_cms/custom/images/default-780x450.png')); ?>" data-default-photo-src="<?php echo e(url('assets/nn_cms/custom/images/default-780x450.png')); ?>" id="ogshowImg_<?php echo e($langs[$i]); ?>" class="img-responsive img-thumbnail center-block img" alt="catalog photo">



        <input type="hidden" name="ogimgurl" id="ogimgurl_<?php echo e($langs[$i]); ?>"  data-required="1" class="form-control" value="<?php echo e($article[$i]->ogimgurl); ?>">



    </div>



    <button type="button" onclick="chooseImg('og')" class="btn green-sharp btn-block sbold uppercase margin-top-10 filemanager-btn" data-lang="<?php echo e($langs[$i]); ?>"><?php echo e(trans('general.fclbSetPhotoBtn')); ?></button>



</div>



</div>


                                        <div class="form-group">


                                            <label class="col-md-2 control-label"><?php echo e(trans('general.fclbBody')); ?></label>


                                            <div class="col-md-7">


                                                <script src="<?php echo e(url('assets/nn_cms/global/plugins/ckeditor/ckeditor.js')); ?>" type="text/javascript"></script>


                                                <textarea id="body_editor_<?php echo e($langs[$i]); ?>" class="ckeditor form-control" name="body" rows="6" data-error-container="#editor1_error"><?php echo e($article[$i]->body); ?></textarea>


                                                <script>


                                                    CKEDITOR.replace("body_editor_<?php echo e($langs[$i]); ?>", {



                                                        filebrowserImageBrowseUrl: '<?php echo e(asset("filemanager?type=Images")); ?>',



                                                        filebrowserImageUploadUrl: '<?php echo e(asset("filemanager?type=Image&_token=")); ?><?php echo e(csrf_token()); ?>',



                                                        filebrowserBrowseUrl: '<?php echo e(asset("manager/laravel-filemanager?type=Files")); ?>',



                                                        filebrowserUploadUrl: '<?php echo e(asset("manager/laravel-filemanager/upload?type=Files&_token=")); ?><?php echo e(csrf_token()); ?>'



                                                    });


                                                </script>


                                                <div id="editor1_error"></div>


                                            </div>


                                        </div>


                                        


                                    </div>
                                    <?php if(request()->route('cat_id') != 7): ?>
                                    <div class="form-group last">

                                        <label for="" class="control-label col-md-2">დასრულებული</label>


                                            <div class="col-md-7">


                                            <input type="checkbox" <?php echo e(($articleStatus->status == "1") ? "checked":""); ?> name="status" value="1" class="make-switch sort-switch-box" data-on-color="success" data-off-color="default" data-on-text="კი" data-off-text="არა"  data-size="small">


                                            </div>


                                        </div>
                                        <?php else: ?>
                    <div class="form-group">
                            <label class="col-md-2 control-label">სტატუსი <?php echo e($articleStatus->status); ?></label>
                            <div class="col-md-7">
                                <select name="status" class="form-control input-lg selectpicker" data-live-search="true">

                                    <option <?php echo e(($articleStatus->status == 1) ? 'selected' :''); ?> value="1">დაგეგმილი ღონისძიებები</option>
                                    <option <?php echo e(($articleStatus->status == 2) ? 'selected' :''); ?>  value="2">მიმდინარე ღონისძიებები</option>
                                    <option <?php echo e(($articleStatus->status == 3) ?'selected' :''); ?>  value="3">დასრულებული ღონისძიებები</option>
                                </select>
                            </div>
                        </div>

                    <?php endif; ?>


                                  


                                    <div class="form-actions right">


                                        <div class="row">


                                            <div class="col-md-9">


                                                <button type="submit" class="btn green-seagreen btn-outline sbold uppercase" data-action="collapse-all" data-lang="<?php echo e($langs[$i]); ?>" data-update-success-text="<?php echo e(trans('general.updateSuccess')); ?>" data-update-error-fill-in-text="<?php echo e(trans('general.updateErrorFillIn')); ?>"><?php echo e(trans('general.fclbUpdate')); ?></button>


                                            </div>


                                        </div>


                                    </div>





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






                            </div>





                        <?php endfor; ?>





                    </div>





                </div>





            </div>


        </div>


    </div>





    <?php $__env->startPush('body.bottom'); ?>


        <script src="<?php echo e(url('assets/nn_cms/custom/js/filemanager-image.js')); ?>" type="text/javascript"></script>
        <script src="<?php echo e(url('vendor/laravel-filemanager/js/stand-alone-button.js')); ?>"></script>
        <script src="<?php echo e(url('assets/nn_cms/custom/js/lfm.js')); ?>" type="text/javascript"></script>


        <!-- END SET IMAGE SCRIPTS -->


        <script src="<?php echo e(url('assets/nn_cms/global/plugins/bootstrap-toastr/toastr.min.js')); ?>" type="text/javascript"></script>


        <script src="<?php echo e(url('assets/nn_cms/custom/js/toastr.js')); ?>" type="text/javascript"></script>


        <!-- END TOASTR SCRIPTS -->


        <script src="<?php echo e(url('assets/nn_cms/custom/js/form.js')); ?>" type="text/javascript"></script>


        <!-- END UPDATE BY AJAX FORM.JS  -->


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





<?php $__env->stopSection(); ?>
<?php echo $__env->make('../nn_cms/index', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/ttqpucgs/public_html/resources/views/nn_cms/pages/nn_article/edit.blade.php ENDPATH**/ ?>