* Drop no menu module.
This commit is contained in:
@@ -53,7 +53,6 @@ class bug extends control
|
||||
{
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
$this->lang->noMenuModule[] = $this->app->rawModule;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -911,8 +910,6 @@ class bug extends control
|
||||
}
|
||||
|
||||
$this->loadModel('my')->setMenu();
|
||||
$moduleIndex = array_search('bug', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
$this->lang->task->menu = $this->lang->my->menu->work;
|
||||
$this->lang->my->menu->work['subModule'] = 'bug';
|
||||
|
||||
|
||||
@@ -18,19 +18,9 @@ class ciModel extends model
|
||||
public function setMenu()
|
||||
{
|
||||
$repoID = $this->session->repoID;
|
||||
$projectID = isset($_GET['project']) ? $_GET['project'] : 0;
|
||||
$moduleName = $this->app->getModuleName();
|
||||
foreach($this->lang->{$moduleName}->menu as $key => $menu) common::setMenuVars($this->lang->{$moduleName}->menu, $key, $repoID);
|
||||
$this->lang->{$moduleName}->menuOrder = $this->lang->ci->menuOrder;
|
||||
if(!$projectID)
|
||||
{
|
||||
$this->lang->navGroup->repo = 'repo';
|
||||
$this->lang->navGroup->jenkins = 'repo';
|
||||
$this->lang->navGroup->job = 'repo';
|
||||
$this->lang->navGroup->compile = 'repo';
|
||||
$this->lang->noMenuModule[] = 'job';
|
||||
$this->lang->noMenuModule[] = 'compile';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -148,8 +148,6 @@ class company extends control
|
||||
*/
|
||||
public function view()
|
||||
{
|
||||
$this->lang->noMenuModule[] = 'company';
|
||||
|
||||
$this->company->setMenu();
|
||||
$this->view->title = $this->lang->company->common . $this->lang->colon . $this->lang->company->view;
|
||||
$this->view->position[] = $this->lang->company->view;
|
||||
@@ -170,8 +168,6 @@ class company extends control
|
||||
*/
|
||||
public function dynamic($browseType = 'today', $param = '', $recTotal = 0, $date = '', $direction = 'next')
|
||||
{
|
||||
$this->lang->noMenuModule[] = 'company';
|
||||
|
||||
$this->company->setMenu();
|
||||
$this->app->loadLang('user');
|
||||
$this->app->loadLang('execution');
|
||||
|
||||
@@ -347,14 +347,6 @@ class custom extends control
|
||||
*/
|
||||
public function browseStoryConcept()
|
||||
{
|
||||
/* Process menu.*/
|
||||
$this->app->loadLang('custom');
|
||||
$this->lang->custom->menu = $this->lang->subject->menu;
|
||||
$this->lang->navGroup->custom = 'admin';
|
||||
$this->lang->admin->menu->model['subModule'] .= ',custom';
|
||||
$key = array_search('custom', $this->lang->noMenuModule);
|
||||
if($key !== false) unset($this->lang->noMenuModule[$key]);
|
||||
|
||||
$this->view->title = $this->lang->custom->browseStoryConcept;
|
||||
$this->view->position[] = $this->lang->custom->browseStoryConcept;
|
||||
$this->view->URSRList = $this->custom->getURSRList();
|
||||
|
||||
+9
-53
@@ -113,17 +113,11 @@ class doc extends control
|
||||
/* According the from, set menus. */
|
||||
if($from == 'product')
|
||||
{
|
||||
$this->lang->doc->menuOrder = $this->lang->product->menuOrder;
|
||||
$this->product->setMenu($this->product->getPairs(), $productID);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($productID);
|
||||
$this->lang->noMenuModule[] = 'doc';
|
||||
$this->product->setMenu($productID);
|
||||
}
|
||||
elseif($from == 'project')
|
||||
{
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $lib->project);
|
||||
$this->project->setMenu($lib->project);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -342,22 +336,13 @@ class doc extends control
|
||||
/* According the from, set menus. */
|
||||
if($this->from == 'product')
|
||||
{
|
||||
$this->lang->navGroup->doc = 'product';
|
||||
$this->lang->doc->menu = $this->lang->product->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->product->menuOrder;
|
||||
$this->product->setMenu($this->product->getPairs(), $lib->product);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($lib->product);
|
||||
$this->lang->noMenuModule[] = 'doc';
|
||||
$this->product->setMenu($lib->product);
|
||||
|
||||
$this->lang->TRActions = common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), "<i class='icon icon-plus'></i> " . $this->lang->doc->createlib, '', "class='btn btn-secondary iframe' data-width='70%'") : '';
|
||||
}
|
||||
elseif($this->from == 'project')
|
||||
{
|
||||
$this->lang->navGroup->doc = 'project';
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $lib->project);
|
||||
$this->project->setMenu($lib->project);
|
||||
|
||||
$this->lang->TRActions = common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib'), "<i class='icon icon-plus'></i> " . $this->lang->doc->createlib, '', "class='btn btn-secondary iframe' data-width='70%'") : '';
|
||||
}
|
||||
@@ -427,21 +412,11 @@ class doc extends control
|
||||
/* According the from, set menus. */
|
||||
if($this->from == 'product')
|
||||
{
|
||||
$objectID = $lib->product;
|
||||
$this->lang->navGroup->doc = 'product';
|
||||
$this->lang->doc->menuOrder = $this->lang->product->menuOrder;
|
||||
$this->product->setMenu($this->product->getPairs(), $objectID);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
|
||||
$this->lang->noMenuModule[] = 'doc';
|
||||
$this->product->setMenu($lib->product);
|
||||
}
|
||||
elseif($this->from == 'project')
|
||||
{
|
||||
$objectID = $lib->project;
|
||||
$this->lang->navGroup->doc = 'project';
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getExecutionsByProject($this->session->project, 'all', 0, true), $objectID);
|
||||
$this->project->setMenu($lib->project);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -499,21 +474,11 @@ class doc extends control
|
||||
/* According the from, set menus. */
|
||||
if($this->from == 'product')
|
||||
{
|
||||
$objectID = $lib->product;
|
||||
$this->lang->navGroup->doc = 'product';
|
||||
$this->lang->doc->menuOrder = $this->lang->product->menuOrder;
|
||||
$this->product->setMenu($this->product->getPairs(), $objectID);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
|
||||
$this->lang->noMenuModule[] = 'doc';
|
||||
$this->product->setMenu($lib->product);
|
||||
}
|
||||
elseif($this->from == 'project')
|
||||
{
|
||||
$objectID = $lib->project;
|
||||
$this->lang->navGroup->doc = 'project';
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($this->project->getPairs($this->session->project, 'all', 0, true), $objectID);
|
||||
$this->project->setMenu($lib->project);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -828,18 +793,10 @@ class doc extends control
|
||||
/* According the from, set menus. */
|
||||
if($this->from == 'product')
|
||||
{
|
||||
$this->lang->navGroup->doc = 'product';
|
||||
$this->lang->doc->menuOrder = $this->lang->product->menuOrder;
|
||||
$this->product->setMenu($this->product->getPairs(), $objectID);
|
||||
$this->lang->product->switcherMenu = $this->product->getSwitcher($objectID);
|
||||
$this->lang->noMenuModule[] = 'doc';
|
||||
$this->product->setMenu($lib->product);
|
||||
}
|
||||
elseif($this->from == 'project')
|
||||
{
|
||||
$this->lang->navGroup->doc = 'project';
|
||||
$this->lang->doc->menu = $this->lang->project->menu;
|
||||
$this->lang->doc->menuOrder = $this->lang->project->menuOrder;
|
||||
if($this->config->systemMode == 'classic') $this->lang->noMenuModule[] = 'doc';
|
||||
$this->project->setMenu($objectID);
|
||||
}
|
||||
else
|
||||
@@ -921,7 +878,6 @@ class doc extends control
|
||||
$table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT;
|
||||
$object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch();
|
||||
if(empty($object)) $this->locate($this->createLink($type, 'create', '', '', '', $this->session->project));
|
||||
$this->lang->noMenuModule[] = 'doc';
|
||||
|
||||
$from = $this->app->openApp;
|
||||
if($from == 'doc')
|
||||
|
||||
+34
-2
@@ -1232,7 +1232,7 @@ class docModel extends model
|
||||
*/
|
||||
public function getLibsByObject($type, $objectID, $mode = '')
|
||||
{
|
||||
if($type != 'product' and $type != 'execution') return false;
|
||||
if($type != 'product' and $type != 'project' and $type != 'execution') return false;
|
||||
$objectLibs = $this->dao->select('*')->from(TABLE_DOCLIB)->where('deleted')->eq(0)->andWhere($type)->eq($objectID)->orderBy('`order`, id')->fetchAll('id');
|
||||
|
||||
if($type == 'product')
|
||||
@@ -1318,7 +1318,7 @@ class docModel extends model
|
||||
*/
|
||||
public function getLibFiles($type, $objectID, $orderBy, $pager = null)
|
||||
{
|
||||
if($type != 'execution' and $type != 'product') return true;
|
||||
if($type != 'execution' and $type != 'project' and $type != 'product') return true;
|
||||
$this->loadModel('file');
|
||||
$docs = $this->dao->select('*')->from(TABLE_DOC)->where($type)->eq($objectID)->fetchAll('id');
|
||||
foreach($docs as $id => $doc)
|
||||
@@ -1383,6 +1383,38 @@ class docModel extends model
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
}
|
||||
elseif($type == 'project')
|
||||
{
|
||||
$executionIdList = $this->loadModel('execution')->getIdList($objectID);
|
||||
$taskPairs = $this->dao->select('id')->from(TABLE_TASK)->where('execution')->in($executionIdList)->andWhere('deleted')->eq('0')->andWhere('execution')->in($this->app->user->view->sprints)->fetchPairs('id');
|
||||
$taskIdList = 0;
|
||||
if(!empty($taskPairs))
|
||||
{
|
||||
$taskIdList = array_keys($taskPairs);
|
||||
$taskIdList = implode(',', $taskIdList);
|
||||
}
|
||||
|
||||
$buildPairs = $this->dao->select('id')->from(TABLE_BUILD)->where('execution')->in($executionIdList)->andWhere('deleted')->eq('0')->andWhere('execution')->in($this->app->user->view->sprints)->fetchPairs('id');
|
||||
$buildIdList = 0;
|
||||
if(!empty($buildPairs))
|
||||
{
|
||||
$buildIdList = array_keys($buildPairs);
|
||||
$buildIdList = implode(',', $buildIdList);
|
||||
}
|
||||
|
||||
$executionIdList = join(',', $executionIdList);
|
||||
$files = $this->dao->select('*')->from(TABLE_FILE)->alias('t1')
|
||||
->where('size')->gt('0')
|
||||
->andWhere("(objectType = 'execution' and objectID in ($executionIdList))", true)
|
||||
->orWhere("(objectType = 'doc' and objectID in ($docIdList))")
|
||||
->orWhere("(objectType = 'task' and objectID in ($taskIdList))")
|
||||
->orWhere("(objectType = 'build' and objectID in ($buildIdList))")
|
||||
->markRight(1)
|
||||
->beginIF($searchTitle)->andWhere('title')->like("%{$searchTitle}%")->fi()
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
}
|
||||
elseif($type == 'execution')
|
||||
{
|
||||
$taskPairs = $this->dao->select('id')->from(TABLE_TASK)->where('execution')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('execution')->in($this->app->user->view->sprints)->fetchPairs('id');
|
||||
|
||||
@@ -265,7 +265,6 @@ class execution extends control
|
||||
*/
|
||||
public function grouptask($executionID = 0, $groupBy = 'story', $filter = '')
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
$execution = $this->commonAction($executionID);
|
||||
$executionID = $execution->id;
|
||||
|
||||
@@ -826,7 +825,6 @@ class execution extends control
|
||||
*/
|
||||
public function qa($executionID = 0)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
$this->commonAction($executionID);
|
||||
$this->view->title = $this->lang->execution->qa;
|
||||
$this->display();
|
||||
@@ -848,8 +846,6 @@ class execution extends control
|
||||
*/
|
||||
public function bug($executionID = 0, $orderBy = 'status,id_desc', $build = 0, $type = 'all', $param = 0, $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
/* Load these two models. */
|
||||
$this->loadModel('bug');
|
||||
$this->loadModel('user');
|
||||
@@ -924,7 +920,6 @@ class execution extends control
|
||||
{
|
||||
$this->loadModel('testcase');
|
||||
$this->loadModel('testtask');
|
||||
$this->showModuleMenu();
|
||||
$this->commonAction($executionID);
|
||||
|
||||
$products = $this->execution->getProducts($executionID);
|
||||
@@ -1024,8 +1019,6 @@ class execution extends control
|
||||
*/
|
||||
public function testtask($executionID = 0, $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
$this->loadModel('testtask');
|
||||
/* Save session. */
|
||||
$this->session->set('testtaskList', $this->app->getURI(true), 'qa');
|
||||
@@ -1148,9 +1141,6 @@ class execution extends control
|
||||
*/
|
||||
public function team($executionID = 0)
|
||||
{
|
||||
$moduleIndex = array_search('execution', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
$execution = $this->commonAction($executionID);
|
||||
$executionID = $execution->id;
|
||||
|
||||
@@ -1318,8 +1308,6 @@ class execution extends control
|
||||
*/
|
||||
public function edit($executionID, $action = 'edit', $extra = '')
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
/* Load language files and get browseExecutionLink. */
|
||||
$this->app->loadLang('program');
|
||||
$this->app->loadLang('stage');
|
||||
@@ -1712,8 +1700,6 @@ class execution extends control
|
||||
*/
|
||||
public function view($executionID)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
$execution = $this->execution->getById($executionID, true);
|
||||
if(empty($execution) || strpos('stage,sprint', $execution->type) === false) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
@@ -1826,8 +1812,6 @@ class execution extends control
|
||||
*/
|
||||
public function tree($executionID, $type = 'task')
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
$this->execution->setMenu($this->executions, $executionID);
|
||||
$execution = $this->loadModel('execution')->getById($executionID);
|
||||
$tree = $this->execution->getTree($executionID);
|
||||
@@ -2057,9 +2041,6 @@ class execution extends control
|
||||
*/
|
||||
public function manageProducts($executionID, $from = '')
|
||||
{
|
||||
$moduleIndex = array_search('execution', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
/* use first execution if executionID does not exist. */
|
||||
if(!isset($this->executions[$executionID])) $executionID = key($this->executions);
|
||||
|
||||
@@ -2149,8 +2130,6 @@ class execution extends control
|
||||
*/
|
||||
public function manageMembers($executionID = 0, $team2Import = 0, $dept = 0)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->execution->manageMembers($executionID);
|
||||
@@ -2724,9 +2703,6 @@ class execution extends control
|
||||
*/
|
||||
public function whitelist($executionID = 0, $module='execution', $objectType = 'sprint', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$moduleIndex = array_search('execution', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
/* use first execution if executionID does not exist. */
|
||||
if(!isset($this->executions[$executionID])) $executionID = key($this->executions);
|
||||
|
||||
@@ -2746,8 +2722,6 @@ class execution extends control
|
||||
*/
|
||||
public function addWhitelist($executionID = 0, $deptID = 0)
|
||||
{
|
||||
$this->showModuleMenu();
|
||||
|
||||
/* use first execution if executionID does not exist. */
|
||||
if(!isset($this->executions[$executionID])) $executionID = key($this->executions);
|
||||
|
||||
@@ -3025,16 +2999,4 @@ class execution extends control
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Show module menu for some module.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function showModuleMenu()
|
||||
{
|
||||
$moduleIndex = array_search('execution', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,9 +86,6 @@ class my extends control
|
||||
*/
|
||||
public function work($mode = 'task', $type = 'assignedTo', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$moduleIndex = array_search('my', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
echo $this->fetch('my', $mode, "type=$type&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
}
|
||||
|
||||
@@ -106,9 +103,6 @@ class my extends control
|
||||
*/
|
||||
public function contribute($mode = 'task', $type = 'openedBy', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
$moduleIndex = array_search('my', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
if(($mode == 'issue' or $mode == 'risk') and $type == 'openedBy') $type = 'createdBy';
|
||||
|
||||
echo $this->fetch('my', $mode, "type=$type&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID");
|
||||
|
||||
@@ -107,12 +107,6 @@ class personnel extends control
|
||||
$this->loadModel('project')->setMenu($objectID);
|
||||
}
|
||||
|
||||
if($module == 'product')
|
||||
{
|
||||
$moduleIndex = array_search('product', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
}
|
||||
|
||||
/* Load lang and set session. */
|
||||
$this->app->loadLang('user');
|
||||
$this->app->session->set('whitelistBrowse', $this->app->getURI(true));
|
||||
|
||||
@@ -450,9 +450,6 @@ class product extends control
|
||||
$productID = $this->product->saveState($productID, $this->products);
|
||||
$this->product->setMenu($productID);
|
||||
|
||||
$moduleIndex = array_search('product', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
if($programID)
|
||||
{
|
||||
$this->lang->program->switcherMenu = $this->loadModel('program')->getSwitcher($programID, true);
|
||||
@@ -617,9 +614,6 @@ class product extends control
|
||||
$product = $this->product->getStatByID($productID);
|
||||
if(!$product) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$moduleIndex = array_search('product', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
$product->desc = $this->loadModel('file')->setImgSize($product->desc);
|
||||
$this->product->setMenu($productID);
|
||||
|
||||
@@ -1000,9 +994,6 @@ class product extends control
|
||||
/* The secondary test menu processing in the project. */
|
||||
if(in_array($fromModule, array('qa', 'bug', 'testtask', 'testreport')))
|
||||
{
|
||||
$moduleIndex = array_search('product', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
$menu = $this->lang->qa->menu->$activeMenu;
|
||||
$menu['subModule'] = 'product';
|
||||
$this->lang->qa->menu->$activeMenu = $menu;
|
||||
@@ -1113,8 +1104,6 @@ class product extends control
|
||||
public function addWhitelist($productID = 0, $deptID = 0, $branch = '')
|
||||
{
|
||||
$this->product->setMenu($productID, $branch);
|
||||
$moduleIndex = array_search('product', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
$this->lang->modulePageNav = '';
|
||||
|
||||
echo $this->fetch('personnel', 'addWhitelist', "objectID=$productID&dept=$deptID&objectType=product&module=product");
|
||||
|
||||
@@ -206,7 +206,6 @@ class project extends control
|
||||
*/
|
||||
public function browse($programID = 0, $browseType = 'doing', $param = 0, $orderBy = 'order_asc', $recTotal = 0, $recPerPage = 15, $pageID = 1)
|
||||
{
|
||||
$this->lang->noMenuModule[] = 'project';
|
||||
if($this->session->moreProjectLink) $this->lang->project->mainMenuAction = html::a($this->session->moreProjectLink, '<i class="icon icon-back"></i> ' . $this->lang->goback, '', "class='btn btn-link'");
|
||||
$this->app->session->set('projectBrowse', $this->app->getURI(true));
|
||||
$this->loadModel('datatable');
|
||||
@@ -294,8 +293,6 @@ class project extends control
|
||||
|
||||
if($programID) $this->program->setMenu($programID);
|
||||
|
||||
$this->lang->noMenuModule[] = 'project';
|
||||
|
||||
$name = '';
|
||||
$code = '';
|
||||
$team = '';
|
||||
@@ -493,8 +490,6 @@ class project extends control
|
||||
{
|
||||
$this->project->setMenu($projectID);
|
||||
$this->app->loadLang('bug');
|
||||
$moduleIndex = array_search('project', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
$this->app->session->set('projectBrowse', $this->app->getURI(true));
|
||||
|
||||
@@ -538,9 +533,6 @@ class project extends control
|
||||
{
|
||||
$this->project->setMenu($projectID);
|
||||
|
||||
$moduleIndex = array_search('project', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
$title = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->browse;
|
||||
$position[] = $this->lang->group->browse;
|
||||
|
||||
@@ -914,11 +906,6 @@ class project extends control
|
||||
*/
|
||||
public function manageView($groupID, $projectID, $programID)
|
||||
{
|
||||
$this->lang->navGroup->project = 'project';
|
||||
$this->lang->project->menu = $this->lang->scrum->setMenu;
|
||||
$moduleIndex = array_search('project', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$this->group->updateView($groupID);
|
||||
@@ -952,11 +939,6 @@ class project extends control
|
||||
*/
|
||||
public function managePriv($type = 'byGroup', $param = 0, $menu = '', $version = '')
|
||||
{
|
||||
$this->lang->navGroup->project = 'project';
|
||||
$this->lang->project->menu = $this->lang->scrum->setMenu;
|
||||
$moduleIndex = array_search('project', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
if($type == 'byGroup')
|
||||
{
|
||||
$groupID = $param;
|
||||
@@ -1024,9 +1006,6 @@ class project extends control
|
||||
{
|
||||
$this->project->setMenu($projectID);
|
||||
|
||||
$moduleIndex = array_search('project', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->execution->manageMembers($projectID);
|
||||
@@ -1386,13 +1365,7 @@ class project extends control
|
||||
*/
|
||||
public function whitelist($projectID = 0, $module = 'project', $from = 'project', $objectType = 'project', $orderBy = 'id_desc', $recTotal = 0, $recPerPage = 20, $pageID = 1)
|
||||
{
|
||||
if($from == 'project')
|
||||
{
|
||||
$this->project->setMenu($projectID);
|
||||
|
||||
$moduleIndex = array_search('project', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
}
|
||||
if($from == 'project') $this->project->setMenu($projectID);
|
||||
|
||||
echo $this->fetch('personnel', 'whitelist', "objectID=$projectID&module=$module&browseType=$objectType&orderBy=$orderBy&recTotal=$recTotal&recPerPage=$recPerPage&pageID=$pageID&projectID=$projectID&from=$from");
|
||||
}
|
||||
|
||||
@@ -19,8 +19,6 @@ class qa extends control
|
||||
*/
|
||||
public function index($locate = 'auto', $productID = 0, $projectID = 0)
|
||||
{
|
||||
if($this->app->openApp == 'qa') $this->lang->noMenuModule[] = 'qa';
|
||||
|
||||
$products = $this->loadModel('product')->getProductPairsByProject($projectID, 'noclosed');
|
||||
if(empty($products)) die($this->locate($this->createLink('product', 'showErrorNone', 'fromModule=qa&moduleGroup=' . $this->lang->navGroup->qa . '&activeMenu=index')));
|
||||
if($locate == 'yes') $this->locate($this->createLink('bug', 'browse'));
|
||||
|
||||
@@ -115,7 +115,6 @@ class repo extends control
|
||||
|
||||
$this->commonAction($objectID);
|
||||
|
||||
array_push($this->lang->noMenuModule, 'repo');
|
||||
$this->app->loadLang('action');
|
||||
$this->repo->setMenu($this->repos, '', false);
|
||||
|
||||
@@ -758,7 +757,6 @@ class repo extends control
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => inlink('setRules')));
|
||||
}
|
||||
|
||||
array_push($this->lang->noMenuModule, 'repo');
|
||||
$this->repo->setMenu($this->repos, $this->session->repoID, false);
|
||||
|
||||
$this->app->loadLang('task');
|
||||
|
||||
@@ -32,12 +32,6 @@ class report extends control
|
||||
/* Set report menu group. */
|
||||
$this->projectID = isset($_GET['project']) ? $_GET['project'] : 0;
|
||||
if(!$this->projectID) $this->lang->navGroup->report = 'report';
|
||||
if($this->lang->navGroup->report == 'project' && isset($this->config->maxVersion))
|
||||
{
|
||||
$index = array_search('report', $this->lang->noMenuModule);
|
||||
unset($this->lang->noMenuModule[$index]);
|
||||
$this->lang->report->menu = $this->lang->report->projectMenu;
|
||||
}
|
||||
|
||||
if((isset($this->config->proVersion) || isset($this->config->bizVersion)) && $this->lang->navGroup->report == 'report' && common::hasPriv('report', 'custom')) $this->lang->report->mainMenuAction = html::a(helper::createLink('report', 'custom'), $this->lang->crystal->custom, '', "class='btn btn-link'");
|
||||
}
|
||||
|
||||
@@ -648,14 +648,7 @@ class story extends control
|
||||
elseif($executionID)
|
||||
{
|
||||
/* The stories of a execution. */
|
||||
$this->lang->navGroup->story = 'execution';
|
||||
$moduleIndex = array_search('story', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
$this->lang->story->menu = $this->lang->execution->menu;
|
||||
|
||||
$this->execution->setMenu($this->execution->getPairs($this->session->project, 'all', 'nodeleted'), $executionID);
|
||||
$this->lang->story->menuOrder = $this->lang->execution->menuOrder;
|
||||
|
||||
$this->execution->setMenu($executionID);
|
||||
$execution = $this->execution->getByID($executionID);
|
||||
|
||||
$branchProduct = false;
|
||||
@@ -1464,10 +1457,6 @@ class story extends control
|
||||
$this->session->set('productList', $this->app->getURI(true));
|
||||
$products = $this->product->getPairs();
|
||||
|
||||
$this->lang->navGroup->story = $from;
|
||||
$moduleIndex = array_search('story', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
|
||||
if($from == 'qa')
|
||||
{
|
||||
$this->loadModel('qa');
|
||||
|
||||
@@ -476,9 +476,6 @@ class task extends control
|
||||
{
|
||||
/* Set my menu. */
|
||||
$this->loadModel('my')->setMenu();
|
||||
$moduleIndex = array_search('task', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
$this->lang->task->menu = $this->lang->my->menu->work;
|
||||
$this->lang->my->menu->work['subModule'] = 'task';
|
||||
|
||||
$this->view->position[] = html::a($this->createLink('my', 'task'), $this->lang->my->task);
|
||||
|
||||
@@ -46,7 +46,6 @@ class testcase extends control
|
||||
{
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
//$this->lang->noMenuModule[] = $this->app->rawModule;
|
||||
}
|
||||
elseif($this->app->openApp == 'project')
|
||||
{
|
||||
|
||||
@@ -43,7 +43,6 @@ class testtask extends control
|
||||
{
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
//$this->lang->noMenuModule[] = $this->app->rawModule;
|
||||
}
|
||||
elseif($this->app->openApp == 'project')
|
||||
{
|
||||
|
||||
+2
-18
@@ -77,15 +77,9 @@ class tree extends control
|
||||
if($viewType == 'story')
|
||||
{
|
||||
/* Set menu.*/
|
||||
$moduleIndex = array_search('tree', $this->lang->noMenuModule);
|
||||
if($moduleIndex !== false) unset($this->lang->noMenuModule[$moduleIndex]);
|
||||
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($rootID, 'story');
|
||||
|
||||
$products = $this->product->getPairs();
|
||||
|
||||
$this->product->saveState($rootID, $products);
|
||||
$this->product->setMenu($products, $rootID, $branch, 'story', '', 'story');
|
||||
$this->lang->tree->menu = $this->lang->product->setMenu;
|
||||
$this->product->setMenu($rootID);
|
||||
|
||||
unset($products[$rootID]);
|
||||
$currentProduct = key($products);
|
||||
@@ -110,8 +104,6 @@ class tree extends control
|
||||
}
|
||||
elseif($from == 'qa')
|
||||
{
|
||||
$this->lang->noMenuModule[] = 'tree';
|
||||
$this->lang->navGroup->tree = 'qa';
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
$productPairs = $this->product->getPairs();
|
||||
@@ -127,9 +119,6 @@ class tree extends control
|
||||
}
|
||||
elseif($viewType == 'feedback')
|
||||
{
|
||||
$this->lang->navGroup->tree = 'feedback';
|
||||
$this->lang->noMenuModule[] = 'tree';
|
||||
|
||||
$this->app->loadLang('feedback');
|
||||
$this->lang->tree->menu = $this->lang->feedback->menu;
|
||||
$root = new stdclass();
|
||||
@@ -151,7 +140,6 @@ class tree extends control
|
||||
}
|
||||
elseif($from == 'qa')
|
||||
{
|
||||
$this->lang->noMenuModule[] = 'tree';
|
||||
$this->lang->navGroup->tree = 'qa';
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
@@ -175,7 +163,6 @@ class tree extends control
|
||||
}
|
||||
elseif($from == 'qa')
|
||||
{
|
||||
$this->lang->noMenuModule[] = 'tree';
|
||||
$this->lang->navGroup->tree = 'qa';
|
||||
$this->app->loadConfig('qa');
|
||||
foreach($this->config->qa->menuList as $module) $this->lang->navGroup->$module = 'qa';
|
||||
@@ -196,14 +183,11 @@ class tree extends control
|
||||
if($from == 'product')
|
||||
{
|
||||
$productID = $lib->product;
|
||||
$this->lang->noMenuModule[] = 'tree';
|
||||
unset($this->lang->product->menu->set['subModule']);
|
||||
$this->lang->navGroup->tree = 'product';
|
||||
$this->lang->product->switcherMenu = $this->loadModel('product')->getSwitcher($productID, 'story');
|
||||
|
||||
$products = $this->product->getPairs();
|
||||
$this->product->saveState($productID, $products);
|
||||
$this->product->setMenu($products, $productID, $branch);
|
||||
$this->product->setMenu($productID, $branch);
|
||||
}
|
||||
elseif($from == 'project')
|
||||
{
|
||||
|
||||
@@ -79,9 +79,6 @@ class user extends control
|
||||
$date = (int)$type == 0 ? helper::today() : $type;
|
||||
$users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid');
|
||||
|
||||
/* Change the menu when in my module. */
|
||||
$this->user->resetMenu();
|
||||
|
||||
/* set menus. */
|
||||
$this->view->userList = $this->user->setUserList($users, $userID);
|
||||
|
||||
@@ -124,11 +121,6 @@ class user extends control
|
||||
$account = $user->account;
|
||||
$users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid');
|
||||
|
||||
/* Set menu. */
|
||||
|
||||
/* Change the menu when in my module. */
|
||||
$this->user->resetMenu();
|
||||
|
||||
/* Modify story title. */
|
||||
$this->loadModel('story');
|
||||
if($storyType == 'requirement') $this->lang->story->title = str_replace($this->lang->SRCommon, $this->lang->URCommon, $this->lang->story->title);
|
||||
@@ -175,9 +167,6 @@ class user extends control
|
||||
/* Set the menu. */
|
||||
$this->view->userList = $this->user->setUserList($users, $userID);
|
||||
|
||||
/* Change the menu when in my module. */
|
||||
$this->user->resetMenu();
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->task;
|
||||
$this->view->position[] = $this->lang->user->task;
|
||||
@@ -222,9 +211,6 @@ class user extends control
|
||||
/* Load the lang of bug module. */
|
||||
$this->app->loadLang('bug');
|
||||
|
||||
/* Change the menu when in my module. */
|
||||
$this->user->resetMenu();
|
||||
|
||||
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->bug;
|
||||
$this->view->position[] = $this->lang->user->bug;
|
||||
$this->view->tabID = 'bug';
|
||||
@@ -270,9 +256,6 @@ class user extends control
|
||||
/* Append id for secend sort. */
|
||||
$sort = $this->loadModel('common')->appendOrder($orderBy);
|
||||
|
||||
/* Change the menu when in my module. */
|
||||
$this->user->resetMenu();
|
||||
|
||||
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->testTask;
|
||||
$this->view->position[] = $this->lang->user->testTask;
|
||||
$this->view->tasks = $this->loadModel('testtask')->getByUser($account, $pager, $sort);
|
||||
@@ -315,11 +298,6 @@ class user extends control
|
||||
/* Append id for secend sort. */
|
||||
$sort = $this->loadModel('common')->appendOrder($orderBy);
|
||||
|
||||
/* Set menu. */
|
||||
|
||||
/* Change the menu when in my module. */
|
||||
$this->user->resetMenu();
|
||||
|
||||
$cases = array();
|
||||
if($type == 'case2Him')
|
||||
{
|
||||
@@ -376,9 +354,6 @@ class user extends control
|
||||
$this->loadModel('project');
|
||||
$this->view->userList = $this->user->setUserList($users, $userID);
|
||||
|
||||
/* Change the menu when in my module. */
|
||||
$this->user->resetMenu();
|
||||
|
||||
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->execution;
|
||||
$this->view->position[] = $this->lang->user->execution;
|
||||
$this->view->tabID = 'project';
|
||||
@@ -418,9 +393,6 @@ class user extends control
|
||||
/* Set the menus. */
|
||||
$this->view->userList = $this->user->setUserList($users, $userID);
|
||||
|
||||
/* Change the menu when in my module. */
|
||||
$this->user->resetMenu();
|
||||
|
||||
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->issue;
|
||||
$this->view->position[] = $this->lang->user->issue;
|
||||
$this->view->issues = $this->loadModel('issue')->getUserIssues($type, $account, $orderBy, $pager);
|
||||
@@ -461,9 +433,6 @@ class user extends control
|
||||
/* Set the menus. */
|
||||
$this->view->userList = $this->user->setUserList($users, $userID);
|
||||
|
||||
/* Change the menu when in my module. */
|
||||
$this->user->resetMenu();
|
||||
|
||||
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->risk;
|
||||
$this->view->position[] = $this->lang->user->risk;
|
||||
$this->view->risks = $this->loadModel('risk')->getUserRisks($type, $account, $orderBy, $pager);
|
||||
@@ -490,9 +459,6 @@ class user extends control
|
||||
$account = $user->account;
|
||||
$users = $this->loadModel('dept')->getDeptUserPairs($user->dept, 'useid');
|
||||
|
||||
/* Change the menu when in my module. */
|
||||
$this->user->resetMenu();
|
||||
|
||||
$this->view->title = "USER #$user->id $user->account/" . $this->lang->user->profile;
|
||||
$this->view->position[] = $this->lang->user->common;
|
||||
$this->view->position[] = $this->lang->user->profile;
|
||||
@@ -1116,9 +1082,6 @@ class user extends control
|
||||
$sort = $this->loadModel('common')->appendOrder($orderBy);
|
||||
$date = empty($date) ? '' : date('Y-m-d', $date);
|
||||
|
||||
/* Change the menu when in my module. */
|
||||
$this->user->resetMenu();
|
||||
|
||||
$actions = $this->loadModel('action')->getDynamic($account, $period, $sort, $pager, 'all', 'all', $date, $direction);
|
||||
|
||||
$this->view->title = $this->lang->user->common . $this->lang->colon . $this->lang->user->dynamic;
|
||||
|
||||
@@ -2459,16 +2459,4 @@ class userModel extends model
|
||||
|
||||
return $personalData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reset menu when from my module.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function resetMenu()
|
||||
{
|
||||
$this->lang->navGroup->user = 'system';
|
||||
$this->lang->noMenuModule[] = 'user';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user