Merge branch 'cyy_api' into 'master'
* Modify product order and pager. See merge request easycorp/zentaopms!5136
This commit is contained in:
@@ -24,7 +24,7 @@ class productsEntry extends entry
|
||||
if(strpos(strtolower(",{$fields},"), ',dropmenu,') !== false) return $this->getDropMenu();
|
||||
|
||||
if(!$programID) $programID = $this->param('program', 0);
|
||||
$projectID = $this->param('project', 0);
|
||||
$projectID = $this->param('project', 0);
|
||||
$mergeChildren = $this->param('mergeChildren', '');
|
||||
|
||||
if($programID)
|
||||
@@ -55,7 +55,7 @@ class productsEntry extends entry
|
||||
else
|
||||
{
|
||||
$control = $this->loadController('product', 'all');
|
||||
$control->all($this->param('status', 'all'), $this->param('order', 'order_asc'), 0, 0, $this->param('limit', '20'), $this->param('page', '1') );
|
||||
$control->all($this->param('status', 'all'), $this->param('order', 'program_asc'), 0, 0, $this->param('limit', 100), $this->param('page', 1));
|
||||
|
||||
/* Response */
|
||||
$data = $this->getData();
|
||||
@@ -174,7 +174,7 @@ class productsEntry extends entry
|
||||
/**
|
||||
* Merge children products.
|
||||
*
|
||||
* @param array $products
|
||||
* @param array $products
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
@@ -192,12 +192,11 @@ class productsEntry extends entry
|
||||
}
|
||||
|
||||
$unclosedTotal = 0;
|
||||
foreach($program as $field => $value)
|
||||
foreach($program as $lineID => $value)
|
||||
{
|
||||
if(!isset($programs[$programID]->children)) $programs[$programID]->children = array();
|
||||
if(isset($value->products))
|
||||
{
|
||||
$lineID = $field;
|
||||
if(empty($lineID))
|
||||
{
|
||||
foreach($value->products as $product)
|
||||
|
||||
Reference in New Issue
Block a user