<div class="blocktitle">Tasks</div>
<div class="tar borb">
	<?php 
	echo $this->Html->link('Calendar',array('controller'=>'calendars','action'=>'calendar'),array('class'=>'btn btn-mini'));
	echo $this->Html->link('Task',array('controller'=>'classtasks','action'=>'index'),array('class'=>'btn btn-mini'));
	echo $this->Html->link('Add New Task',array('controller'=>'classtasks','action'=>'add'),array('class'=>'btn btn-mini'));
	?>
</div>
<br/>
<div class="w97p pdl10">
    <table class="table table-bordered">
        <tr class="info">
            <td>Title</td>
            <td>Description</td>
            <td>startdate</td>
            <td>enddate</td>
            <td>Actions</td>
        </tr>
        <?php foreach ($classtasks as $classtask){?>
    
    
        <tr>
            <td><?php echo $this->Html->link($classtask['Classtask']['title'],array('action' => 'view', base64_encode($classtask['Classtask']['id'])))?></td>
            <td><?php echo substr($classtask['Classtask']['description'],0, 60)?></td>
            <td><?php echo  date('m-d-Y,h:i a',strtotime($classtask['Classtask']['startdate']));?></td>
            <td><?php echo date('m-d-Y,h:i a',strtotime($classtask['Classtask']['enddate']))?></td>
            <td>
                <?php  echo $this->Html->link(__(''), array('action' => 'edit', base64_encode($classtask['Classtask']['id'])), array('class'=>'iconlink linkedit','title'=>'Edit')); ?>
		<?php echo $this->Form->postLink(__(''), array('action' => 'delete', $classtask['Classtask']['id']), array('class'=>'iconlink linkdelete','title'=>'Delete'), __('Are you sure you want to delete the task ?', $classtask['Classtask']['id'])); ?>
            </td>
        </tr>
        <?php }?>
    </table>
    
    
    
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Page {:page} of {:pages}, showing {:current} records out of {:count} total, starting on record {:start}, ending on {:end}')
	));
	?>	</p>
	<div class="paging">
	<?php
		echo $this->Paginator->prev('< ' . __('previous'), array(), null, array('class' => 'prev disabled'));
		echo $this->Paginator->numbers(array('separator' => ''));
		echo $this->Paginator->next(__('next') . ' >', array(), null, array('class' => 'next disabled'));
	?>
	</div>
</div>
