<script>
	var dt_opts_c = 
			[	{	"bSortable"		:	false		,	"bSearchable"	:	false		,	"sWidth"		:	'80px'	}
			,	{	"bSortable"		:	false												,	"sWidth"		:	'160px'	}
			,	{																					"sWidth"		:	'100px'	}
			,	{																					"sWidth"		:	'60px'	}
			,	{	"bSortable"		:	false		,	"bSearchable"	:	false		,	"sWidth"		:	'60px'	}
			,	{											"bSearchable"	:	false		,	"sWidth"		:	'70px'	}
			,	{											"bSearchable"	:	false		,	"sWidth"		:	'70px'	}
			,	{	"bSortable"		:	false		,	"bSearchable"	:	false		,	"sWidth"		:	'80px'	}
			,	{	"bSortable"		:	false		,	"bSearchable"	:	false		,	"sWidth"		:	'80px'	}
			];
	var dt_len_c	= 4 ;			
	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_c.js'); ?>	
<h2><?php echo trans('labels.tasks'); ?></h2>
	<div class="table">
		<table id="tb_grid_c" class='grid'>
		<thead>
			<tr>
				<th><?php echo link_to_route('newTask' , '', '', array( 'class'=>'button-small add', 'alt'=>'add', 'title'=>'προσθήκη')); ?></th>
				<th><?php echo trans('labels.desc'); ?>	</th>
				<th><?php echo trans('labels.work'); ?>	</th>
				<th><?php echo trans('labels.status'); ?>	</th>
				<th><?php echo trans('labels.duration'); ?></th>
				<th><?php echo trans('labels.start'); ?>	</th>
				<th><?php echo trans('labels.end'); ?>		</th>
				<th><?php echo trans('labels.budget'); ?>	</th>
				<th><?php echo trans('labels.cost'); ?>	</th>
			</tr>
		</thead>	
		<tfoot>
		</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->task_long; ?></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->code; ?></td>
				<td class="r"><?php echo $task->task_duration; ?></td>
				<td ><?php echo $task->task_start; ?></td>
				<td ><?php echo $task->task_end; ?></td>
				<td class="r"><?php echo $task->task_budget; ?></td>
				<td class="r"><?php echo $task->task_cost; ?></td>
			</tr>
			<?php endforeach; ?>
		</tbody>
		</table>
	</div>