<?php $__env->startSection('page-title', trans('app.activities')); ?>


<?php $__env->startSection('content'); ?>
<div class="stricky-header stricked-menu main-menu">
    <div class="sticky-header__content"></div><!-- /.sticky-header__content -->
</div><!-- /.stricky-header -->

<section class="page-header">
  <div class="page-header__bg" style="background-image: url(<?php echo e(asset('assets/images/header.jpg')); ?>);"></div>
  <div class="container">
    <h2>Creación de Contenido </h2>
    <ul class="thm-breadcrumb list-unstyled">
        <li class="text-white"><a href="<?php echo e(url('/')); ?>">Inicio</a></li>
    </ul>
  </div>
</section>

<div class="container bootstrap-iso" style="left: 40; padding:2em;">
    <?php echo Form::open(['route' => 'content.storeNew', 'files' => true, 'id' => 'user-form']); ?> 

        <?php $nameInput='category_id'; $nameObj='Categoría de Contenido'; ?>
        <div class="form-group col-xs-12 list-group-item <?php if($errors->first($nameInput)): ?> has-error <?php endif; ?>  ">
            <?php echo e(Form::label($nameInput, $nameObj,['class'=>'control-label'])); ?>

            <?php echo e(Form::select($nameInput,(['' => '---Seleccionar Opción---'] + $categories), null,['id'=>$nameInput,'class' => 'form-control' ])); ?>

            <?php if($errors->first($nameInput)): ?><div class="new badge red"><?php echo e($errors->first($nameInput)); ?> </div><?php endif; ?>
        </div>

        <?php $nameInput='publish_up'; $nameObj='Fecha de Publicación (2021-12-31)'; ?>
        <div class="form-group col-xs-12 list-group-item <?php if($errors->first($nameInput)): ?> has-error <?php endif; ?>  ">
            <?php echo e(Form::label($nameInput, $nameObj,['class'=>'control-label datepicker','data-provide'=>'datepicker'])); ?>

            <?php echo e(Form::text($nameInput, date('Y-m-d'), ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control datepicker' ])); ?>

            <?php if($errors->first($nameInput)): ?><div class="new badge red"><?php echo e($errors->first($nameInput)); ?> </div><?php endif; ?>
        </div>

        <?php $nameInput='title'; $nameObj='Título'; ?>
        <div class="form-group col-xs-12 list-group-item <?php if($errors->first($nameInput)): ?> has-error <?php endif; ?>  ">
            <?php echo e(Form::label($nameInput, $nameObj,['class'=>'control-label'])); ?>

            <?php echo e(Form::text($nameInput, '', ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control' ])); ?>

            <?php if($errors->first($nameInput)): ?><div class="new badge red"><?php echo e($errors->first($nameInput)); ?> </div><?php endif; ?>
        </div>

        <?php $nameInput='created_by_alias'; $nameObj='Autor'; ?>
        <div class="form-group col-xs-12 list-group-item <?php if($errors->first($nameInput)): ?> has-error <?php endif; ?>  ">
            <?php echo e(Form::label($nameInput, $nameObj,['class'=>'control-label'])); ?>

            <?php echo e(Form::text($nameInput, Auth::user()->name, ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control'])); ?>

            <?php if($errors->first($nameInput)): ?><div class="new badge red"><?php echo e($errors->first($nameInput)); ?> </div><?php endif; ?>
        </div>

        <?php $nameInput='description'; $nameObj='Descripción'; ?>
        <div class="form-group col-xs-12 list-group-item <?php if($errors->first($nameInput)): ?> has-error <?php endif; ?>  ">
            <?php echo e(Form::label($nameInput, $nameObj,['class'=>'control-label'])); ?>

            <?php echo e(Form::textarea($nameInput, '', ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control file-path validate'])); ?>

            <?php if($errors->first($nameInput)): ?><div class="new badge red"><?php echo e($errors->first($nameInput)); ?> </div><?php endif; ?>
        </div>
        
        <?php $nameInput='images'; $nameObj='Reemplazar Imagen Principal'; ?>
        <?php /* <div class="form-group col-xs-12 list-group-item  <?php if($errors->first($nameInput)): ?> has-error <?php endif; ?>  ">
            <div class="file-field input-field">
                    <?php echo e(Form::label($nameInput, $nameObj,['class'=>'control-label'])); ?>

                    <input type="file" name="images" value="">
            </div>
        </div> */ ?>

        <?php $nameInput='images'; $nameObj='Imagen Principal del Contenido'; ?>
        <div class="form-group col-xs-12 list-group-item file-field input-field <?php if($errors->first($nameInput)): ?> has-error <?php endif; ?>  ">
            <div class="file-field input-field">
                <div class="btn">
                    <span><?php echo e($nameObj); ?></span>
                    <?php echo e(Form::file($nameInput , ['id'=>$nameInput,'placeholder'=>$nameObj,'class'=>'form-control'])); ?>

                </div>
            </div>
            <?php if($errors->first($nameInput)): ?><div class="new badge red"><?php echo e($errors->first($nameInput)); ?> </div><?php endif; ?>
        </div>

        <div class="row">
            <?php $nameInput='featured'; $nameObj='Destacado'; ?>
            <div class="form-group col-xs-12 col-md-6 list-group-item <?php if($errors->first($nameInput)): ?> has-error <?php endif; ?>  ">
                <div class="switch">
                <label>
                    Sin Destacar 
                    <input type="checkbox" name="featured" id="featured"> 
                    <span class="lever"></span>
                    Destacado
                </label>
                </div>
            </div>
        </div>


        <hr>
        <div class="row">
            <div class="col-xs-12 col-md-6">
                <a class="btn btn-outline-danger btn-lg btn-block waves-effect waves-light" href="<?php echo e(url('/')); ?>">
                    <i class="fa fa-close"></i> Cancelar
                </a>
            </div>
            <div class="col-xs-12 col-md-6">
                <button type="submit" class="btn btn-primary btn-lg btn-block waves-effect waves-light">
                    <i class="fa fa-save"></i> Guardar Datos
                </button>
            </div>
        </div>
        <hr>
    <?php echo Form::close(); ?>

</div>

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

<?php $__env->stopSection(); ?>

<?php $__env->startSection('scripts'); ?>

    <?php echo $__env->make('partials.tinymce', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
    <?php echo $__env->make('partials.scripts', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
     
<?php $__env->stopSection(); ?>

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