<h1>Menus</h1>
<?php isset($mensaje) ? include_partial('partials/mensaje',array('mensaje' =>$mensaje)) : ''?>
<?php if(count($menus) > 0): ?>
<?php if(!$sf_user->hasCredential('admin') || !$sf_user->hasCredential('menus')):?>
<table class="show">
	<tr>
		<th>Nombre</th>
		<th>Orden</th>
		<th><?php include_partial('partials/info')?></th>
	</tr>
	<?php $i = 0?>
	<?php foreach($menus as $menu): ?>
	<tr <?php if($i%2 == 0) echo "class='alt'"?>>
		<td><?php echo $menu->getDescripcion()?></td>
		<td align="center"><?php echo $menu->getOrden()?></td>
		<td><?php include_partial('partials/edit',array('return' => 'menus/edit?id=' . $menu->getId()))?></td>
	</tr>
	<?php $i++?>
	<?php endforeach?>
</table>
	<?php else: ?>
	<?php include_partial('partials/no_found',array('tool' => 'Inicio', 'image' => 'home'))?>
	<?php endif?>
	<?php else: ?>
	<?php include_partial('partials/no_found',array('tool' => 'Inicio', 'image' => 'home'))?>
	<?php endif?>