85 lines
3.3 KiB
PHP
85 lines
3.3 KiB
PHP
<div class="purchaseOrders index">
|
|
<h2><?php __('PurchaseOrders');?></h2>
|
|
<p>
|
|
<?php
|
|
echo $paginator->counter(array(
|
|
'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
|
|
));
|
|
?></p>
|
|
<table cellpadding="0" cellspacing="0">
|
|
<tr>
|
|
|
|
<th><?php echo $paginator->sort('issue_date');?></th>
|
|
<th><?php echo $paginator->sort('dispatch_date');?></th>
|
|
<th><?php echo $paginator->sort('date_arrived');?></th>
|
|
<th><?php echo $paginator->sort('title');?></th>
|
|
<th>Jobs</th>
|
|
<th><?php echo $paginator->sort('principle_id');?></th>
|
|
<th><?php echo $paginator->sort('principle_reference');?></th>
|
|
<th><?php echo $paginator->sort('document_id');?></th>
|
|
<th class="actions"><?php __('Actions');?></th>
|
|
</tr>
|
|
<?php
|
|
$i = 0;
|
|
foreach ($purchaseOrders as $purchaseOrder):
|
|
$class = null;
|
|
if ($i++ % 2 == 0) {
|
|
$class = ' class="altrow"';
|
|
}
|
|
$jobLink = "";
|
|
foreach($purchaseOrder['Job'] as $job) {
|
|
$jobLink .= $html->link($job['title']." ", array('controller'=>'jobs', 'action'=>'view', $job['id']));
|
|
}
|
|
|
|
?>
|
|
<tr<?php echo $class;?>>
|
|
|
|
<td>
|
|
<?php echo $purchaseOrder['PurchaseOrder']['issue_date']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $purchaseOrder['PurchaseOrder']['dispatch_date']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $purchaseOrder['PurchaseOrder']['date_arrived']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $purchaseOrder['PurchaseOrder']['title']; ?>
|
|
</td>
|
|
<td class="tinytext">
|
|
<?php echo $jobLink; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $html->link($purchaseOrder['Principle']['name'], array('controller' => 'principles', 'action' => 'view', $purchaseOrder['Principle']['id'])); ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $purchaseOrder['PurchaseOrder']['principle_reference']; ?>
|
|
</td>
|
|
<td>
|
|
<?php echo $html->link($purchaseOrder['Document']['id'], array('controller' => 'documents', 'action' => 'view', $purchaseOrder['Document']['id'])); ?>
|
|
</td>
|
|
<td class="actions">
|
|
<?php echo $html->link(__('View', true), array('action' => 'view', $purchaseOrder['PurchaseOrder']['id'])); ?>
|
|
<?php echo $html->link(__('Edit', true), array('action' => 'edit', $purchaseOrder['PurchaseOrder']['id'])); ?>
|
|
</td>
|
|
</tr>
|
|
<?php endforeach; ?>
|
|
</table>
|
|
</div>
|
|
<div class="paging">
|
|
<?php echo $paginator->prev('<< '.__('previous', true), array(), null, array('class'=>'disabled'));?>
|
|
| <?php echo $paginator->numbers();?>
|
|
<?php echo $paginator->next(__('next', true).' >>', array(), null, array('class' => 'disabled'));?>
|
|
</div>
|
|
<div class="actions">
|
|
<ul>
|
|
<li><?php echo $html->link(__('New PurchaseOrder', true), array('action' => 'add')); ?></li>
|
|
<li><?php echo $html->link(__('List Principles', true), array('controller' => 'principles', 'action' => 'index')); ?> </li>
|
|
<li><?php echo $html->link(__('New Principle', true), array('controller' => 'principles', 'action' => 'add')); ?> </li>
|
|
<li><?php echo $html->link(__('List Documents', true), array('controller' => 'documents', 'action' => 'index')); ?> </li>
|
|
<li><?php echo $html->link(__('New Document', true), array('controller' => 'documents', 'action' => 'add')); ?> </li>
|
|
<li><?php echo $html->link(__('List Jobs', true), array('controller' => 'jobs', 'action' => 'index')); ?> </li>
|
|
<li><?php echo $html->link(__('New Job', true), array('controller' => 'jobs', 'action' => 'add')); ?> </li>
|
|
</ul>
|
|
</div>
|
|
<?php debug($purchaseOrders);?>
|