Resolved pagination bug for viewing Products by Principle
This commit is contained in:
parent
ece580583d
commit
c269417509
|
|
@ -19,7 +19,7 @@ class ProductsController extends AppController {
|
|||
$this->Session->setFlash(__('Invalid Principle ID', true));
|
||||
$this->redirect(array('action'=>'index'));
|
||||
}
|
||||
$this->set('products', $this->paginate('Product', array('Product.principle_id'=> $id)));
|
||||
$this->set('products', $this->Product->find('all', array('conditions'=>array('Product.principle_id'=>$id))));
|
||||
$this->set('principle', $this->Product->Principle->findById($id));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
<h2><?php echo $principle['Principle']['name']; ?>: Products</h2>
|
||||
<table cellpadding="0" cellspacing="0" class="productTable">
|
||||
<tr>
|
||||
<th><?php echo $paginator->sort('title');?></th>
|
||||
<th>Title</th>
|
||||
|
||||
<th class="actions"><?php __('Actions');?></th>
|
||||
</tr>
|
||||
|
|
|
|||
|
|
@ -52,12 +52,13 @@ $(function() {
|
|||
},
|
||||
Cancel: function() {
|
||||
$( this ).dialog( "close" );
|
||||
},
|
||||
close: function() {
|
||||
}
|
||||
},
|
||||
close: function() {
|
||||
loadLineItems();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
$( "#editLineItemModal" ).dialog({
|
||||
|
|
|
|||
Loading…
Reference in a new issue