Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
wangyidong
2021-04-22 15:00:43 +08:00
15 changed files with 44 additions and 68 deletions
+3 -3
View File
@@ -40,7 +40,7 @@ $lang->mainNav->report = "{$lang->navIcons['report']} {$lang->report->common}
$lang->mainNav->system = "{$lang->navIcons['system']} {$lang->system->common}|my|team|";
$lang->mainNav->admin = "{$lang->navIcons['admin']} {$lang->admin->common}|admin|index|";
$lang->dividerMenu = ',doc,admin,';
$lang->dividerMenu = ',doc,oa,admin,';
$lang->mainNav->menuOrder[5] = 'my';
if($config->systemMode == 'new') $lang->mainNav->menuOrder[10] = 'program';
$lang->mainNav->menuOrder[15] = 'product';
@@ -50,8 +50,8 @@ $lang->mainNav->menuOrder[23] = 'qa';
$lang->mainNav->menuOrder[25] = 'devops';
$lang->mainNav->menuOrder[30] = 'doc';
$lang->mainNav->menuOrder[35] = 'report';
$lang->mainNav->menuOrder[45] = 'system';
$lang->mainNav->menuOrder[50] = 'admin';
$lang->mainNav->menuOrder[40] = 'system';
$lang->mainNav->menuOrder[55] = 'admin';
/* My menu. */
$lang->my->menu = new stdclass();
+5 -24
View File
@@ -1231,12 +1231,6 @@ class execution extends control
}
}
$project = $this->project->getByID($projectID);
if(!empty($project->model) and $project->model == 'waterfall')
{
$this->lang->execution->afterInfo = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->execution->afterInfo);
}
$this->view->title = $this->lang->execution->tips;
$this->view->tips = $this->fetch('execution', 'tips', "executionID=$executionID");
$this->view->executionID = $executionID;
@@ -1317,6 +1311,11 @@ class execution extends control
}
}
if(!empty($project->model) and $project->model == 'waterfall')
{
$this->lang->execution->type = str_replace($this->lang->executionCommon, $this->lang->project->stage, $this->lang->execution->type);
}
$this->view->title = (($this->app->openApp == 'execution') and ($this->config->systemMode == 'new')) ? $this->lang->execution->createExec : $this->lang->execution->create;
$this->view->position[] = $this->view->title;
$this->view->executions = array('' => '') + $this->execution->getList($projectID);
@@ -1433,23 +1432,6 @@ class execution extends control
$productPlans[$product->id] = $this->productplan->getPairs($product->id);
}
$isSprint = true;
if($this->config->systemMode == 'new')
{
$project = $this->project->getById($execution->project);
if($project->model == 'scrum')
{
unset($this->lang->execution->endList[62]);
unset($this->lang->execution->endList[93]);
unset($this->lang->execution->endList[186]);
unset($this->lang->execution->endList[365]);
}
else
{
$isSprint = false;
}
}
$this->loadModel('user');
$poUsers = $this->user->getPairs('noclosed|nodeleted|pofirst', $execution->PO, $this->config->maxCount);
if(!empty($this->config->user->moreLink)) $this->config->moreLinks["PM"] = $this->config->user->moreLink;
@@ -1478,7 +1460,6 @@ class execution extends control
$this->view->unmodifiableProducts = $unmodifiableProducts;
$this->view->productPlans = $productPlans;
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($linkedProducts), '', $linkedBranches);
$this->view->isSprint = $isSprint;
$this->display();
}
+1 -1
View File
@@ -38,7 +38,7 @@ $(function()
var adjustMainCol = function()
{
$('.main-form .col-main').css('width', Math.max(250, Math.floor(($('#productsBox').outerWidth() - 50)/3) + 10));
if(!isStage) $('.main-form .col-main').css('width', Math.max(250, Math.floor(($('#productsBox').outerWidth() - 50)/3) + 10));
};
adjustMainCol();
$(window).on('resize', adjustMainCol);
+8 -8
View File
@@ -274,7 +274,7 @@ class executionModel extends model
*/
public function create($copyExecutionID = '')
{
$sprintType = 'sprint';
$type = 'sprint';
$this->lang->execution->team = $this->lang->execution->teamname;
if($this->config->systemMode == 'new')
@@ -286,14 +286,14 @@ class executionModel extends model
}
/* Determine whether to add a sprint or a stage according to the model of the execution. */
$project = $this->getByID($_POST['project']);
$sprintType = zget($this->config->execution->modelList, $project->model, 'sprint');
$project = $this->loadModel('project')->getByID($_POST['project']);
$type = zget($this->config->execution->modelList, $project->model, 'sprint');
$this->config->execution->create->requiredFields .= ',project';
}
/* If the execution model is a stage, determine whether the product is linked. */
if($sprintType == 'stage' and empty($this->post->products[0]))
if($type == 'stage' and empty($this->post->products[0]))
{
dao::$errors['message'][] = $this->lang->execution->noLinkProduct;
return false;
@@ -311,7 +311,7 @@ class executionModel extends model
->setIF($this->config->systemMode == 'new', 'parent', $this->post->project)
->setIF($this->post->acl == 'open', 'whitelist', '')
->join('whitelist', ',')
->add('type', $sprintType)
->add('type', $type)
->stripTags($this->config->execution->editor->create['id'], $this->config->allowedTags)
->remove('products, workDays, delta, branch, uid, plans')
->get();
@@ -360,7 +360,7 @@ class executionModel extends model
$member->root = $executionID;
$member->join = $today;
$member->days = $sprint->days;
$member->type = $sprintType;
$member->type = $type;
$this->dao->insert(TABLE_TEAM)->data($member)->exec();
if($member->account == $this->app->user->account) $creatorExists = true;
}
@@ -375,7 +375,7 @@ class executionModel extends model
$member->account = $this->app->user->account;
$member->role = zget($this->lang->user->roleList, $this->app->user->role, '');
$member->join = $today;
$member->type = $sprintType;
$member->type = $type;
$member->days = $sprint->days;
$member->hours = $this->config->execution->defaultWorkhours;
$this->dao->insert(TABLE_TEAM)->data($member)->exec();
@@ -840,7 +840,7 @@ class executionModel extends model
*/
public function getSwitcher($executionID, $currentModule, $currentMethod)
{
if(in_array($currentMethod, array('index', 'all', 'batchedit'))) return;
if(in_array($currentMethod, array('index', 'all', 'batchedit', 'create'))) return;
$currentExecutionName = $this->lang->execution->common;
if($executionID)
+4
View File
@@ -10,9 +10,13 @@
* @link http://www.zentao.net
*/
?>
<?php if($app->openApp == 'execution'): ?>
<style>#heading {padding: 8px 0;}</style>
<?php endif;?>
<?php if(isset($tips)):?>
<?php $defaultURL = $config->systemMode == 'new' ? $this->createLink('project', 'execution', "status=all&projectID=$projectID") : $this->createLink('execution', 'task', 'executionID=' . $executionID);?>
<?php include '../../common/view/header.html.php';?>
<?php js::set('isStage', false);?>
<body>
<div class='modal-dialog mw-500px' id='tipsModal'>
<div class='modal-header'>
+1 -21
View File
@@ -63,16 +63,7 @@
<tr>
<th><?php echo $lang->execution->type;?></th>
<td>
<?php
if($isSprint)
{
echo html::select('lifetime', $lang->execution->lifeTimeList, $execution->lifetime, "class='form-control' onchange='showLifeTimeTips()'");
}
else
{
echo html::select('attribute', $lang->stage->typeList, $execution->attribute, "class='form-control'");
}
?>
<?php echo html::select('lifetime', $lang->execution->lifeTimeList, $execution->lifetime, "class='form-control' onchange='showLifeTimeTips()'");?>
</td>
</tr>
<tr>
@@ -112,17 +103,6 @@
</div>
</td>
</tr>
<?php if(!$isSprint):?>
<tr>
<th><?php echo $lang->programplan->percent;?></th>
<td>
<div class='input-group'>
<?php echo html::input('percent', $execution->percent, "class='form-control'");?>
<span class='input-group-addon'>%</span>
</div>
</td>
</tr>
<?php endif;?>
<tr>
<th><?php echo $lang->execution->manageProducts;?></th>
<td class='text-left' id='productsBox' colspan="2">
+1 -9
View File
@@ -1644,19 +1644,11 @@ class projectModel extends model
{
global $lang;
$project = $this->getByID($objectID);
$lang->project->menu = $lang->{$project->model}->menu;
$lang->project->menuOrder = $lang->{$project->model}->menuOrder;
$lang->project->dividerMenu = $lang->{$project->model}->dividerMenu;
/* Replace waterfall lang. */
if($project->model == 'waterfall')
{
$this->loadModel('execution');
$lang->execution->create = str_replace($lang->executionCommon, $lang->project->stage, $lang->execution->create);
$lang->execution->name = str_replace($lang->executionCommon, $lang->project->stage, $lang->execution->name);
$lang->execution->status = str_replace($lang->executionCommon, $lang->project->stage, $lang->execution->status);
$lang->execution->copy = str_replace($lang->executionCommon, $lang->project->stage, $lang->execution->copy);
}
$this->lang->switcherMenu = $this->getSwitcher($objectID, $this->app->rawModule, $this->app->rawMethod);
common::setMenuVars('project', $objectID);
+1
View File
@@ -398,6 +398,7 @@ class tree extends control
$confirmLang = $this->lang->tree->confirmDelete;
if($module->type == 'line') $confirmLang = $this->lang->tree->confirmDeleteLine;
if($module->type == 'host') $confirmLang = $this->lang->tree->confirmDeleteHost;
if($module->type == 'feedback') $confirmLang = $this->lang->tree->confirmDelCategory;
die(js::confirm($confirmLang, $this->createLink('tree', 'delete', "rootID=$rootID&moduleID=$moduleID&confirm=yes")));
}
else
+3
View File
@@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "Ziehen und Sotieren";
$lang->tree->sort = "Sortieren";
$lang->tree->addChild = "Hinzufügen";
$lang->tree->confirmDelete = 'Do you want to delete this module and its child modules?';
$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->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?";
@@ -57,6 +58,8 @@ $lang->tree->parent = 'Übergeordnet';
$lang->tree->parentCate = 'Parent Category';
$lang->tree->child = 'Untergeordnet';
$lang->tree->subCategory = 'SubCategory';
$lang->tree->editCategory = 'Kategorie bearbeiten';
$lang->tree->delCategory = 'Kategorie löschen';
$lang->tree->lineChild = "Child {$lang->productCommon} Line";
$lang->tree->owner = 'Besitzer';
$lang->tree->order = 'Reihenfolge';
+3
View File
@@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "Drag to order";
$lang->tree->sort = "Order";
$lang->tree->addChild = "Add Child Module";
$lang->tree->confirmDelete = 'Do you want to delete this module and its child modules?';
$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->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?";
@@ -57,6 +58,8 @@ $lang->tree->parent = 'Parent Module';
$lang->tree->parentCate = 'Parent Category';
$lang->tree->child = 'Children';
$lang->tree->subCategory = 'SubCategory';
$lang->tree->editCategory = 'Edit Category';
$lang->tree->delCategory = 'Delete Category';
$lang->tree->lineChild = "Child {$lang->productCommon} Line";
$lang->tree->owner = 'Owner';
$lang->tree->order = 'Order';
+3
View File
@@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "Faites glisser pour ordonner";
$lang->tree->sort = "Ordonnez";
$lang->tree->addChild = "Ajout Sous-Module";
$lang->tree->confirmDelete = 'Voulez-vous supprimer ce module et tous ses sous-modules ?';
$lang->tree->confirmDelCategory = 'Voulez-vous supprimer cette catégorie et ses sous-catégories?';
$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 ?";
@@ -57,6 +58,8 @@ $lang->tree->parent = 'Module Parent';
$lang->tree->parentCate = 'Catégorie Parente';
$lang->tree->child = 'Enfants';
$lang->tree->subCategory = 'SubCategory';
$lang->tree->editCategory = 'Modifier la catégorie';
$lang->tree->delCategory = 'Supprimer la catégorie';
$lang->tree->lineChild = 'Sous-Ligne Produit';
$lang->tree->owner = 'Propriétaire';
$lang->tree->order = 'Ordre';
+3
View File
@@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "Drag để sắp xếp";
$lang->tree->sort = "Thứ tự";
$lang->tree->addChild = "Thêm Module con";
$lang->tree->confirmDelete = 'Bạn có muốn xóa module này và module con của nó?';
$lang->tree->confirmDelCategory = 'Bạn có muốn xoá hạng mục này và loại con của nó không?';
$lang->tree->confirmDeleteLine = "Bạn có muốn xóa dòng {$lang->productCommon} này không?";
$lang->tree->confirmRoot = "Mọi sự thay đổi tới {$lang->productCommon} này sẽ thay đổi the câu chuyện, bugs, tình huống của {$lang->productCommon} nó sở hữu, cũng như liên kết của {$lang->executionCommon} và {$lang->productCommon}, điều này nguy hiểm. Bạn có muốn thay đổi nó?";
$lang->tree->confirmRoot4Doc = "Mọi sự thay đổi tới thư viện này sẽ thay đổi thư viện tài liệu nó sở hữu, điều này nguy hiểm. Bạn có muốn thay đổi nó?";
@@ -57,6 +58,8 @@ $lang->tree->parent = 'Module mẹ';
$lang->tree->parentCate = 'Danh mục mẹ';
$lang->tree->child = 'Con';
$lang->tree->subCategory = 'SubCategory';
$lang->tree->editCategory = 'Sửa phân loại';
$lang->tree->delCategory = 'Xoá phân loại';
$lang->tree->lineChild = "Dòng {$lang->productCommon} con";
$lang->tree->owner = 'Sở hữu';
$lang->tree->order = 'Sắp xếp';
+3
View File
@@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "拖放排序";
$lang->tree->sort = "排序";
$lang->tree->addChild = "增加子模块";
$lang->tree->confirmDelete = '该模块及其子模块都会被删除,您确定删除吗?';
$lang->tree->confirmDelCategory = '该分类及其子分类都会被删除,您确定删除吗?';
$lang->tree->confirmDeleteLine = "您确定删除该{$lang->productCommon}线吗?";
$lang->tree->confirmRoot = "模块的所属{$lang->productCommon}修改,会关联修改该模块下的{$lang->SRCommon}、Bug、用例的所属{$lang->productCommon},以及{$lang->executionCommon}和{$lang->productCommon}的关联关系。该操作比较危险,请谨慎操作。是否确认修改?";
$lang->tree->confirmRoot4Doc = "修改所属文档库,会同时修改该分类下文档的关联关系。该操作比较危险,请谨慎操作。是否确认修改?";
@@ -57,6 +58,8 @@ $lang->tree->parent = '上级模块';
$lang->tree->parentCate = '上级分类';
$lang->tree->child = '子模块';
$lang->tree->subCategory = '子分类';
$lang->tree->editCategory = '编辑分类';
$lang->tree->delCategory = '删除分类';
$lang->tree->lineChild = "子{$lang->productCommon}线";
$lang->tree->owner = '负责人';
$lang->tree->order = '排序';
+3
View File
@@ -37,6 +37,7 @@ $lang->tree->dragAndSort = "拖放排序";
$lang->tree->sort = "排序";
$lang->tree->addChild = "增加子模組";
$lang->tree->confirmDelete = '該模組及其子模組都會被刪除,您確定刪除嗎?';
$lang->tree->confirmDelCategory = '該分類及其子分類都會被删除,您確定删除嗎?';
$lang->tree->confirmDeleteLine = "您確定刪除該{$lang->productCommon}綫嗎?";
$lang->tree->confirmRoot = "模組的所屬{$lang->productCommon}修改,會關聯修改該模組下的{$lang->SRCommon}、Bug、用例的所屬{$lang->productCommon},以及{$lang->executionCommon}和{$lang->productCommon}的關聯關係。該操作比較危險,請謹慎操作。是否確認修改?";
$lang->tree->confirmRoot4Doc = "修改所屬文檔庫,會同時修改該分類下文檔的關聯關係。該操作比較危險,請謹慎操作。是否確認修改?";
@@ -57,6 +58,8 @@ $lang->tree->parent = '上級模組';
$lang->tree->parentCate = '上級分類';
$lang->tree->child = '子模組';
$lang->tree->subCategory = '子分類';
$lang->tree->editCategory = '編輯分類';
$lang->tree->delCategory = '删除分類';
$lang->tree->lineChild = "子{$lang->productCommon}綫";
$lang->tree->owner = '負責人';
$lang->tree->order = '排序';
+2 -2
View File
@@ -211,13 +211,13 @@ $(function()
edit:
{
linkTemplate: '<?php echo helper::createLink('tree', 'edit', "moduleID={0}&type=$viewType"); ?>',
title: '<?php echo $viewType == 'doc' ? $lang->doc->editType : $lang->tree->edit ?>',
title: '<?php echo $viewType == 'doc' ? $lang->doc->editType : ($viewType == 'feedback' ? $lang->tree->editCategory : $lang->tree->edit);?>',
template: '<a><i class="icon-edit"></i></a>'
},
"delete":
{
linkTemplate: '<?php echo helper::createLink('tree', 'delete', "rootID=$rootID&moduleID={0}"); ?>',
title: '<?php echo $viewType == 'doc' ? $lang->doc->deleteType : $lang->tree->delete ?>',
title: '<?php echo $viewType == 'doc' ? $lang->doc->deleteType : ($viewType == 'feedback' ? $lang->tree->delCategory : $lang->tree->delete)?>',
template: '<a><i class="icon-trash"></i></a>'
},
subModules: