File: //home/cursos.ril.es/storage/framework/views/3f82f452c38ec3fc5c92562cf69a8b9adab64bb7.php
<?php $__env->startSection('header'); ?>
@parent
<title>Profesores</title>
<style>
.row{
margin-left: 0;
margin-right: 0;
}
</style>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('pagina'); ?>
<div class="separacion-top"></div>
<?php echo $__env->make('datatables.listadoProfesores', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
<div class="col-sm-8 col-sm-offset-2">
<div class="page-header">
<h1><span class="fi-torso-business"></span> <?php if($profesor): ?> Editar <?php echo e($profesor->nombre); ?> <?php else: ?> Nuevo Profesor <?php endif; ?> </h1>
</div>
<div>
<?php if($profesor): ?>
<?php echo e(Form::model($profesor, array('route' => array('admin.profesores.update', $profesor->id), 'method' => 'PUT'))); ?>
<?php else: ?>
<?php echo e(Form::model(array('route' => array('admin.profesores'), 'method' => 'POST'))); ?>
<?php endif; ?>
<div class="form-group">
<?php echo e(Form::label('nombre', 'Nombre')); ?>
<?php echo e(Form::text('nombre', \Illuminate\Support\Facades\Input::old('nombre'), array('class' => 'form-control', 'placeholder' => 'nombre'))); ?>
<?php if($errors->has('nombre')): ?> <p class="help-block"><?php echo e($errors->first('nombre')); ?></p> <?php endif; ?>
</div>
<div class="form-group">
<?php echo e(Form::label('apellidos', 'Apellidos')); ?>
<?php echo e(Form::text('apellidos', \Illuminate\Support\Facades\Input::old('apellidos'), array('class' => 'form-control', 'placeholder' => 'apellidos'))); ?>
<?php if($errors->has('apellidos')): ?> <p class="help-block"><?php echo e($errors->first('apellidos')); ?></p> <?php endif; ?>
</div>
<div class="form-group">
<?php echo e(Form::label('email', 'email')); ?>
<?php echo e(Form::text('email', \Illuminate\Support\Facades\Input::old('email'), array('class' => 'form-control', 'placeholder' => 'email'))); ?>
<?php if($errors->has('email')): ?> <p class="help-block"><?php echo e($errors->first('email')); ?></p> <?php endif; ?>
</div>
<div class="form-group">
<?php echo e(Form::label('admin', 'Admin')); ?>
<?php echo e(Form::select('admin', array('0' => 'No', '1' => 'Si'), \Illuminate\Support\Facades\Input::old('admin'), array('class' => 'form-control'))); ?>
<?php if($errors->has('admin')): ?> <p class="help-block"><?php echo e($errors->first('admin')); ?></p> <?php endif; ?>
</div>
<?php echo e(Form::submit('Enviar', array('class' => 'btn btn-default'))); ?>
<?php echo e(Form::close()); ?>
</div>
<div class="vacio"></div>
</div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('footer'); ?>
@parent
<script>
$(document).ready(function(){
$("#itemcinco").addClass("active");
$(function() {
var dataTable = $('#profesores-table').DataTable({
processing: true,
serverSide: true,
ajax: '<?php echo route('datatablesProfesores.data'); ?>',
columns: [
{ data: 'nombre', name: 'nombre' },
{ data: 'apellidos', name: 'apellidos' },
{ data: 'email', name: 'email' },
{ data: 'admin', name: 'admin' },
{
data: "id",
"render": function (data) {
return "<form action='/admin/profesores/" + data + "/edit' method='PUT'><button type='submit' class='btn btn-warning'><span class='fi-pencil'></span> Editar</button></form>";
}
},
{
data: "id",
"render": function (data) {
return "<form method='POST' action='/admin/profesores/" + data + "'><input type='hidden' name='_token' value='<?php echo csrf_token(); ?>'><input name='_method' type='hidden' value='DELETE'><button type='submit' class='btn btn-default'><span class='fi-x'></span></button></form>";
}
},
]
});
});
});
</script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.menu', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>