<?php $__env->startSection('content'); ?>
<script>
	var dt_opts = 
			[	{	"bSortable"		:	false		,	"bSearchable"	:	false		,	"sWidth"		:	'80px'	}
			,	{																					"sWidth"		:	'100px'	}
			,	{																					"sWidth"		:	'120px'	}
			,	{	"bSortable"		:	false												,	"sWidth"		:	'120px'	}
			,	{											"bSearchable"	:	false		,	"sWidth"		:	'70px'	}
			,	{	"bSortable"		:	false		,	"bSearchable"	:	false		,	"sWidth"		:	'60px'	}
			,	{	"bSortable"		:	false		,	"bSearchable"	:	false		,	"sWidth"		:	'60px'	}
			,	{																					"sWidth"		:	'50px'	}
			];
	var dt_len	= 10 ;			
	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.tasks'); ?></h2>
	<div class="table">
		<table id="tb_grid" class='grid'>
		<thead>
			<tr>
				<th width=" 50px"><?php echo link_to_route('newTask' , '', '', array( 'class'=>'button-small add', 'alt'=>'add', 'title'=>'προσθήκη')); ?></th>
				<th width="100px"><?php echo trans('labels.work'); ?></th>
				<th width="120px"><?php echo trans('labels.entity'); ?></th>
				<th width="120px"><?php echo trans('labels.desc'); ?></th>
				<th width=" 70px"><?php echo trans('labels.duration'); ?></th>
				<th width=" 60px"><?php echo trans('labels.cost'); ?></th>
				<th width=" 60px"><?php echo trans('labels.materials'); ?></th>
				<th width=" 50px"><?php echo trans('labels.status'); ?></th>
			</tr>
		</thead>	
		<tfoot>
			<tr>
				<th colspan="11"></th>
			</tr>
		</tfoot>
		<tbody>
			<?php foreach ($tasks as $task): ?>
			<tr>
				<td>	<?php echo link_to_route('showTask' , '', array($task->id), array( 'class'=>'button-small show', 'alt'=>'show', 'title'=>'προβολή')); ?>
						<?php echo link_to_route('editTask', '', array($task->id), array( 'class'=>'button-small upd', 'alt'=>'upd', 'title'=>'αλλαγή')); ?>
						<?php echo link_to_route('deleteTask', '', array($task->id), array( 'class'=>'button-small del', 'alt'=>'del', 'title'=>'διαγραφή')); ?></td>
				<td ><?php echo $task->work_desc; ?><?php echo link_to_route('showWork' , '', array($task->work->id), array( 'class'=>'button-link', 'alt'=>'go', 'title'=>'μετάβαση')); ?></td>
				<td ><?php echo $task->entity_name; ?><?php echo link_to_route('showEntity' , '', array($task->entity_id), array( 'class'=>'button-link', 'alt'=>'go', 'title'=>'μετάβαση')); ?></td>
				<td ><?php echo $task->task_name; ?></td>
				<td class="r"><?php echo $task->task_duration; ?></td>
				<td class="money"><?php echo $task->task_cost; ?></td>
				<td class="money"><?php echo $task->task_materials; ?></td>
				<td ><?php echo $task->code; ?></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(); ?>