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


<?php $__env->startSection('Contenido'); ?>
<div class="row">
	<div class="col-md-12">
		<h2><i class="fa fa-picture-o"></i> Administración de Biblioteca multimedia </h2>
	</div><!--/col-md-12-->
</div><!--/row-->

<div class="row">
	<div class="col-md-12">
		<?php if(Session::has('message')): ?>
		<div class="alert alert-info"><?php echo Session::get('message'); ?></div>
		<?php endif; ?>
	</div>
</div>

<div class="row">
	<div class="col-md-12">
		<div class="block-web">
			<div class="header"> <h3 class="content-header"> Vistas para agregar videos de ayuda </h3> </div>
			<div class="porlets-content">
				<div class="table-responsive">
					<table class="table table-striped table-bordered table-hover">
						<thead>
							<tr>
								<th class="col-md-2"> Nombre de la imágen </th>
								<th class="col-md-4"> Ruta de acceso </th>
								<th class="col-md-4"> Filtros </th>
								<th class="col-md-2"> Acciones </th>
							</tr>
						</thead>
						<tbody>
							<?php $__empty_2 = true; foreach($BibliotecaImagenes as $BibliotecaImagen): $__empty_2 = false; ?>
							<tr>
								<td> <?php echo $BibliotecaImagen->nombre; ?> </td>
								<td> <?php echo $BibliotecaImagen->ruta; ?> </td>
								<td> <?php echo $BibliotecaImagen->filtros; ?> </td>
								<td>
									<a href="<?php echo URL::route('SysWebVideosAyudaVistaEditar', array($BibliotecaImagen->id)); ?>" class="btn btn-warning">Editar</a>
									<a href="javascript:Eliminar(<?php echo $BibliotecaImagen->id; ?>)" class="btn btn-danger">Eliminar</a>
								</td>
							</tr>
							<?php endforeach; if ($__empty_2): ?>
							<tr class="danger"> <td colspan="4"> No existe ningúna imagen agregada a la biblioteca </td> </tr>
							<?php endif; ?>
						</tbody>
					</table>
					<?php echo $BibliotecaImagenes->links();; ?>

				</div>
			</div>
			<div class="bottom">
				<?php echo HTML::linkRoute('SysWebBibliotecaImagenesAgregar', 'Agregar', array(), array('class' => 'btn btn-primary')); ?>

			</div>
		</div>
	</div>
</div><!--/row end-->
<?php $__env->stopSection(); ?>

<?php $__env->startSection('JS'); ?>
<script type="text/javascript">
	function Eliminar(id){
		var id = id;
		$.post(
			"<?php echo URL::route('SysWebBibliotecaImagenesEliminar'); ?>",
			{id:id},
			function(data){
				if(data.success){
					new PNotify({ title: "Realizado", text: data.mensaje, type: "success" });
					setTimeout( function(){ window.location.reload(); }, 3000 );
				}
				else{
					if(data.mensaje != ''){ new PNotify({ title: "Error", text: data.mensaje, type: "error" }); }
					$.each(data.errMensajes, function(key, value){ if(value != ''){ $("#err"+key).html(value); } else{ $("#err"+key).html(""); } });
				}
			},
			"json"
		);
	}
</script>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('JSOr'); ?>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('BaseSistemaWeb', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>