Added created column to shipments index. Only way to order them correctly is by created timestamp DESC. Trying to order by two columns makes things unpredictable. Click on the column headings to re-order things closes #10
This commit is contained in:
parent
b248b495f9
commit
1a349e2b75
|
|
@ -9,8 +9,6 @@ class Shipment extends AppModel {
|
|||
|
||||
var $recursive = 1;
|
||||
|
||||
var $order = array('Shipment.date_arrived' => 'DESC', 'Shipment.date_dispatched'=>'DESC');
|
||||
|
||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
var $belongsTo = array(
|
||||
'FreightForwarder' => array(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<table cellpadding="0" cellspacing="0" class="shipments">
|
||||
<tr>
|
||||
<th class="actions"><?php __('Actions');?></th>
|
||||
<th><?php echo $paginator->sort('created');?></th>
|
||||
<th><?php echo $paginator->sort('date_arrived');?></th>
|
||||
<th><?php echo $paginator->sort('date_dispatched');?></th>
|
||||
<th><?php echo $paginator->sort('type');?></th>
|
||||
|
|
@ -34,6 +35,14 @@
|
|||
<td class="actions">
|
||||
<button id="<?=$shipment['Shipment']['id']?>" class="editButton">Edit</button>
|
||||
</td>
|
||||
<td>
|
||||
<?php
|
||||
$unixtime = strtotime($shipment['Shipment']['created']);
|
||||
$dateString = date('j M Y');
|
||||
echo $dateString;
|
||||
?>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<?php
|
||||
|
|
|
|||
Loading…
Reference in a new issue