Merge branch 'master' of https://gitlab.zcorp.cc/easycorp/zentaopms into release/zentaopms_18.3
This commit is contained in:
@@ -48,7 +48,7 @@ $lang->mainNav->admin = "{$lang->navIcons['admin']} {$lang->admin->common}|a
|
||||
|
||||
$lang->dividerMenu = ',kanban,oa,admin,';
|
||||
|
||||
$lang->mainNav->menuOrder[5] = 'my';
|
||||
$lang->mainNav->menuOrder[5] = 'my';
|
||||
$lang->mainNav->menuOrder[10] = 'program';
|
||||
$lang->mainNav->menuOrder[15] = 'product';
|
||||
$lang->mainNav->menuOrder[20] = 'project';
|
||||
|
||||
@@ -1054,6 +1054,27 @@ class commonModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
/* Check whether the menu of this group have permissions. If yes, point to them. */
|
||||
if($display == false and isset($lang->$group->menu))
|
||||
{
|
||||
foreach($lang->$group->menu as $menu)
|
||||
{
|
||||
if(!isset($menu['link'])) continue;
|
||||
|
||||
$linkPart = explode('|', $menu['link']);
|
||||
if(count($linkPart) < 3) continue;
|
||||
list($label, $module, $method) = $linkPart;
|
||||
|
||||
if(common::hasPriv($module, $method))
|
||||
{
|
||||
$display = true;
|
||||
$currentModule = $module;
|
||||
$currentMethod = $method;
|
||||
if(!isset($menu['target'])) break; // Try to jump to the method without opening a new window.
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!$display) continue;
|
||||
|
||||
/* Assign vars. */
|
||||
|
||||
+10
-10
@@ -55,13 +55,6 @@ class screenModel extends model
|
||||
*/
|
||||
public function getByID($screenID, $year = '', $dept = '', $account = '')
|
||||
{
|
||||
$this->filter = new stdclass();
|
||||
$this->filter->screen = $screenID;
|
||||
$this->filter->year = $year;
|
||||
$this->filter->dept = $dept;
|
||||
$this->filter->account = $account;
|
||||
$this->filter->charts = array();
|
||||
|
||||
$screen = $this->dao->select('*')->from(TABLE_SCREEN)->where('id')->eq($screenID)->fetch();
|
||||
if(!isset($screen->scheme) or empty($screen->scheme)) $screen->scheme = file_get_contents(__DIR__ . '/json/screen.json');
|
||||
$screen->chartData = $this->genChartData($screen, $year, $dept, $account);
|
||||
@@ -73,14 +66,21 @@ class screenModel extends model
|
||||
* Generate chartData of screen.
|
||||
*
|
||||
* @param object $screen
|
||||
* @param int $year
|
||||
* @param int $dept
|
||||
* @param string $year
|
||||
* @param string $dept
|
||||
* @param string $account
|
||||
* @access public
|
||||
* @return object
|
||||
*/
|
||||
public function genChartData($screen)
|
||||
public function genChartData($screen, $year, $dept, $account)
|
||||
{
|
||||
$this->filter = new stdclass();
|
||||
$this->filter->screen = $screen->id;
|
||||
$this->filter->year = $year;
|
||||
$this->filter->dept = $dept;
|
||||
$this->filter->account = $account;
|
||||
$this->filter->charts = array();
|
||||
|
||||
$config = new stdclass();
|
||||
$config->width = 1300;
|
||||
$config->height = 1080;
|
||||
|
||||
Reference in New Issue
Block a user