<h1>Perfiles</h1>
<?php isset($mensaje) ? include_partial('partials/mensaje',array('mensaje' =>$mensaje)) : ''?>
<?php if(count($perfiles) > 0): ?>
<table class="show">
	<tr>
		<th>Nombre</th>
		<th>Estado</th>
		<th><?php include_partial('partials/info')?></th>
	</tr>
	<?php $i = 0?>
	<?php foreach($perfiles as $perfil): ?>
	<tr <?php if($i%2 != 0) echo "class='alt'"?>>
		<td><?php echo $perfil->getDescripcion()?></td>
		<td align="center"><?php echo checkbox_tag('x',$perfil->getEstado(),$perfil->getEstado(),array('disabled'=>true))?></td>
		<td><?php include_partial('partials/edit',array('return' => 'perfiles/edit?id=' . $perfil->getId()))?></td>
	</tr>
	<?php $i++?>
	<?php endforeach?>
	<tr>
		<th colspan="6">Total perfiles encontrados <?php echo $i?></th>
	</tr>
</table>
<br />
	<?php echo $sf_user->hasCredential('admin') || $sf_user->hasCredential('create_perfil') ? include_partial('partials/create',array('return' => 'perfiles/create','tool' => 'Crear Perfil')) : include_partial('partials/home')?>
	<?php else:?>
	<?php include_partial('partials/no_found',array('tool' => 'Inicio', 'image' => 'home'))?>
	<?php endif?>
