<?php $__env->startSection("content"); ?>
        <!-- Content Header (Page header) -->
<section class="content-header">
    <h1>
        <?php echo e(trans('admin.Widgets')); ?>

    </h1>
    <ol class="breadcrumb">
        <li><a href="#"><i class="fa fa-dashboard"></i> <?php echo e(trans('admin.dashboard')); ?></a></li>
        <li class="active"><?php echo e(trans('admin.Widgets')); ?></li>
    </ol>
</section>

<section class="content">
    <div class="row">
        <div class="col-md-7">
            <?php if(count($PostPageSidebar) != 0): ?>
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title"><?php echo e(trans('admin.PostPageSidebar')); ?></h3>
                    </div><!-- /.box-header -->
                    <?php $i=0; ?>
                    <div class="box-body" style="padding:20px">
                        <?php foreach($PostPageSidebar as $i => $widget): ?>
                            <?php echo $__env->make('_admin._particles.widget_list', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <?php endforeach; ?>
                    </div><!-- /.box-header -->
                </div>
            <?php endif; ?>
            <?php if(count($CategoriesPageSidebar) != 0): ?>
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title"><?php echo e(trans('admin.CategoriesPageSidebar')); ?></h3>
                    </div><!-- /.box-header -->
                    <?php $i=0; ?>
                    <div class="box-body" style="padding:20px">
                        <?php foreach($CategoriesPageSidebar as $i => $widget): ?>
                            <?php echo $__env->make('_admin._particles.widget_list', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <?php endforeach; ?>
                    </div><!-- /.box-header -->
                </div>
            <?php endif; ?>

            <?php if(count($HeaderBelow) != 0): ?>
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title"><?php echo e(trans('admin.HeaderBelow')); ?></h3>
                    </div><!-- /.box-header -->
                    <?php $i=0; ?>
                    <div class="box-body" style="padding:20px">
                        <?php foreach($HeaderBelow as $i => $widget): ?>
                            <?php echo $__env->make('_admin._particles.widget_list', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <?php endforeach; ?>
                    </div><!-- /.box-header -->
                </div>
            <?php endif; ?>
            <?php if(count($PostBelow) != 0): ?>
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title"><?php echo e(trans('admin.PostBelow')); ?></h3>
                    </div><!-- /.box-header -->
                    <?php $i=0; ?>
                    <div class="box-body" style="padding:20px">
                        <?php foreach($PostBelow as $i => $widget): ?>
                            <?php echo $__env->make('_admin._particles.widget_list', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <?php endforeach; ?>
                    </div><!-- /.box-header -->
                </div>
            <?php endif; ?>
            <?php if(count($PostBetween2nd3rdentry) != 0): ?>
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title"><?php echo e(trans('admin.PostPageBetween2nd3rdentry')); ?></h3>
                    </div><!-- /.box-header -->
                    <?php $i=0; ?>
                    <div class="box-body" style="padding:20px">
                        <?php foreach($PostBetween2nd3rdentry as $i => $widget): ?>
                            <?php echo $__env->make('_admin._particles.widget_list', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <?php endforeach; ?>
                    </div><!-- /.box-header -->
                </div>
            <?php endif; ?>

                <?php if(count($Homencolfirst) != 0): ?>
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title"><?php echo e(trans('admin.HomePageFirst(List)Column')); ?></h3>
                    </div><!-- /.box-header -->
                    <?php $i=0; ?>
                    <div class="box-body" style="padding:20px">
                        <?php foreach($Homencolfirst as $i => $widget): ?>
                            <?php echo $__env->make('_admin._particles.widget_list', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <?php endforeach; ?>
                    </div><!-- /.box-header -->
                </div>
            <?php endif; ?>
                <?php if(count($Homencolsec) != 0): ?>
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title"><?php echo e(trans('admin.HomePageSecond(News)Column')); ?></h3>
                        </div><!-- /.box-header -->
                        <?php $i=0; ?>
                        <div class="box-body" style="padding:20px">
                            <?php foreach($Homencolsec as $i => $widget): ?>
                                <?php echo $__env->make('_admin._particles.widget_list', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                            <?php endforeach; ?>
                        </div><!-- /.box-header -->
                    </div>
                <?php endif; ?>
                <?php if(count($PostShareBw) != 0): ?>
                    <div class="box box-primary">
                        <div class="box-header with-border">
                            <h3 class="box-title"><?php echo e(trans('admin.PostPagesShareBelow')); ?></h3>
                        </div><!-- /.box-header -->
                        <?php $i=0; ?>
                        <div class="box-body" style="padding:20px">
                            <?php foreach($PostShareBw as $i => $widget): ?>
                                <?php echo $__env->make('_admin._particles.widget_list', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                            <?php endforeach; ?>
                        </div><!-- /.box-header -->
                    </div>
                <?php endif; ?>

            <?php if(count($Footer) !== 0): ?>
                <div class="box box-primary">
                    <div class="box-header with-border">
                        <h3 class="box-title"><?php echo e(trans('admin.Footer')); ?></h3>
                    </div><!-- /.box-header -->
                    <?php $i=0; ?>
                    <div class="box-body" style="padding:20px">
                        <?php foreach($Footer as $i => $widget): ?>
                            <?php echo $__env->make('_admin._particles.widget_list', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
                        <?php endforeach; ?>
                    </div><!-- /.box-header -->
                </div>
            <?php endif; ?>


        </div><!-- /.col -->
        <div class="col-md-5">
            <div class="box box-primary">
                <div class="box-header with-border">
                    <h3 class="box-title"><?php echo e(isset($widgeta->key) ? trans('admin.Edit').': '.$widgeta->key : trans('admin.AddWidget')); ?></h3>
                </div><!-- /.box-header -->
                <!-- form start -->
                <?php echo Form::open(array('action' => array('Admin\WidgetsController@addnew'), 'method' => 'POST')); ?>

                <div class="box-body" style="padding:20px">
                    <input type="hidden" name="id" value="<?php echo e(isset($widgeta->id) ? $widgeta->id : null); ?>">
                    <div class="form-group">
                        <?php echo Form::label('key',trans('admin.WidgetName')); ?>

                        <?php echo Form::text('key',  isset($widgeta->key) ? $widgeta->key : null, ['id' => 'name', 'class' => 'form-control input-lg', 'placeholder' => trans('admin.WidgetName')]); ?>

                    </div>

                    <div class="form-group">
                        <?php echo Form::label('text',trans('admin.PasteHtml')); ?>

                        <?php echo Form::textarea('text', isset($widgeta->text) ? $widgeta->text : null, [ 'class' => 'form-control']); ?>

                    </div>
                    <div class="form-group">
                        <?php echo Form::label('type',trans('admin.Location')); ?>

                        <?php echo Form::select('type', [
                        'PostPageSidebar' => trans('admin.PostPageSidebar'),
                        'CatSide' => trans('admin.CategoriesPageSidebar'),
                        'HeaderBelow' =>  trans('admin.HeaderBelow'),
                        'PostBelow' => trans('admin.PostBelow'),
                         'PostShareBw' => trans('admin.PostPagesShareBelow'),
                        'Post2nd3rdentry' => trans('admin.PostPageBetween2nd3rdentry'),
                        'Homencolfirst' => trans('admin.HomePageFirst(List)Column'),
                        'Homencolsec' => trans('admin.HomePageSecond(News)Column'),
                        'Footer' => trans('admin.Footer'),
                        ], isset($widgeta->type) ? $widgeta->type : null , ['class' => 'form-control']); ?>

                    </div>
                    <div class="form-group">
                        <?php echo Form::label('showweb',trans('admin.showonweb')); ?>

                        <?php echo Form::select('showweb', ['on' => trans('admin.yes'),'off' => trans('admin.no')], isset($widgeta->showweb) ? $widgeta->showweb : null , ['class' => 'form-control']); ?>

                    </div>
                    <div class="form-group">
                        <?php echo Form::label('showmobile',trans('admin.showonmobile')); ?>

                        <?php echo Form::select('showmobile', ['on' => trans('admin.yes'),'off' => trans('admin.no')], isset($widgeta->showmobile) ? $widgeta->showmobile : null , ['class' => 'form-control']); ?>

                    </div>
                    <div class="form-group">
                        <?php echo Form::label('display',trans('admin.Display')); ?>

                        <?php echo Form::select('display', ['on' => trans('admin.on'),'off' => trans('admin.off')], isset($widgeta->display) ? $widgeta->display : null , ['class' => 'form-control']); ?>

                    </div>
                </div><!-- /.box-body -->

                <div class="box-footer">
                    <button type="submit" class="btn btn-primary"><?php echo e(trans('admin.Submit')); ?></button>
                    <a href="/admin/widgets" class="btn btn-default pull-right"><?php echo e(trans('admin.Cancel')); ?></a>
                </div>
                <?php echo Form::close(); ?>


            </div>

        </div><!-- /.col -->

    </div><!-- /.row -->

</section>
<?php $__env->stopSection(); ?>
<?php $__env->startSection("footer"); ?>
        <!-- CK Editor -->
<script src="https://cdn.ckeditor.com/4.4.3/standard/ckeditor.js"></script>
<script>
    $(function () {
        // Replace the <textarea id="editor1"> with a CKEditor
        // instance, using default configuration.
      // CKEDITOR.replace( 'text', {
      //      fullPage: true,
      //     allowedContent: true
      //  });
    });
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make("_admin.adminapp", array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>