Fixed Job index listing
This commit is contained in:
parent
d06ceef2ae
commit
b20e930935
|
|
@ -4,6 +4,15 @@ class JobsController extends AppController {
|
|||
var $name = 'Jobs';
|
||||
var $helpers = array('Html', 'Form');
|
||||
|
||||
|
||||
var $paginate = array(
|
||||
|
||||
'contain' => false,
|
||||
'limit' => 150,
|
||||
'order'=>array('Job.id' => 'desc')
|
||||
|
||||
);
|
||||
|
||||
function index() {
|
||||
//$this->Job->recursive = 1;
|
||||
$this->set('jobs', $this->paginate());
|
||||
|
|
|
|||
|
|
@ -1,33 +1,36 @@
|
|||
<?php
|
||||
class Job extends AppModel {
|
||||
|
||||
var $name = 'Job';
|
||||
var $validate = array(
|
||||
'title' => array('notempty'),
|
||||
|
||||
'enquiry_id' => array('numeric'),
|
||||
|
||||
'date_order_received' => array('date'),
|
||||
|
||||
'domestic_freight_paid_by' => array('notempty'),
|
||||
'sale_category' => array('notempty'),
|
||||
'shipment_category' => array('notempty')
|
||||
);
|
||||
var $name = 'Job';
|
||||
var $validate = array(
|
||||
'title' => array('notempty'),
|
||||
|
||||
'enquiry_id' => array('numeric'),
|
||||
|
||||
'date_order_received' => array('date'),
|
||||
|
||||
'domestic_freight_paid_by' => array('notempty'),
|
||||
'sale_category' => array('notempty'),
|
||||
'shipment_category' => array('notempty')
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
var $belongsTo = array(
|
||||
|
||||
'Enquiry' => array(
|
||||
'className' => 'Enquiry',
|
||||
'foreignKey' => 'enquiry_id',
|
||||
'conditions' => '',
|
||||
'fields' => '',
|
||||
'order' => '',
|
||||
'counterCache' => true
|
||||
)
|
||||
);
|
||||
|
||||
//The Associations below have been created with all possible keys, those that are not needed can be removed
|
||||
var $belongsTo = array(
|
||||
|
||||
'Enquiry' => array(
|
||||
'className' => 'Enquiry',
|
||||
'foreignKey' => 'enquiry_id',
|
||||
'conditions' => '',
|
||||
'fields' => '',
|
||||
'order' => '',
|
||||
'counterCache' => true
|
||||
)
|
||||
);
|
||||
|
||||
|
||||
|
||||
}
|
||||
?>
|
||||
Loading…
Reference in a new issue