Merge branch 'sprint/biz17' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/biz17
This commit is contained in:
@@ -382,7 +382,7 @@ class tree extends control
|
||||
{
|
||||
$this->view->optionMenu = $this->tree->getTaskOptionMenu($module->root);
|
||||
}
|
||||
else
|
||||
else if($type != 'chart')
|
||||
{
|
||||
$this->view->optionMenu = $this->tree->getOptionMenu($module->root, $module->type, 0, $module->branch);
|
||||
}
|
||||
@@ -486,6 +486,7 @@ class tree extends control
|
||||
if($module->type == 'doc') $confirmLang = $this->lang->tree->confirmDeleteMenu;
|
||||
if($module->type == 'line') $confirmLang = $this->lang->tree->confirmDeleteLine;
|
||||
if($module->type == 'host') $confirmLang = $this->lang->tree->confirmDeleteHost;
|
||||
if($module->type == 'chart') $confirmLang = $this->lang->tree->confirmDeleteGroup;
|
||||
die(js::confirm($confirmLang, $this->createLink('tree', 'delete', "rootID=$rootID&moduleID=$moduleID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
|
||||
@@ -43,6 +43,7 @@ $lang->tree->confirmDelete = 'Do you want to delete this module and its c
|
||||
$lang->tree->confirmDeleteMenu = 'Do you want to delete this menu and its child menus?';
|
||||
$lang->tree->confirmDelCategory = 'Möchten Sie diese Kategorie und ihre Kinderkategorien löschen?';
|
||||
$lang->tree->confirmDeleteLine = "Do you want to delete this {$lang->productCommon} line?";
|
||||
$lang->tree->confirmDeleteGroup = 'Do you want to delete this group and its child groups?';
|
||||
$lang->tree->confirmRoot = "Any changes to the {$lang->productCommon} will change the stories, bugs, cases of {$lang->productCommon} it belongs to, as well as the linkage of {$lang->executionCommon} and {$lang->productCommon}, which is dangerous. Do you want to change it?";
|
||||
$lang->tree->confirmRoot4Doc = "Any changes to the library will change the document of library it belongs to, which is dangerous. Do you want to change it?";
|
||||
$lang->tree->noSubmodule = "There are no copyable submodules under the current module!";
|
||||
|
||||
@@ -43,6 +43,7 @@ $lang->tree->confirmDelete = 'Do you want to delete this module and its c
|
||||
$lang->tree->confirmDeleteMenu = 'Do you want to delete this menu and its child menus?';
|
||||
$lang->tree->confirmDelCategory = 'Do you want to delete this category and its child categories?';
|
||||
$lang->tree->confirmDeleteLine = "Do you want to delete this {$lang->productCommon} line?";
|
||||
$lang->tree->confirmDeleteGroup = 'Do you want to delete this group and its child groups?';
|
||||
$lang->tree->confirmRoot = "Any changes to the {$lang->productCommon} will change the stories, bugs, cases of {$lang->productCommon} it belongs to, as well as the linkage of {$lang->executionCommon} and {$lang->productCommon}, which is dangerous. Do you want to change it?";
|
||||
$lang->tree->confirmRoot4Doc = "Any changes to the library will change the document of library it belongs to, which is dangerous. Do you want to change it?";
|
||||
$lang->tree->noSubmodule = "There are no copyable submodules under the current module!";
|
||||
|
||||
@@ -42,6 +42,7 @@ $lang->tree->addChild = "Ajout Sous-Module";
|
||||
$lang->tree->confirmDelete = 'Voulez-vous supprimer ce module et tous ses sous-modules ?';
|
||||
$lang->tree->confirmDeleteMenu = 'Do you want to delete this menu and its child menus?';
|
||||
$lang->tree->confirmDelCategory = 'Voulez-vous supprimer cette catégorie et ses sous-catégories?';
|
||||
$lang->tree->confirmDeleteGroup = 'Do you want to delete this group and its child groups?';
|
||||
$lang->tree->confirmDeleteLine = 'Voulez-vous supprimer cette ligne de produit ?';
|
||||
$lang->tree->confirmRoot = "Les changements du {$lang->productCommon} vont impacter les stories, bugs, casTests du {$lang->productCommon} auquel ils appartiennent, ainsi que les associations de {$lang->executionCommon} et {$lang->productCommon}, ce qui est dangereux. Voulez-vous malgré tout effectuer le changement ?";
|
||||
$lang->tree->confirmRoot4Doc = "Toute modification apportée à la bibliothèque modifiera le document de la bibliothèque à laquelle elle appartient, ce qui est dangereux. Voulez-vous le changer ?";
|
||||
|
||||
@@ -43,6 +43,7 @@ $lang->tree->confirmDelete = '该模块及其子模块都会被删除,
|
||||
$lang->tree->confirmDeleteMenu = '该目录及其子目录都会被删除,您确定删除吗?';
|
||||
$lang->tree->confirmDelCategory = '该分类及其子分类都会被删除,您确定删除吗?';
|
||||
$lang->tree->confirmDeleteLine = "您确定删除该{$lang->productCommon}线吗?";
|
||||
$lang->tree->confirmDeleteGroup = '该分组及其子分组都会被删除,您确定删除吗?';
|
||||
$lang->tree->confirmRoot = "模块的所属{$lang->productCommon}修改,会关联修改该模块下的{$lang->SRCommon}、Bug、用例的所属{$lang->productCommon},以及{$lang->executionCommon}和{$lang->productCommon}的关联关系。该操作比较危险,请谨慎操作。是否确认修改?";
|
||||
$lang->tree->confirmRoot4Doc = "修改所属文档库,会同时修改该分类下文档的关联关系。该操作比较危险,请谨慎操作。是否确认修改?";
|
||||
$lang->tree->noSubmodule = "当前模块下没有可复制的子模块!";
|
||||
|
||||
+28
-7
@@ -1391,6 +1391,21 @@ class treeModel extends model
|
||||
return html::a(helper::createLink('dashboard', 'browse', "type=bymodule¶m={$module->id}"), $module->name, '', "id='module{$module->id}' title='{$module->name}'");
|
||||
}
|
||||
|
||||
/**
|
||||
* Create report link.
|
||||
*
|
||||
* @param string $type
|
||||
* @param object $module
|
||||
* @param array $extra
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function createReportLink($type, $module, $extra)
|
||||
{
|
||||
$dimension = zget($extra, 'dimension', 0);
|
||||
return html::a(helper::createLink('report', 'browsereport', "dimension={$dimension}&module={$module->id}"), $module->name, '', "id='module{$module->id}' title='{$module->name}'");
|
||||
}
|
||||
|
||||
/**
|
||||
* Get sons of a module.
|
||||
*
|
||||
@@ -1756,10 +1771,11 @@ class treeModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if($type == 'story')
|
||||
if($type == 'story' or $type == 'chart')
|
||||
{
|
||||
$objectType = $type == 'story' ? 'module' : 'chartgroup';
|
||||
$this->loadModel('action');
|
||||
if(!empty($createIdList)) $actionID = $this->action->create('module', $rootID, 'created', '', implode(',', $createIdList));
|
||||
if(!empty($createIdList)) $actionID = $this->action->create($objectType, $rootID, 'created', '', implode(',', $createIdList));
|
||||
|
||||
if(!empty($editIdList))
|
||||
{
|
||||
@@ -1778,7 +1794,7 @@ class treeModel extends model
|
||||
$changes[] = $change;
|
||||
}
|
||||
}
|
||||
$actionID = $this->action->create('module', $rootID, 'edited', '', implode(',', $editIdList));
|
||||
$actionID = $this->action->create($objectType, $rootID, 'edited', '', implode(',', $editIdList));
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
}
|
||||
@@ -1814,8 +1830,9 @@ class treeModel extends model
|
||||
$this->dao->update(TABLE_MODULE)->set('owner')->eq($this->post->owner)->where('id')->in($childs)->andWhere('owner')->eq('')->exec();
|
||||
$this->dao->update(TABLE_MODULE)->set('owner')->eq($this->post->owner)->where('id')->in($childs)->andWhere('owner')->eq($self->owner)->exec();
|
||||
|
||||
if($self->type == 'story')
|
||||
if($self->type == 'story' or $self->type == 'chart')
|
||||
{
|
||||
$objectType = $self->type == 'story' ? 'module' : 'chartgroup';
|
||||
$rootID = isset($module->root) ? $module->root : $self->root;
|
||||
$newModules = $this->getOptionMenu($rootID, 'story', 0, 'all');
|
||||
|
||||
@@ -1829,11 +1846,11 @@ class treeModel extends model
|
||||
break;
|
||||
}
|
||||
}
|
||||
$actionID = $this->loadModel('action')->create('module', $self->root, 'edited', '', $moduleID);
|
||||
$actionID = $this->loadModel('action')->create($objectType, $self->root, 'edited', '', $moduleID);
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
if(isset($module->root) and $module->root != $self->root)
|
||||
{
|
||||
$actionID = $this->action->create('module', $rootID, 'edited', '', $moduleID);
|
||||
$actionID = $this->action->create($objectType, $rootID, 'edited', '', $moduleID);
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
}
|
||||
@@ -1927,11 +1944,12 @@ class treeModel extends model
|
||||
$childs = $this->getAllChildId($moduleID);
|
||||
$childs[$moduleID] = $moduleID;
|
||||
|
||||
$objectType = (!empty($module->type) and $module->type == 'chart') ? 'chartgroup' : 'module';
|
||||
/* Mark deletion when delete a module. */
|
||||
$this->dao->update(TABLE_MODULE)->set('deleted')->eq(1)->where('id')->in($childs)->exec();
|
||||
foreach($childs as $childID)
|
||||
{
|
||||
$this->loadModel('action')->create('module', $childID, 'deleted', '', $extra = ACTIONMODEL::CAN_UNDELETED);
|
||||
$this->loadModel('action')->create($objectType, $childID, 'deleted', '', $extra = ACTIONMODEL::CAN_UNDELETED);
|
||||
}
|
||||
|
||||
$this->fixModulePath($module->root, $module->type);
|
||||
@@ -1960,6 +1978,9 @@ class treeModel extends model
|
||||
$this->dao->update(TABLE_CASE)->set('module')->eq($module->parent)->where('module')->in($childs)->exec();
|
||||
$cookieName = 'storyModule';
|
||||
break;
|
||||
case 'chart':
|
||||
$this->dao->update(TABLE_CHART)->set('`group`')->eq($module->parent)->where('`group`')->in($childs)->exec();
|
||||
break;
|
||||
}
|
||||
if(strpos($this->session->{$module->type . 'List'}, 'param=' . $moduleID)) $this->session->set($module->type . 'List', str_replace('param=' . $moduleID, 'param=0', $this->session->{$module->type . 'List'}));
|
||||
if($cookieName) setcookie($cookieName, 0, time() - 3600, $this->config->webRoot, '', $this->config->cookieSecure, false);
|
||||
|
||||
Reference in New Issue
Block a user