Resolved pagination bug for viewing Products by Principle

This commit is contained in:
Karl Cordes 2011-07-19 16:56:03 +10:00
parent ece580583d
commit c269417509
3 changed files with 6 additions and 5 deletions

View file

@ -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));
}

View file

@ -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>

View file

@ -52,12 +52,13 @@ $(function() {
},
Cancel: function() {
$( this ).dialog( "close" );
},
close: function() {
}
},
close: function() {
loadLineItems();
}
}
});
$( "#editLineItemModal" ).dialog({