* ajust code.
This commit is contained in:
@@ -475,8 +475,11 @@ class block extends control
|
||||
public function printStoryBlock()
|
||||
{
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init(0, $this->params->num, 1);
|
||||
$this->view->stories = $this->loadModel('story')->getUserStories($this->app->user->account, $this->params->type, $this->params->orderBy, $this->viewType != 'json' ? $pager : '');
|
||||
$num = isset($this->params->num) ? $this->params->num : 0;
|
||||
$pager = pager::init(0, $num , 1);
|
||||
$type = isset($this->params->type) ? $this->params->type : 'assignedTo';
|
||||
$orderBy = isset($this->params->type) ? $this->params->orderBy : 'id_asc';
|
||||
$this->view->stories = $this->loadModel('story')->getUserStories($this->app->user->account, $type, $orderBy, $this->viewType != 'json' ? $pager : '');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -546,7 +549,8 @@ class block extends control
|
||||
public function printProductBlock()
|
||||
{
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init(0, $this->params->num, 1);
|
||||
$num = isset($this->params->num) ? $this->params->num : 0;
|
||||
$pager = pager::init(0, $num , 1);
|
||||
$this->view->productStats = $this->loadModel('product')->getStats('order_desc', $this->viewType != 'json' ? $pager : '');
|
||||
}
|
||||
|
||||
@@ -559,7 +563,9 @@ class block extends control
|
||||
public function printProjectBlock()
|
||||
{
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = pager::init(0, $this->params->num, 1);
|
||||
$this->view->projectStats = $this->loadModel('project')->getProjectStats($this->params->type, $productID = 0, $branch = 0, $itemCounts = 30, $orderBy = 'order_desc', $this->viewType != 'json' ? $pager : '');
|
||||
$num = isset($this->params->num) ? $this->params->num : 0;
|
||||
$type = isset($this->params->type) ? $this->params->type : 'all';
|
||||
$pager = pager::init(0, $num, 1);
|
||||
$this->view->projectStats = $this->loadModel('project')->getProjectStats($type, $productID = 0, $branch = 0, $itemCounts = 30, $orderBy = 'order_desc', $this->viewType != 'json' ? $pager : '');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -207,13 +207,13 @@ class customModel extends model
|
||||
if(isset($item['fixed'])) $fixed = $item['fixed'];
|
||||
}
|
||||
|
||||
$hidden = !$fixed && $isSetMenuConfig && $menuConfigMap[$name] && isset($menuConfigMap[$name]->hidden) && $menuConfigMap[$name]->hidden;
|
||||
$hidden = !$fixed && $isSetMenuConfig && isset($menuConfigMap[$name]) && isset($menuConfigMap[$name]->hidden) && $menuConfigMap[$name]->hidden;
|
||||
|
||||
$menuItem = new stdclass();
|
||||
$menuItem->name = $name;
|
||||
$menuItem->link = $itemLink;
|
||||
$menuItem->text = $label;
|
||||
$menuItem->order = $fixed ? 0 : ($isSetMenuConfig && $menuConfigMap[$name] && isset($menuConfigMap[$name]->order) ? $menuConfigMap[$name]->order : $order++);
|
||||
$menuItem->order = $fixed ? 0 : ($isSetMenuConfig && isset($menuConfigMap[$name]) && isset($menuConfigMap[$name]->order) ? $menuConfigMap[$name]->order : $order++);
|
||||
if($float) $menuItem->float = $float;
|
||||
if($fixed) $menuItem->fixed = $fixed;
|
||||
if($hidden) $menuItem->hidden = $hidden;
|
||||
@@ -277,10 +277,10 @@ class customModel extends model
|
||||
$app->loadLang($module);
|
||||
|
||||
$configKey = 'feature_' . $module . '_' . $method;
|
||||
$menuConfig = $config->menucustom->$configKey;
|
||||
$allMenu = isset($lang->$module->featurebar[$method]) ? $lang->$module->featurebar[$method] : null;
|
||||
$menuConfig = '';
|
||||
if(isset($config->menucustom->$configKey)) $menuConfig = $config->menucustom->$configKey;
|
||||
if(!empty($menuConfig)) $menuConfig = json_decode($menuConfig);
|
||||
$allMenu = $lang->$module->featurebar[$method];
|
||||
|
||||
return $allMenu ? self::buildMenuConfig($allMenu, $menuConfig) : null;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user