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

<?php
/**
* indexRelaciones.blade.php
* Ruta:              /transito/app/views/tiporequisito/indexRelaciones.blade.php
* Fecha Creación:    08/Nov/2016
*
* Interfaz de inicio para los elementos contenidos
* En la tabla asociada al modelo RequisitosRequisitosPermanente
*
* @author           Michael Angelo Ortiz Triviño <engineermikeortiz@gmail.com>
* @copyright        2016 Michael Ortiz
* @license          GPL 2 or later
* @version          2016-01-08
*
*/
?>

<div class="row">
    <div class="col-xs-12 col-md-10 col-md-offset-1">
        <div class="well">

            <fieldset>
                <legend>Requisitos para Tramites asociados al Requisito Permanente <br>(<?php echo $requisitoPermanente->nombre; ?>) <div class="btn-group pull-right"> <?php echo HTML::link('tipoRequisito/nueva/relacion/'.$requisitoPermanente->id,' Agregar', array('class'=>'btn btn-primary glyphicon glyphicon-plus')); ?><?php echo HTML::link('tipoRequisito','Regresar',array('class'=>'glyphicon glyphicon-hand-left btn btn-default')); ?></div></legend>

        	    <div class="table-responsive">
                      <table class="table table-stripped table-bordered table-hover">
                      	    <thead>
                      	    	<tr>
                      	    		<th>
                      	    			Requisito Permanente
                      	    		</th>
                      	    		<th>
                      	    			Requisito para Tramite
                      	    		</th>
                      	    		<th>
                      	    			Acciones
                      	    		</th>
                      	    	</tr>
                      	    </thead>
                      	    <tbody>
                      	        <?php if(count($relaciones) > 0): ?>
                      	    	    <?php foreach($relaciones as $objRelacion): ?>
                      	    	        <tr>
                      	    	    	    <td><?php echo $objRelacion->requisitoPermanente->nombre; ?></td>
                      	    	    	    <td><?php echo $objRelacion->requisitoTramite->descripcion; ?><br>(<?php echo $objRelacion->requisitoTramite->tipoTramite->nombre; ?>)</td>
                      	    	    	    <td class="text-center">
                      	    	    	        <?php if($objRelacion->estado == 1): ?>
            	                                    <a href="<?php echo route('relaciones.estados',$objRelacion->id); ?>" class='btn btn-sm btn-success' title='Desactivar'><span class='glyphicon glyphicon-ok-sign'></span></a>
            	                                <?php else: ?>
            	       	                            <a href="<?php echo route('relaciones.estados',$objRelacion->id); ?>" class='btn btn-sm btn-danger' title='Activar'><span class='glyphicon glyphicon-remove-sign'></span></a>
            	       	                        <?php endif; ?>
                      	    	    	    </td>
                      	    	        </tr>
                      	    	    <?php endforeach; ?>
                      	    	<?php else: ?>
                      	    	    <tr>
                      	    	    	<th class="text-center" colspan="3"><b>No hay registros</b></th>
                      	    	    </tr>
                      	    	<?php endif; ?>
                      	    </tbody>
                      </table>
                </div>
            </fieldset>
        </div>    	
    </div>	
</div>

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