<?php $__env->startSection("content"); ?>
    <div class="content-header row">
        <div class="content-header-left col-md-6 col-12 mb-2 breadcrumb-new">
            <h3 class="content-header-title mb-0 d-block">Haber Düzenle</h3>
            <div class="row breadcrumbs-top d-inline-block">
                <div class="breadcrumb-wrapper col-12">
                    <ol class="breadcrumb">
                        <li class="breadcrumb-item"><a href="<?php echo e(url('panel')); ?>">Anasayfa</a>
                        </li>
                        <li class="breadcrumb-item"><a href="<?php echo e(url('panel/haberler')); ?>">Haberler</a>
                        </li>
                        <li class="breadcrumb-item active">Haber Düzenle
                        </li>
                    </ol>
                </div>
            </div>
        </div>
        <div class="content-header-right col-md-6 col-12">
            <div class="dropdown float-md-right">
                <a href="<?php echo e(url('panel/haberler')); ?>" class="btn btn-dark round btn-glow px-2">Geri Dön</a>
            </div>
        </div>
    </div>
    <div class="content-body">
        <!-- Row separator layout section start -->
        <section id="row-separator-form-layouts">
            <div class="row">
                <div class="col-md-12">
                    <div class="card">

                        <div class="card-content collapse show">
                            <div class="card-body">
                                <form action="<?php echo e(route('panel.haberler.haber.duzenle',['id'=>$haber->id])); ?>" method="post" enctype="multipart/form-data" class="form form-horizontal row-separator">
                                    <?php echo csrf_field(); ?>
                                    <div class="form-body">
                                        <?php if($errors->any()): ?>
                                            <div class="alert alert-danger">
                                                <?php $__currentLoopData = $errors->all(); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $error): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <p class="mb-0"><?php echo e($error); ?></p>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </div>
                                        <?php endif; ?>
                                        <h4 class="form-section"><i class="la la-newspaper-o"></i> Haber Bilgileri</h4>
                                        <div class="form-group row">
                                            <label class="sr-only" for="kategori">Kategori</label>
                                            <div class="col-md-3 pl-0">
                                                <select id="kategori" name="kategori" class="form-control">
                                                    <?php $__currentLoopData = $kategoriler; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $kategori): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <option value="<?php echo e($kategori->id); ?>" <?php if($haber->kategori == $kategori->id): ?><?php echo e('selected'); ?><?php endif; ?>><?php echo e($kategori->baslik); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </select>
                                            </div>
                                            <div class="col-md-3">
                                                <div class='input-group'>
                                                    <input id="tarih" type="text" name="tarih" class="form-control singledate"
                                                           value="<?php echo e(date('d-m-Y H:i',strtotime($haber->tarih))); ?>" />
                                                    <div class="input-group-append">
                                                        <span class="input-group-text">
                                                          <span class="la la-calendar"></span>
                                                        </span>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-3">
                                                <select id="kaynak" name="kaynak" class="form-control">
                                                    <option value="0">Kaynak Seçiniz</option>
                                                    <?php $__currentLoopData = $kaynaklar; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $kaynak): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <option value="<?php echo e($kaynak->id); ?>" <?php if($haber->kaynak == $kaynak->id): ?><?php echo e('selected'); ?><?php endif; ?>><?php echo e($kaynak->baslik); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </select>
                                            </div>
                                            <div class="col-md-3">
                                                <select id="editor" name="editor" class="form-control">
                                                    <option value="0" disabled>Editör Seçiniz</option>
                                                    <?php $__currentLoopData = $editorler; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $editor): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <option <?php if($haber->editor == $editor->id): ?> <?php echo e('selected'); ?> <?php endif; ?> value="<?php echo e($editor->id); ?>"><?php echo e($editor->name); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                                </select>
                                            </div>

                                        </div>

                                        <div class="row">
                                            <div class="col-md-9">
                                                <div class="form-group row">
                                                    <label class="sr-only" for="baslik">Haber Başlığı</label>
                                                    <div class="col-md-12 pl-0">
                                                        <input type="text" id="baslik" class="form-control" placeholder="Haberin başlığını giriniz." name="baslik" required
                                                               value="<?php echo e($haber->baslik); ?>">
                                                        <small class="form-text text-muted">60 karakterden uzun olan başlıklar arama sonuçlarından çıkarılır. Arama motorları bu kelimeleri kaydetmezler.</small>
                                                    </div>
                                                </div>

                                                <div class="form-group row">
                                                    <label class="sr-only" for="baslik2">Haber Başlığı 2</label>
                                                    <div class="col-md-12 pl-0">
                                                        <input type="text" id="baslik2" class="form-control" placeholder="2. Haber başlığını giriniz." name="baslik2"
                                                               value="<?php echo e($haber->baslik2); ?>">
                                                        <small class="form-text text-muted">Bu başlığı alternatif olarak kullanabilirsiniz. Manşette görünür.</small>
                                                    </div>
                                                </div>


                                                <div class="form-group row">
                                                    <label class="sr-only" for="metadesc">Özet</label>
                                                    <div class="col-md-12 pl-0">
                            <textarea id="metadesc" rows="5" class="form-control" name="metadesc"
                                      placeholder="Haber spot (özet) açıklamasını giriniz."><?php echo e($haber->metadesc); ?></textarea>
                                                        <small class="form-text text-muted">Haber spotunun SEO açısından 160 karakteri geçmemesi önerilir.</small>
                                                    </div>
                                                </div>
                                                <div class="form-group row last">
                                                    <label class="sr-only" for="metakey">Etiketler</label>
                                                    <div class="col-md-12 pl-0">
                                                        <div class="form-group">
                                                            <input type="text" id="metakey" class="form-control" placeholder="Haber etiketleri" name="metakey" value="<?php echo e($haber->metakey); ?>">
                                                        </div>
                                                        <small class="form-text text-muted">Her kelime arasında virgül koymak yerine kısa arama cümleleri arasında virgül koymak sitenizin arama motorlarında üst sıralarda çıkmasını sağlayacaktır. Anahtar kelimeler seo açısından 250 karakteri geçmemelidir.</small>
                                                    </div>
                                                </div>
                                            </div>
                                            <div class="col-md-3">
                                                <select title="İsterseniz manşet başlığı arka plan rengini seçebilirsiniz." data-toggle="tooltip" data-trigger="hover" data-placement="top" id="renk" name="renk" class="form-control mt-1">
                                                    <option value="0" <?php if($haber->renk == 0): ?> <?php echo e('selected'); ?> <?php endif; ?>>Renk Seçiniz</option>
                                                    <option value="1" <?php if($haber->renk == 1): ?> <?php echo e('selected'); ?> <?php endif; ?>>Kırmızı</option>
                                                    <option value="2" <?php if($haber->renk == 2): ?> <?php echo e('selected'); ?> <?php endif; ?>>Turuncu</option>
                                                    <option value="3" <?php if($haber->renk == 3): ?> <?php echo e('selected'); ?> <?php endif; ?>>Mavi</option>
                                                    <option value="4" <?php if($haber->renk == 4): ?> <?php echo e('selected'); ?> <?php endif; ?>>Mor</option>
                                                    <option value="5" <?php if($haber->renk == 5): ?> <?php echo e('selected'); ?> <?php endif; ?>>Yeşil</option>
                                                    <option value="6" <?php if($haber->renk == 6): ?> <?php echo e('selected'); ?> <?php endif; ?>>Pembe</option>
                                                    <option value="7" <?php if($haber->renk == 7): ?> <?php echo e('selected'); ?> <?php endif; ?>>Siyah</option>
                                                </select>
                                                <select title="İsterseniz haberin gerçekleştiği şehiri seçebilirsiniz." data-toggle="tooltip" data-trigger="hover" data-placement="top" id="sehir" name="sehir" class="form-control mt-1">
                                                    <option value="0">Şehir Seçiniz</option>
                                                    <?php $__currentLoopData = $sehirler; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $sehir): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                        <option value="<?php echo e($sehir->id); ?>" <?php if($sehir->id == $haber->sehir): ?> <?php echo e('selected'); ?> <?php endif; ?>><?php echo e($sehir->il_adi); ?></option>
                                                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                </select>

                                                <div class="card mt-1" style="background-color: #f7f7f7">
                                                    <div class="card-content">
                                                        <div class="card-body">
                                                            <h4 class="card-title danger">Haber Konumu</h4>
                                                            <fieldset>
                                                                <div class="custom-control custom-checkbox">
                                                                    <input type="checkbox" class="custom-control-input" name="anamanset" id="anamanset"
                                                                    <?php if(1 == $haber->anamanset): ?> <?php echo e('checked'); ?> <?php endif; ?>>
                                                                    <label class="custom-control-label" for="anamanset">Ana Manşet</label>
                                                                </div>
                                                            </fieldset>
                                                            <fieldset style="padding-top: 7px">
                                                                <div class="custom-control custom-checkbox">
                                                                    <input type="checkbox" class="custom-control-input" name="spot" id="spot"
                                                                    <?php if(1 == $haber->spot): ?> <?php echo e('checked'); ?> <?php endif; ?>>
                                                                    <label class="custom-control-label" for="spot">Spot (sürmanşet)</label>
                                                                </div>
                                                            </fieldset>
                                                            <fieldset style="padding-top: 7px">
                                                                <div class="custom-control custom-checkbox">
                                                                    <input type="checkbox" class="custom-control-input" name="yataymanset" id="yataymanset"
                                                                    <?php if(1 == $haber->yataymanset): ?> <?php echo e('checked'); ?> <?php endif; ?>>
                                                                    <label class="custom-control-label" for="yataymanset">Büyük Manşet</label>
                                                                </div>
                                                            </fieldset>
                                                            <fieldset style="padding-top: 7px">
                                                                <div class="custom-control custom-checkbox">
                                                                    <input type="checkbox" class="custom-control-input" name="sondakika" id="sondakika"
                                                                    <?php if(1 == $haber->sondakika): ?> <?php echo e('checked'); ?> <?php endif; ?>>
                                                                    <label class="custom-control-label" for="sondakika">Son Dakika</label>
                                                                </div>
                                                            </fieldset>
                                                            <fieldset style="padding-top: 7px">
                                                                <div class="custom-control custom-checkbox">
                                                                    <input type="checkbox" class="custom-control-input" name="flashaber" id="flashaber"
                                                                    <?php if(1 == $haber->flashaber): ?> <?php echo e('checked'); ?> <?php endif; ?>>
                                                                    <label class="custom-control-label" for="flashaber">Editörün Seçimi</label>
                                                                </div>
                                                            </fieldset>
                                                        </div>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>

                                        <div class="form-group row">
                                            <label class="sr-only" for="detay">Detay</label>
                                            <div class="col-md-12 pl-0">
                                                <textarea id="detay" rows="5" class="form-control" name="detay"><?php echo e($haber->detay); ?></textarea>
                                            </div>
                                        </div>
                                        <div class="form-group row">
                                            <div class="col-md-8 pl-0">
                                                <div class="d-block">
                                                    <div class="form-group row skin skin-flat border-0">
                                                        <label class="col-md-3 label-control text-left pl-0 pt-1 font-weight-bold">Haber Fotosu:</label>
                                                        <div class="col-md-9">
                                                            <div class="d-inline-block custom-control custom-radio mr-1">
                                                                <input type="radio" class="custom-control-input" name="normal_boyutlandirma" id="otomatik_boyut_manset" onclick="changeFunc(1)" value="1"
                                                                <?php if(1 == $haber->normal_boyutlandirma): ?> <?php echo e('checked'); ?> <?php endif; ?>>
                                                                <label class="custom-control-label" for="otomatik_boyut_manset">Otomatik Boyut (640-<?php echo e($ayarlar->mansety); ?>px)</label>
                                                            </div>
                                                            <div class="d-inline-block custom-control custom-radio mr-1">
                                                                <input type="radio" class="custom-control-input" name="normal_boyutlandirma" id="manuel_boyut_manset" onclick="changeFunc(2)" value="2"
                                                                <?php if(2 == $haber->normal_boyutlandirma): ?> <?php echo e('checked'); ?> <?php endif; ?>>
                                                                <label class="custom-control-label" for="manuel_boyut_manset">Manuel Boyut (Kırpma)</label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-md-12 pl-0" id="resim_boyutlandirma_manset_oto" style="<?php if(1 == $haber->normal_boyutlandirma): ?> <?php echo e('display:block'); ?> <?php else: ?> <?php echo e('display:none'); ?> <?php endif; ?>">
                                                    <label for="input-file-normal" class="sr-only">Otomatik</label>
                                                    <input type="file" name="resim" class="dropify" data-height="<?php echo e($ayarlar->mansety); ?>" data-width="640"
                                                           <?php if(1 == $haber->normal_boyutlandirma): ?> data-default-file="<?php echo e(url('images/haberler/'.$haber->resim)); ?>" <?php endif; ?>/>
                                                </div>
                                                <div class="col-md-12 pl-0 pt-1" id="resim_boyutlandirma_manset_manuel" style="<?php if(2 == $haber->normal_boyutlandirma): ?> <?php echo e('display:block'); ?> <?php else: ?> <?php echo e('display:none'); ?> <?php endif; ?>">
                                                    <button data-toggle="tooltip" title="Haber fotusu yükle" type="button" class="btn btn-icon btn-sm btn-primary select-image-btn">
                                                        <i class="la la-upload"></i> Foto Yükle</button>
                                                    <span style="display: none" class="btn btn-icon btn-sm btn-success ml-1 export1"><i class="la la-save"></i> Kaydet</span>
                                                    <div id="image-cropper" class="mt-1">
                                                        <div class="cropit-preview"></div>
                                                        <div class="mt-1 text-center">
                                                            <span class="la la-search-minus"></span>
                                                            <input type="range" class="cropit-image-zoom-input custom" />
                                                            <span class="la la-search-plus"></span>
                                                        </div>
                                                        <input type="file" class="cropit-image-input hidden" />
                                                    </div>
                                                </div>
                                                <div class="form-group row">
                                                    <label class="sr-only" for="embed">Haber Video</label>
                                                    <div class="col-md-12 pl-0">
                                                        <textarea id="embed" rows="3" class="form-control" name="embed" placeholder="Haber video kodu"><?php echo e($haber->embed); ?></textarea>
                                                        <small class="form-text text-muted">Video'nun embed veya iframe kodunu yazın.</small>
                                                    </div>
                                                </div>
                                                <div class="form-group row">
                                                    <label class="sr-only" for="iliskilihaber">İlişkili Haber</label>
                                                    <div class="col-md-12 pl-0">
                                                        <select id="iliskilihaber" class="select-remote-data form-control" multiple="multiple" name="iliskilihaber[]">
                                                            <?php if($iliskiliHaberler): ?>
                                                                <?php $__currentLoopData = $iliskiliHaberler; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $iliskiliHaber): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                                    <option value="<?php echo e($key); ?>" selected><?php echo e($iliskiliHaber); ?></option>
                                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                            <?php endif; ?>
                                                        </select>
                                                        <small class="form-text text-danger">Eğer ilişkili haber varsa bu bölüme girebilirsiniz. Sadece başlık ile aratabilirsiniz.</small>
                                                    </div>
                                                </div>

                                            </div>

                                            <div class="col-md-4">
                                                <div class="card mt-1" style="background-color: #f7f7f7">
                                                    <div class="card-content">
                                                        <div class="card-body">
                                                            <h4 class="card-title danger mb-1">Haber Seçenekleri</h4>
                                                            <fieldset>
                                                                <div class="custom-control custom-checkbox">
                                                                    <input type="checkbox" class="custom-control-input" name="yorum" id="yorum"
                                                                    <?php if(1 == $haber->yorum): ?> <?php echo e('checked'); ?> <?php endif; ?>>
                                                                    <label class="custom-control-label" for="yorum">Yorumlara Açık</label>
                                                                </div>
                                                            </fieldset>
                                                            <fieldset style="padding-top: 7px">
                                                                <div class="custom-control custom-checkbox">
                                                                    <input type="checkbox" class="custom-control-input" name="durum" id="durum"
                                                                    <?php if(1 == $haber->durum): ?> <?php echo e('checked'); ?> <?php endif; ?>>
                                                                    <label class="custom-control-label" for="durum">Aktif</label>
                                                                </div>
                                                            </fieldset>
                                                            <fieldset style="padding-top: 7px">
                                                                <div class="custom-control custom-checkbox">
                                                                    <input type="checkbox" class="custom-control-input" name="mansetbaslik" id="mansetbaslik"
                                                                    <?php if(1 == $haber->mansetbaslik): ?> <?php echo e('checked'); ?> <?php endif; ?>>
                                                                    <label class="custom-control-label" for="mansetbaslik">Manşet Başlığı</label>
                                                                </div>
                                                            </fieldset>
                                                            <fieldset style="padding-top: 7px">
                                                                <div class="custom-control custom-checkbox">
                                                                    <input type="checkbox" class="custom-control-input" name="sitemap" id="sitemap"
                                                                    <?php if(1 == $haber->sitemap): ?> <?php echo e('checked'); ?> <?php endif; ?>>
                                                                    <label class="custom-control-label" for="sitemap">Sadece Sitemap</label>
                                                                </div>
                                                            </fieldset>
                                                            <fieldset style="padding-top: 7px">
                                                                <div class="custom-control custom-checkbox">
                                                                    <input type="checkbox" class="custom-control-input" name="ozellink" id="ozellink"
                                                                    <?php if(1 == $haber->ozellink): ?> <?php echo e('checked'); ?> <?php endif; ?>>
                                                                    <label class="custom-control-label" for="ozellink">Özel Link</label>
                                                                </div>
                                                            </fieldset>
                                                        </div>
                                                    </div>
                                                </div>
                                                <input type="text" name="ozelurl" class="form-control" placeholder="Özel linki giriniz." value="<?php echo e($haber->ozelurl); ?>">
                                                <small class="form-text text-muted">Detaya girince nereye yönlenmesini istiyorsanız http://www.site.com formatında link girin.</small>

                                                <label class="sr-only" for="hit">Okunma Sayısı</label>
                                                <input type="number" name="hit" id="hit" class="form-control mt-1" placeholder="Okunma sayısı (hit)" value="<?php echo e($haber->hit); ?>">
                                                <small class="form-text text-muted">Haber okunma (hit) sayısı.</small>
                                                <select title="İsterseniz haberi makale ile ilişkilendirebilirsiniz." data-toggle="tooltip" data-trigger="hover" data-placement="top" id="makale" name="makale" class="form-control mt-1">
                                                    <option value="">İlişkili Makale Seçiniz</option>
                                                    <?php if($makaleler): ?>
                                                        <?php $__currentLoopData = $makaleler; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $makale): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                            <option value="<?php echo e($makale->id); ?>" <?php if($makale->id == $haber->makale): ?> <?php echo e('selected'); ?> <?php endif; ?>><?php echo e($makale->baslik); ?></option>
                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                    <?php endif; ?>
                                                </select>
                                                <select title="İsterseniz haberi foto galeri ile ilişkilendirebilirsiniz." data-toggle="tooltip" data-trigger="hover" data-placement="top" id="galeri" name="galeri" class="form-control mt-1">
                                                    <option value="">İlişkili Foto Galeri Seçiniz</option>
                                                    <?php if($galeriler): ?>
                                                        <?php $__currentLoopData = $galeriler; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $galeri): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                            <option value="<?php echo e($galeri->id); ?>" <?php if($galeri->id == $haber->galeri): ?> <?php echo e('selected'); ?> <?php endif; ?>><?php echo e($galeri->baslik); ?></option>
                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                    <?php endif; ?>
                                                </select>
                                                <select title="İsterseniz haberi video galeri ile ilişkilendirebilirsiniz." data-toggle="tooltip" data-trigger="hover" data-placement="top" id="video" name="video" class="form-control mt-1">
                                                    <option value="">İlişkili Video Galeri Seçiniz</option>
                                                    <?php if($videolar): ?>
                                                        <?php $__currentLoopData = $videolar; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $video): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                            <option value="<?php echo e($video->id); ?>" <?php if($video->id == $haber->video): ?> <?php echo e('selected'); ?> <?php endif; ?>><?php echo e($video->baslik); ?></option>
                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                    <?php endif; ?>
                                                </select>
                                                <select title="İsterseniz haberi anket ile ilişkilendirebilirsiniz." data-toggle="tooltip" data-trigger="hover" data-placement="top" id="anket" name="anket" class="form-control mt-1">
                                                    <option value="">İlişkili Anket Seçiniz</option>
                                                    <?php if($anketler): ?>
                                                        <?php $__currentLoopData = $anketler; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $anket): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                            <option value="<?php echo e($anket->id); ?>" <?php if($anket->id == $haber->anket): ?> <?php echo e('selected'); ?> <?php endif; ?>><?php echo e($anket->question); ?></option>
                                                        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                                    <?php endif; ?>
                                                </select>
                                            </div>
                                        </div>
                                        <h4 class="form-section mb-0"><i class="la la-photo"></i> Diğer Manşet Resimleri</h4>

                                        <div class="form-group row">
                                            <div class="col-md-12 pl-0 pt-0">
                                                <div class="d-block">
                                                    <div class="form-group row skin skin-flat border-0">
                                                        <label class="col-md-3 label-control text-left pl-0 pt-1 font-weight-bold">Büyük Manşet Fotosu:</label>
                                                        <div class="col-md-9">
                                                            <div class="d-inline-block custom-control custom-radio mr-1">
                                                                <input type="radio" class="custom-control-input" name="yataymanset_boyutlandirma" id="otomatik_boyut_yatay" onclick="changeFunc(5)" value="1"
                                                                <?php if(1 == $haber->yataymanset_boyutlandirma): ?> <?php echo e('checked'); ?> <?php endif; ?>>
                                                                <label class="custom-control-label" for="otomatik_boyut_yatay">Otomatik Boyut (970-<?php echo e($ayarlar->yataymansety); ?>px)</label>
                                                            </div>
                                                            <div class="d-inline-block custom-control custom-radio mr-1">
                                                                <input type="radio" class="custom-control-input" name="yataymanset_boyutlandirma" id="manuel_boyut_yatay" onclick="changeFunc(6)" value="2"
                                                                <?php if(2 == $haber->yataymanset_boyutlandirma): ?> <?php echo e('checked'); ?> <?php endif; ?>>
                                                                <label class="custom-control-label" for="manuel_boyut_yatay">Manuel Boyut (Kırpma)</label>
                                                            </div>
                                                        </div>
                                                    </div>
                                                </div>

                                                <div class="col-md-12 pl-0" id="resim_boyutlandirma_yataymanset_oto" style="<?php if(1 == $haber->yataymanset_boyutlandirma): ?> <?php echo e('display:block'); ?> <?php else: ?> <?php echo e('display:none'); ?> <?php endif; ?>">
                                                    <label for="input-file-normal" class="sr-only">Otomatik</label>
                                                    <input type="file" name="yatayresim" class="dropify" data-height="<?php echo e($ayarlar->yataymansety); ?>" data-width="970"
                                                           <?php if(1 == $haber->yataymanset_boyutlandirma): ?> data-default-file="<?php echo e(url('images/haberler/'.$haber->yatayresim)); ?>" <?php endif; ?>/>
                                                </div>
                                                <div class="col-md-12 pl-0" id="resim_boyutlandirma_yataymanset_manuel" style="<?php if(2 == $haber->yataymanset_boyutlandirma): ?> <?php echo e('display:block'); ?> <?php else: ?> <?php echo e('display:none'); ?> <?php endif; ?>">
                                                    <button data-toggle="tooltip" title="Haber fotusu yükle" type="button" class="btn btn-icon btn-sm btn-primary select-image-btn3"><i class="la la-upload"></i> Büyük Manşet Fotosu Yükle</button>
                                                    <span style="display: none" class="btn btn-icon btn-sm btn-success ml-1 export3"><i class="la la-save"></i> Kaydet</span>
                                                    <div id="image-cropper3" class="mt-1">
                                                        <div class="cropit-preview"></div>
                                                        <div class="mt-1 text-center">
                                                            <span class="la la-search-minus"></span>
                                                            <input type="range" class="cropit-image-zoom-input custom" />
                                                            <span class="la la-search-plus"></span>
                                                        </div>
                                                        <input type="file" class="cropit-image-input hidden" />
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <input type="hidden" name="resim1" id="resim1" value="">
                                    <input type="hidden" name="resim2" id="resim2" value="">
                                    <input type="hidden" name="resim3" id="resim3" value="">

                                    <div class="form-actions right">
                                        <button type="submit" class="btn btn-success">
                                            <i class="la la-check"></i> Kaydet
                                        </button>
                                    </div>
                                </form>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </section>
        <!-- // Row separator layout section end -->
    </div>
    <?php if(1 == $haber->yataymanset_boyutlandirma): ?>
        <input type="hidden" id="yatay" value="">
    <?php elseif(2 == $haber->yataymanset_boyutlandirma): ?>
        <input type="hidden" id="yatay" value="<?php echo e(str_replace('&amp;', '&',htmlspecialchars_decode(url('images/haberler/'.$haber->yatayresim)))); ?>">
    <?php endif; ?>

    <?php if(1 == $haber->normal_boyutlandirma): ?>
        <input type="hidden" id="normal" value="">
    <?php elseif(2 == $haber->normal_boyutlandirma): ?>
        <input type="hidden" id="normal" value="<?php echo e(str_replace('&amp;', '&',htmlspecialchars_decode(url('images/haberler/'.$haber->resim)))); ?>">
    <?php endif; ?>
<?php $__env->stopSection(); ?>
<?php $__env->startPush("customJs"); ?>
    <script src="<?php echo e(asset('assets/backend/app-assets/vendors/js/pickers/dateTime/moment-with-locales.min.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/backend/app-assets/vendors/js/pickers/daterange/daterangepicker.js')); ?>" type="text/javascript"></script>
    <script src="<?php echo e(asset('assets/backend/app-assets/vendors/js/extensions/jquery.cropit.js')); ?>" type="text/javascript"></script>
    <script src="<?php echo e(asset('assets/backend/app-assets/vendors/js/dropify/js/dropify.min.js')); ?>" type="text/javascript"></script>
    <script src="<?php echo e(asset('assets/backend/app-assets/vendors/js/forms/select/select2.full.min.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/backend/app-assets/vendors/js/forms/select/tr.js')); ?>"></script>
    <script src="<?php echo e(asset('assets/backend/app-assets/vendors/js/editors/ckeditor/ckeditor.js')); ?>" type="text/javascript"></script>
    <script>
        $(document).ready(function () {
            CKEDITOR.replace('detay', {
                //allowedContent: true,
                height: '325px',
                extraPlugins: 'forms',
                customConfig: '<?php echo e(asset('/js/custom.js?v=1.7')); ?>'
            });
        })
        $('.singledate').daterangepicker({
            singleDatePicker: true,
            showDropdowns: true,
            timePicker: true,
            autoApply : true,
            locale: {
                format: 'DD-MM-YYYY HH:mm',
                firstDay:1,
                separator: " - ",
                applyLabel: "Onayla",
                cancelLabel: "İptal",
                daysOfWeek: ["Paz", "Pzt", "Sal", "Çar", "Per", "Cum", "Cmt"],
                monthNames: ["Ocak", "Şubat", "Mart", "Nisan", "Mayıs", "Haziran", "Temmuz", "Ağustos","Eylül","Ekim","Kasım","Aralık"]
            },
            timePicker24Hour: true
        });
        $('#image-cropper').cropit({
            width: 640,
            height: '<?php echo e($ayarlar->mansety); ?>',
            smallImage: 'allow',
            maxZoom:2,
            minZoom:'fit',
            //freeMove:true,
            imageState:{
                src: $('#normal').val()
            }
        });
        $('.select-image-btn').click(function() {
            $('.export1').css('display','inline-block');
            $('#image-cropper .cropit-image-input').click();
        });

        $('.select-image-btn2').click(function() {
            $('.export2').css('display','inline-block');
            $('#image-cropper2 .cropit-image-input').click();
        });
        $('#image-cropper3').cropit({
            width: 970,
            height: '<?php echo e($ayarlar->yataymansety); ?>',
            smallImage: 'allow',
            maxZoom:2,
            minZoom:'fit',
            imageState:{
                src: $('#yatay').val()
            }
        });
        $('.select-image-btn3').click(function() {
            $('.export3').css('display','inline-block');
            $('#image-cropper3 .cropit-image-input').click();
        });
        $('.export1').click(function() {
            $('.export1').css('display','none');

            let imageData = $('#image-cropper').cropit('export', {
                type: 'image/jpeg',
                quality: 1
            });
            $("#resim1").val(imageData);

        });
        $('.export2').click(function() {
            $('.export2').css('display','none');
            let imageData = $('#image-cropper2').cropit('export', {
                type: 'image/jpeg',
                quality: 1
            });
            $("#resim2").val(imageData);
        });
        $('.export3').click(function() {
            $('.export3').css('display','none');
            let imageData = $('#image-cropper3').cropit('export', {
                type: 'image/jpeg',
                quality: 1
            });
            $("#resim3").val(imageData);
        });
        function changeFunc(val) {
            if(val == 1){
                $('#resim_boyutlandirma_manset_oto').css('display','inherit');
                $('#resim_boyutlandirma_manset_manuel').css('display','none');
            }else if(val == 2){
                $('#resim_boyutlandirma_manset_manuel').css('display','inherit');
                $('#resim_boyutlandirma_manset_oto').css('display','none');
            }else if(val == 5){
                $('#resim_boyutlandirma_yataymanset_oto').css('display','inherit');
                $('#resim_boyutlandirma_yataymanset_manuel').css('display','none');
            } else if(val == 6){
                $('#resim_boyutlandirma_yataymanset_manuel').css('display','inherit');
                $('#resim_boyutlandirma_yataymanset_oto').css('display','none');
            }
        }
        $('.dropify').dropify({
            messages: {
                'default': 'Haber fotosunu buraya sürükleyin veya tıklayıp yükleyin.',
                'replace': 'Haber fotosunu değiştirmek için buraya sürükleyin veya tıklayıp yükleyin.',
                'remove':  'Sil',
                'error':   'Hata, lütfen tekrar deneyin!'
            }
        });


        var $tagsControl = $(".select-remote-data").select2({
            ajax: {
                url: "/panel/haberler/iliskili-haber-getir",
                headers: {
                    'X-CSRF-TOKEN': '<?php echo e(csrf_token()); ?>'
                },
                type: "POST",
                dataType: 'json',
                delay: 250,
                data: function (params) {
                    return {
                        q: params.term,
                        page: params.page
                    };
                },
                processResults: function (data, params) {
                    params.page = params.page || 1;
                    return {
                        results: $.map(data.data, function (item) {
                            return {
                                text: item.baslik,
                                id: item.id
                            }
                        }),
                        pagination: {
                            more: (params.page * 30) < data.total_count
                        }
                    };
                },
                cache: true
            },
            language: "tr",
            placeholder: "İlişkili haber ekleyin..",
            escapeMarkup: function (markup) { return markup; }, // let our custom formatter work
            minimumInputLength: 3,
            // templateResult: formatRepo,
            // templateSelection: formatRepoSelection,

        });
        function formatRepo (repo) {
            if (repo.loading) {
                return repo.text;
            }

            var markup = "<div class='select2-result-repository clearfix'>" +
                "<div class='select2-result-repository__avatar'><img src='/images/haberler/" + repo.resim + "' /></div>" +
                "<div class='select2-result-repository__meta'>" +
                "<div class='select2-result-repository__title'>" + repo.baslik + "</div>";

            if (repo.metadesc) {
                markup += "<div class='select2-result-repository__description'>" + repo.metadesc + "</div>";
            }

            return markup;
        }
        function formatRepoSelection (repo) {
            return repo.baslik;
        }
    </script>
<?php $__env->stopPush(); ?>
<?php $__env->startPush("customCss"); ?>
    <link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/backend/app-assets/vendors/css/pickers/daterange/daterangepicker.css')); ?>">
    <link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/backend/app-assets/vendors/js/dropify/css/dropify.min.css')); ?>">
    <link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/backend/app-assets/vendors/css/forms/icheck/custom.css')); ?>">
    <link rel="stylesheet" type="text/css" href="<?php echo e(asset('assets/backend/app-assets/vendors/css/forms/selects/select2.min.css')); ?>">
    <style>
        .cropit-preview.cropit-image-loaded .cropit-preview-image-container {
            cursor: move;
        }
        #image-cropper .cropit-preview {
            width: 640px;
            height: <?php echo e($ayarlar->mansety); ?>px;
        }
        #image-cropper3 .cropit-preview {
            width: 970px;
            height: <?php echo e($ayarlar->yataymansety); ?>px;
        }
    </style>
<?php $__env->stopPush(); ?>

<?php echo $__env->make('backend.app', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/yeniistik/public_html/resources/views/backend/haberler/duzenle.blade.php ENDPATH**/ ?>