@extends('yonetim.yonetim_master')

@section('main')
    <section class="section">
        <div class="section-body">
            <div class="row">
                <div class="col-12 col-md-12 col-lg-12">
                    <div class="card">


                        <div class="padding-20">
                            <div style="float: right">
                                <a href="{{route('paket.all')}}" class="btn btn-success float-right"><i class="fa fa-backward"></i> Paketlere Dön</a>
                                <br>
                            </div>
                            <ul class="nav nav-tabs" id="myTab2" role="tablist">

                                <li class="nav-item">
                                    <a class="nav-link active" id="genelayar-tab1" data-toggle="tab" href="#genelayar" role="tab"
                                       aria-selected="true">{{$paketveri->baslik}} Genel Ayarı </a>
                                </li>



                                <li class="nav-item">
                                    <a class="nav-link" id="home-tab2" data-toggle="tab" href="#about" role="tab"
                                       aria-selected="false">{{$paketveri->baslik}} İçerik</a>
                                </li>
                                <li class="nav-item">
                                    <a class="nav-link" id="profile-tab2" data-toggle="tab" href="#settings" role="tab"
                                       aria-selected="false">{{$paketveri->baslik}}</a>
                                </li>

                                <li class="nav-item">
                                    <a class="nav-link" id="talepler-tab3" data-toggle="tab" href="#talepler" role="tab"
                                       aria-selected="false">Sıkça Sorulanlar </a>
                                </li>



                            </ul>


                            <div class="tab-content tab-bordered" id="myTab3Content">

                                <div class="tab-pane fade show active" id="genelayar" role="tabpanel" aria-labelledby="genelayar-tab1">

                                    <div class="row">
                                        <div class="col-12 col-md-9 col-lg-9">


                                            <form action="{{route('paket.veriupdateson',$paketveri->id)}}" method="post" enctype="multipart/form-data">
                                                @csrf

                                                <div class="card-body">


                                                    <div class="col-lg-12 mx-auto">



                                                        <div class="form-group">
                                                            <label>Başlık</label>
                                                            <input name="baslik" type="text" class="form-control" value="{{$paketveri->baslik}}" maxlength="255" required>
                                                        </div>

                                                        <div class="form-group">
                                                            <label>Slug(Benzersiz Olmalı)</label>
                                                            <input name="slug" type="text" class="form-control" value="{{$paketveri->slug}}" required>
                                                        </div>


                                                        <div class="form-group">
                                                            <label>Title</label>
                                                            <textarea style="min-height: 70px" name="title" type="text" class="form-control" maxlength="255">{{$paketveri->title}}</textarea>
                                                        </div>


                                                        <div class="form-group">
                                                            <label>Description</label>
                                                            <textarea style="min-height: 70px" name="description" type="text" class="form-control" maxlength="255">{{$paketveri->description}}</textarea>
                                                        </div>


                                                        <div class="form-group">
                                                            <label>Keywords</label>
                                                            <textarea style="min-height: 70px" name="keywords" type="text" class="form-control" maxlength="255">{{$paketveri->keywords}}</textarea>
                                                        </div>



                                                        <div class="form-group">
                                                            <label>Paket Durum</label>
                                                            <select name="durum" class="form-control">
                                                                @if($paketveri->durum==1)
                                                                    <option value="1">Aktif</option>
                                                                    <option value="0">Pasif</option>
                                                                @else
                                                                    <option value="0">Pasif</option>
                                                                    <option value="1">Aktif</option>
                                                                @endif
                                                            </select>
                                                        </div>


                                                        <div class="form-group">
                                                            <label>Sepet Sayfasında Göster</label>
                                                            <select name="sepettegoster" class="form-control">
                                                                @if($paketveri->sepettegoster==1)
                                                                    <option value="1">Aktif</option>
                                                                    <option value="0">Pasif</option>
                                                                @else
                                                                    <option value="0">Pasif</option>
                                                                    <option value="1">Aktif</option>
                                                                @endif
                                                            </select>
                                                        </div>





                                                        <div class="card-footer text-right">
                                                            <button type="submit" name="genelayarkaydet" class="btn btn-primary">Güncelle</button>
                                                        </div>


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






                                        </div>

                                    </div>
                                </div>


                                <div class="tab-pane fade" id="about" role="tabpanel" aria-labelledby="home-tab2">

                                    <div class="row">
                                        <div class="col-12 col-md-9 col-lg-9">


                                            <form action="{{route('seopicerik.veriupdateson',$veriler->paket_id)}}" method="post" enctype="multipart/form-data">
                                                @csrf

                                                <div class="card-body">


                                                    <div class="col-lg-12 mx-auto">


                                                        <div class="row">
                                                            <div class="col-md-6">
                                                                <div style="margin-bottom: 10px" class="form-group">

                                                                    <img style="height: 150px" src="{{asset($veriler->resimyol)}}">
                                                                    <p style="padding: 0;margin: 0">Güncel Resim</p>
                                                                    <input type="hidden" name="eskiresimyol" value="{{$veriler->resimyol}}">
                                                                </div>

                                                                <div class="form-group">
                                                                    <label>Resim Yükle(Açıklama Resimi)</label>
                                                                    <input name="resimyol" class="form-control" type="file">
                                                                </div>


                                                                <div class="form-group">
                                                                    <label>Açıklama Resimi Alt Tagı</label>
                                                                    <input name="resimyol_alt" type="text" class="form-control" value="{{$veriler->resimyol_alt}}" maxlength="255">
                                                                </div>

                                                            </div>

                                                            <div class="col-md-6">
                                                                <div style="margin-bottom: 10px" class="form-group">

                                                                    <img style="height: 150px" src="{{asset($veriler->resimyol2)}}">
                                                                    <p style="padding: 0;margin: 0">Güncel Resim</p>
                                                                    <input type="hidden" name="eskiresimyol2" value="{{$veriler->resimyol2}}">
                                                                </div>

                                                                <div class="form-group">
                                                                    <label>Resim Yükle(Ssl Sol resim)</label>
                                                                    <input name="resimyol2" class="form-control" type="file">
                                                                </div>

                                                                <div class="form-group">
                                                                    <label>Sıkça Sorulanlar Resimi Alt Tagı</label>
                                                                    <input name="resimyol2_alt" type="text" class="form-control" value="{{$veriler->resimyol2_alt}}" maxlength="255">
                                                                </div>

                                                            </div>
                                                        </div>








                                                        <div class="form-group">
                                                            <label>Üst Başlık</label>
                                                            <input name="baslik1" type="text" class="form-control" value="{{$veriler->baslik1}}" maxlength="255" required>
                                                        </div>

                                                        <div class="form-group">
                                                            <label>Başlık Alt İcerik</label>
                                                            <input name="alticerik" type="text" class="form-control" value="{{$veriler->alticerik}}" required>
                                                        </div>

                                                        <div class="form-group">
                                                            <label>Açıklama Başlık</label>
                                                            <input name="baslik2" type="text" class="form-control" value="{{$veriler->baslik2}}" maxlength="255" required>
                                                        </div>

                                                        <div class="form-group">
                                                            <label>Açıklama</label>
                                                            <textarea name="icerik" class="summernote">{{$veriler->icerik}}</textarea>
                                                        </div>



                                                        <div class="form-group">
                                                            <label>Sayaç Değer(1)</label>
                                                            <input name="sayac1" type="text" class="form-control" value="{{$veriler->sayac1}}" required>
                                                        </div>

                                                        <div class="form-group">
                                                            <label>Sayaç Açıklama(1)</label>
                                                            <input name="sayac1icerik" type="text" class="form-control" value="{{$veriler->sayac1icerik}}" maxlength="255">
                                                        </div>



                                                        <div class="form-group">
                                                            <label>Sayaç Değer(2)</label>
                                                            <input name="sayac2" type="number" class="form-control" value="{{$veriler->sayac2}}" required>
                                                        </div>



                                                        <div class="form-group">
                                                            <label>Sayaç Açıklama(2)</label>
                                                            <input name="sayac2icerik" type="text" class="form-control" value="{{$veriler->sayac2icerik}}" maxlength="255">
                                                        </div>



                                                        <div class="form-group">
                                                            <label>Sayaç Değer(3)</label>
                                                            <input name="sayac3" type="number" class="form-control" value="{{$veriler->sayac3}}" required>
                                                        </div>




                                                        <div class="form-group">
                                                            <label>Sayaç Açıklama(3)</label>
                                                            <input name="sayac3icerik" type="text" class="form-control" value="{{$veriler->sayac3icerik}}" maxlength="255">
                                                        </div>



                                                        <div class="form-group">
                                                            <label>Sıkça Sorulanlar Başlık</label>
                                                            <input name="baslik3" type="text" class="form-control" value="{{$veriler->baslik3}}" required maxlength="255">
                                                        </div>




                                                        <div class="card-footer text-right">
                                                            <button type="submit" name="genelayarkaydet" class="btn btn-primary">Güncelle</button>
                                                        </div>


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






                                        </div>

                                    </div>
                                </div>


                                <div class="tab-pane fade" id="settings" role="tabpanel" aria-labelledby="profile-tab2">
                                    <div class="card-header">
                                        <h4>Tüm Paketler</h4>
                                        <a href="{{route('paketler.paketveriekle',$paketveri->id)}}" class="btn btn-primary text-white">Paket Ekle</a>
                                        <br>
                                    </div>
                                    <div class="card-body">

                                        <div class="table-responsive">
                                            <table class="table table-striped" id="table-1">
                                                <thead>
                                                <tr>

                                                    <th>Başlık</th>


                                                    <th>İşlemler</th>
                                                </tr>
                                                </thead>
                                                <tbody>

                                                @foreach($paketurunler as $paket)
                                                    <tr>

                                                        <td>{{$paket->baslik}}</td>


                                                        <td>
                                                            <a href="{{ route('paketler.paketveriupdate',array($paket->id,$paketveri->id))}}" class="btn btn-warning"><i class="fa fa-edit"></i> Düzenle</a>
                                                            <a onclick="return confirm('Silmek istediğinizden emin misiniz?')" href="{{ route('paketler.paketverisil',$paket->id)}}" class="btn btn-danger"><i class="fa fa-trash"></i> Sil</a>
                                                        </td>
                                                    </tr>
                                                @endforeach





                                                </tbody>
                                            </table>
                                        </div>
                                    </div>






                                </div>



                                <div class="tab-pane fade" id="talepler" role="tabpanel" aria-labelledby="talepler-tab3">
                                    <div class="card-header">
                                        <h4>Paket Sıkça Sorulanlar Tümü</h4>
                                        <a href="{{route('sssler.veriekle',$paketveri->id)}}" class="btn btn-primary text-white">Sss Ekle</a>
                                        <br>
                                    </div>
                                    <div class="card-body">
                                        <div class="table-responsive">
                                            <table class="table table-striped" id="table-1">
                                                <thead>
                                                <tr>

                                                    <th>Başlık</th>


                                                    <th>İşlemler</th>
                                                </tr>
                                                </thead>
                                                <tbody>

                                                @foreach($paketsssler as $sssler)
                                                    <tr>

                                                        <td>{{$sssler->baslik}}</td>


                                                        <td>
                                                            <a href="{{ route('sssler.veriupdate',array($sssler->id,$paketveri->id) )}}" class="btn btn-warning"><i class="fa fa-edit"></i> Düzenle</a>
                                                            <a onclick="return confirm('Silmek istediğinizden emin misiniz?')" href="{{ route('sssler.verisil',$sssler->id)}}" class="btn btn-danger"><i class="fa fa-trash"></i> Sil</a>
                                                        </td>
                                                    </tr>
                                                @endforeach





                                                </tbody>
                                            </table>
                                        </div>

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

            </div>

        </div>
    </section>
@endsection
