
<?php $__env->startSection('content'); ?>
    <div class="col-md-12 text-left">
        <h1><?php if($mode == 'create'): ?> Create New <?php else: ?> Edit <?php endif; ?> Blog</h1>

        <div class="col-md-10 col-md-offset-2">
            <?php if($errors->any()): ?>
                <div class="row">
                    <div class="col-md-12">
                        <?php echo implode('', $errors->all('<div class="alert alert-danger">:message</div>')); ?>

                    </div>
                </div>
            <?php endif; ?>

        </div>
        <div class="box-body">
            <?php echo Form::model($blog,['class'=>'form-horizontal']); ?>

                <div class="form-group">
                    <label for="meta_tags" class="col-sm-2 control-label">Meta Tags</label>
                    <div class="col-sm-10">
                        <?php echo Form::text('meta_tags',null,["class"=>"form-control", "id"=>"meta_tags", "placeholder"=>"Meta Tags"]); ?>

                    </div>
                </div>
                <div class="form-group">
                    <label for="meta_description" class="col-sm-2 control-label">Meta Description</label>
                    <div class="col-sm-10">
                        <?php echo Form::textarea('meta_description',null, ["rows"=>3 ,"class"=>"form-control", "id"=>"meta_description", "placeholder"=>"Meta Description"]); ?>


                    </div>
                </div>
                <div class="form-group">
                    <label for="title" class="col-sm-2 control-label">Title</label>
                    <div class="col-sm-10">
                        <?php echo Form::text('title',null,["class"=>"form-control", "id"=>"title", "placeholder"=>"Title"]); ?>

                    </div>
                </div>
                <div class="form-group">
                    <label for="content" class="col-sm-2 control-label">Content</label>
                    <div class="col-sm-10">
                        <?php echo Form::textarea('content',null, ["rows"=>6 ,"class"=>"form-control", "id"=>"content", "placeholder"=>"Content"]); ?>

                    </div>
                </div>
                <div class="form-group">
                    <label for="status" class="col-sm-2 control-label">Status</label>
                    <div class="col-sm-10">
                        <?php echo Form::select('status', ['draft' => 'Draft', 'published' => 'Published'], null, ['class'=>'form-control','id'=>'status']); ?>

                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-success">Save</button>
                        <button type="button" class="btn btn-default" onclick="window.location ='<?php echo route("blog-page"); ?>'">Cancel</button>
                    </div>
                </div>
            <?php echo Form::close(); ?>

        </div>
    </div>

<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>
    <?php /*<script src="//cdn.ckeditor.com/4.5.11/full/ckeditor.js"></script>*/ ?>
    <?php echo Html::script('plugins/ckeditor/ckeditor.js'); ?>

    <script>
        $(document).ready(function () {

            var toolbar_Basic ={
                toolbar: [
                    {
                        name: 'document',
                        items: [ 'Source', '-'] },	// Defines toolbar group with name (used to create voice label) and items in 3 subgroups.
                    [ 'Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord', '-', 'Undo', 'Redo' ],			// Defines toolbar group without name.
                    '/',																					// Line break - next group will be placed in new line.
                    { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline' ] }
                ],
                height:150};

            var toolbar_full ={
                toolbar:[
                    { name: 'document',
                        items : [ 'Source','-',
                            //'Save',
                            //'NewPage',
                            //'DocProps',
                            'Preview',
                            //'Print','-',
                            'Templates' ] },
                    { name: 'clipboard', items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
                    { name: 'editing', items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
                    { name: 'forms', items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton',
                        'HiddenField' ] },
                    '/',
                    { name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
                    { name: 'paragraph', items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv',
                        '-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock','-','BidiLtr','BidiRtl' ] },
                    { name: 'links', items : [ 'Link','Unlink','Anchor' ] },
                    { name: 'insert', items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak','Iframe' ] },
                    '/',
                    { name: 'styles', items : [ 'Styles','Format','Font','FontSize' ] },
                    { name: 'colors', items : [ 'TextColor','BGColor' ] },
                    { name: 'tools', items : [ 'Maximize', 'ShowBlocks' ] }
                ],
                width:1086};






            CKEDITOR.replace( 'content',toolbar_full);
        })
    </script>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('admin.layout.default-admin', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>