<?php $__env->startSection('content'); ?>
<script>
	var dt_opts = 
			[	{	"bSortable"		:	false		,	"bSearchable"	:	false	,	"sWidth"	:	'80px'	}
			,	{	"bSortable"		:	true		,	"bSearchable"	:	false	,	"sWidth"	:	'50px'	}
			,	{	"bSortable"		:	false		,	"bSearchable"	:	true	,	"sWidth"	:	'300px'	}
			,	{	"bSortable"		:	false		,	"bSearchable"	:	false	,	"sWidth"	:	'60px'	}
			,	{	"bSortable"		:	true		,	"bSearchable"	:	false	,	"sWidth"	:	'70px'	}
			,	{	"bSortable"		:	false		,	"bSearchable"	:	false	,	"sWidth"	:	'70px'	}
			,	{	"bSortable"		:	false		,	"bSearchable"	:	false	,	"sWidth"	:	'70px'	}
			]	;
	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.works'); ?></h2>
	<div class="table">
		<table id="tb_grid" class='grid'>
		<thead>
			<tr>
				<th><?php echo link_to_route('newWork' , '', '', array( 'class'=>'button-small add', 'alt'=>'add', 'title'=>'προσθήκη')); ?></th>
				<th><?php echo trans('labels.id'); ?></th>
				<th><?php echo trans('labels.desc'); ?></th>
				<th><?php echo trans('labels.duration'); ?></th>
				<th><?php echo trans('labels.materials'); ?></th>
				<th><?php echo trans('labels.budget'); ?></th>
				<th><?php echo trans('labels.cost'); ?></th>
			</tr>
		</thead>	
		<tfoot>
			<tr>
				<th colspan="7"></th>
			</tr>
		</tfoot>
		<tbody>
			<?php foreach ($works as $work): ?>
			<tr>
				<td>	<?php echo link_to_route('showWork' , '', array($work->id), array( 'class'=>'button-small show', 'alt'=>'show', 'title'=>'προβολή')); ?>
						<?php echo link_to_route('editWork', '', array($work->id), array( 'class'=>'button-small upd', 'alt'=>'upd', 'title'=>'αλλαγή')); ?>
						<?php echo link_to_route('deleteWork', '', array($work->id), array( 'class'=>'button-small del', 'alt'=>'del', 'title'=>'διαγραφή')); ?></td>
				<td class="r"><?php echo substr('00000' . $work->id, -5); ?></td>
				<td ><?php echo $work->work_desc; ?></td>
				<td class="r"><?php echo $work->work_duration; ?></td>
				<td class="money"><?php echo $work->work_materials; ?></td>
				<td class="money"><?php echo $work->work_budget; ?></td>
				<td class="money"><?php echo $work->work_cost; ?></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(); ?>