<?php $__env->startSection('content'); ?>
<script>
	var dt_opts = 
			[	{	"bSortable"		:	false		,	"bSearchable"	:	false		,	"sWidth"		:	'80px'	}
			,	{											"bSearchable"	:	false		,	"sWidth"		:	'50px'	}
			,	{																					"sWidth"		:	'180px'	}
			,	{																					"sWidth"		:	'200px'	}
			,	{																					"sWidth"		:	'180px'	}
			];
	var dt_len	= 14 ;			
	var dt_msg1 = "<?php echo trans('msgs.dt_msg1'); ?>" ;
	var dt_msg2 = "<?php echo trans('msgs.dt_msg2'); ?>" ;
	var dt_msg3 = "<?php echo trans('msgs.dt_msg3'); ?>" ;
	var dt_msg4 = "<?php echo trans('msgs.dt_msg4'); ?>" ;
	var dt_msg5 = "<?php echo trans('msgs.dt_msg5'); ?>" ;
	var dt_msg6 = "<?php echo trans('msgs.dt_msg6'); ?>" ;
</script>
<?php echo HTML::script('js/datatables.js'); ?>	
	<h2><?php echo trans('labels.entities'); ?></h2>
	<div class="table">
		<table id="tb_grid" class='grid'>
		<thead>
			<tr>
				<th><?php echo link_to_route('newEntity' , '', '', array( 'class'=>'button-small add', 'alt'=>'add', 'title'=>'προσθήκη')); ?></th>
				<th><?php echo trans('labels.id'); ?></th>
				<th><?php echo trans('labels.label'); ?></th>
				<th><?php echo trans('labels.desc'); ?></th>
				<th><?php echo trans('labels.entity'); ?></th>
			</tr>
		</thead>	
		<tfoot>
			<tr>
				<th colspan="8"></th>
			</tr>
		</tfoot>
		<tbody>
			<?php foreach ($entities as $entity): ?>
			<tr>
				<td>	<?php echo link_to_route('showEntity' , '', array($entity->id), array( 'class'=>'button-small show', 'alt'=>'show', 'title'=>'προβολή')); ?>
						<?php echo link_to_route('editEntity', '', array($entity->id), array( 'class'=>'button-small upd', 'alt'=>'upd', 'title'=>'αλλαγή')); ?>
						<?php echo link_to_route('deleteEntity', '', array($entity->id), array( 'class'=>'button-small del', 'alt'=>'del', 'title'=>'διαγραφή')); ?></td>
				<td class="r"><?php echo substr('00000' . $entity->id, -5); ?></td>
				<td ><?php echo $entity->entity_name; ?></td>
				<td ><?php echo $entity->entity_desc; ?></td>
				<td ><?php echo $entity->parent_name; ?></td>
			</tr>
			<?php endforeach; ?>
		</tbody>
		</table>
	</div>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('layouts.grid', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>