<?php $__env->startSection('content'); ?> <div class="row"> <div class="col-xs-12"> <?php echo Breadcrumb::withLinks($breadcrumbs); ?> </div> </div> <div class="row"> <div class="col-xs-12"> <div role="tabpanel"> <?php echo Navigation::tabs($tabs)->withAttributes(['role' => 'tablist', 'class' => 'flags']); ?> <?php echo Form::open(['route' => 'admin.page.store', 'secure' => true]); ?> <div class="tab-content"> <?php echo ControlGroup::generate( Form::label('position', trans('admin.fields.position').":"), Form::select('position', $position_options, !is_null($parent) ? $parent->position : null, !is_null($parent) ? ['disabled' => true] : null) ); ?> <?php if(count($type_options)): ?> <?php echo ControlGroup::generate( Form::label('type', trans('admin.fields.type').":"), Form::select('type', [null => null] + $type_options) ); ?> <?php endif; ?> <?php foreach($tabs as $tab): ?> <div role="tabpanel" class="tab-pane <?php echo $tab['active'] ? 'active' : ''; ?>" id="<?php echo $tab['route']; ?>"> <?php echo ControlGroup::generate( Form::label('title['.$tab['route'].']', trans('admin.fields.title').":"), Form::text('title['.$tab['route'].']') ); ?> <?php echo ControlGroup::generate( Form::label('content['.$tab['route'].']', trans('admin.fields.content').":"), Form::textarea('content['.$tab['route'].']', null, ['rows' => 8, 'class' => 'redactor']) ); ?> <?php if(!is_null($parent)): ?> <?php echo Form::hidden('position', $parent->position); ?> <?php echo Form::hidden('parent', $parent->id); ?> <?php endif; ?> </div> <?php endforeach; ?> </div> <?php if(Sentry::getUser()->hasAccess('admin.page.store')): ?> <?php echo Button::success(trans('admin.buttons.store'))->prependIcon(Icon::ok())->submit(); ?> <?php echo Button::danger(trans('admin.buttons.cancel'))->prependIcon(Icon::remove())->asLinkTo(route('admin.page.index')); ?> <?php else: ?> <?php echo Button::primary(trans('admin.buttons.back'))->prependIcon(Icon::arrow_left())->asLinkTo(route('admin.page.index')); ?> <?php endif; ?> <?php echo Form::close(); ?> </div> </div> </div> <?php $__env->stopSection(); ?> <?php $__env->startSection('scripts'); ?> $('form .input-daterange').datepicker({ autoclose: true, format: "dd.mm.yyyy", weekStart: 1, language: "sk" }); <?php $__env->startSection('scripts'); ?> $('textarea.redactor').redactor({ imageUpload: '<?php echo route('admin.image.store'); ?>', uploadImageFields: {'_token': '<?php echo csrf_token(); ?>' }, fileUpload: '<?php echo route('admin.file.store'); ?>', uploadFileFields: {'_token': '<?php echo csrf_token(); ?>' }, buttons: ['formatting', 'bold', 'italic', 'deleted', 'underline', 'unorderedlist', 'orderedlist', 'outdent', 'indent', 'image', 'file', 'link', 'alignment', 'horizontalrule'], allowedTags: ['h1', 'h2', 'h3', 'strong', 'b', 'em', 'i', 'del', 'strike', 'u', 'ul', 'ol', 'li', 'img', 'a', 'table', 'tbody', 'thead', 'tfoot', 'tr', 'td', 'th', 'hr', 'br'], formatting: ['h1', 'h2', 'h3'], cleanStyleOnEnter: true, removeComments: true, removeDataAttr: true, paragraphize: false, replaceDivs: false, imageLink: false, linebreaks: true, plugins: ['table'], minHeight: 250, lang: 'sk' }); <?php $__env->stopSection(); ?>@stop