This commit is contained in:
Yagami
2022-10-25 09:25:07 +08:00
parent c232ec7c7d
commit 1875b5be0e
8 changed files with 26 additions and 1 deletions
+3 -1
View File
@@ -2044,6 +2044,8 @@ class project extends control
$this->loadModel('program');
$this->loadModel('execution');
$project = $this->project->getById($projectID);
if(!empty($_POST))
{
if(!isset($_POST['products']))
@@ -2075,7 +2077,6 @@ class project extends control
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $locateLink));
}
$project = $this->project->getById($projectID);
if($this->app->tab == 'program')
{
$this->program->setMenu($project->parent);
@@ -2120,6 +2121,7 @@ class project extends control
$this->view->linkedProducts = $linkedProducts;
$this->view->linkedBranches = $linkedBranches;
$this->view->branches = $branches;
$this->view->project = $project;
$this->view->unmodifiableProducts = $unmodifiableProducts;
$this->view->unmodifiableBranches = $unmodifiableBranches;
$this->view->unmodifiableMainBranches = $unmodifiableMainBranches;
+1
View File
@@ -196,6 +196,7 @@ $lang->project->changeProgram = '%s > Change project';
$lang->project->changeProgramTip = 'After modifying the project set, the products linked with the project will also modify the project set to which it belongs. Please confirm whether to modify it.';
$lang->project->linkedProjectsTip = 'Linked projects are as follows';
$lang->project->multiLinkedProductsTip = 'The following products linked to this project are also linked to other projects, please unlink before proceeding.';
$lang->project->noticeDivsion = "The current project is associated with multiple products, you can click Confirm to open the mode by {$lang->productCommon} creation stage, click Cancel to keep the status quo.";
$lang->project->linkStoryByPlanTips = "This action will associate all {$lang->SRCommon} under the selected plan to this project";
$lang->project->createExecution = "There is no {$lang->executionCommon} under this project, please create {$lang->executionCommon} first";
$lang->project->unlinkExecutionMember = "The user participated in %s executions such as %s%s. Do you want to remove the user from those executions as well? (The data related to this user will not be deleted.)";
+1
View File
@@ -196,6 +196,7 @@ $lang->project->changeProgram = '%s > Change project';
$lang->project->changeProgramTip = 'Once the program is edited, the product that is linked to this program will be changed. Do you want to edit it?';
$lang->project->linkedProjectsTip = 'Linked projects are as follows';
$lang->project->multiLinkedProductsTip = 'The following products linked to this project are also linked to other projects, please unlink before proceeding.';
$lang->project->noticeDivsion = "The current project is associated with multiple products, you can click Confirm to open the mode by {$lang->productCommon} creation stage, click Cancel to keep the status quo.";
$lang->project->linkStoryByPlanTips = "This action will associate all {$lang->SRCommon} under the selected plan to this project";
$lang->project->createExecution = "There is no {$lang->executionCommon} under this project, please create {$lang->executionCommon} first";
$lang->project->unlinkExecutionMember = "The user participated in %s executions such as %s%s. Do you want to remove the user from those executions as well? (The data related to this user will not be deleted.)";
+1
View File
@@ -196,6 +196,7 @@ $lang->project->changeProgram = '%s > Change project';
$lang->project->changeProgramTip = 'After modifying the project set, the products linked with the project will also modify the project set to which it belongs. Please confirm whether to modify it.';
$lang->project->linkedProjectsTip = 'Linked projects are as follows';
$lang->project->multiLinkedProductsTip = 'The following products linked to this project are also linked to other projects, please unlink before proceeding.';
$lang->project->noticeDivsion = "The current project is associated with multiple products, you can click Confirm to open the mode by {$lang->productCommon} creation stage, click Cancel to keep the status quo.";
$lang->project->linkStoryByPlanTips = "This action will associate all {$lang->SRCommon} under the selected plan to this project";
$lang->project->createExecution = "There is no {$lang->executionCommon} under this project, please create {$lang->executionCommon} first";
$lang->project->unlinkExecutionMember = "The user participated in %s executions such as %s%s. Do you want to remove the user from those executions as well? (The data related to this user will not be deleted.)";
+1
View File
@@ -116,6 +116,7 @@ $lang->project->changeProgram = '%s > Change project';
$lang->project->changeProgramTip = 'After modifying the project set, the products linked with the project will also modify the project set to which it belongs. Please confirm whether to modify it.';
$lang->project->linkedProjectsTip = 'Linked projects are as follows';
$lang->project->multiLinkedProductsTip = 'The following products linked to this project are also linked to other projects, please unlink before proceeding.';
$lang->project->noticeDivsion = "The current project is associated with multiple products, you can click Confirm to open the mode by {$lang->productCommon} creation stage, click Cancel to keep the status quo.";
$lang->project->linkStoryByPlanTips = "This action will associate all {$lang->SRCommon} under the selected plan to this project";
$lang->project->createExecution = "There is no {$lang->executionCommon} under this project, please create {$lang->executionCommon} first";
$lang->project->noDevStage = 'There is no R&D stage under this project, or you do not have access permissions. The creation of builds is not supported at the moment.';
+1
View File
@@ -196,6 +196,7 @@ $lang->project->changeProgram = '%s > 修改项目集';
$lang->project->changeProgramTip = '修改项目集后,该项目关联产品的项目集也会被修改,请确认是否修改。';
$lang->project->linkedProjectsTip = '关联的项目如下';
$lang->project->multiLinkedProductsTip = '该项目关联的如下产品还关联了其他项目,请取消关联后再操作';
$lang->project->noticeDivsion = '当前项目关联多个产品,可以点击确认开启按产品创建阶段的模式,点击取消则保持现状。';
$lang->project->linkStoryByPlanTips = "此操作会将所选计划下面的{$lang->SRCommon}全部关联到此项目中";
$lang->project->createExecution = "该项目下没有{$lang->executionCommon},请先创建{$lang->executionCommon}";
$lang->project->unlinkExecutionMember = "该用户参与了%s%s%s个{$lang->execution->common},是否同时将其移除?(该用户所产生的数据不会受影响。)";
+2
View File
@@ -2164,6 +2164,8 @@ class projectModel extends model
{
$executions = $this->dao->select('id')->from(TABLE_EXECUTION)->where('project')->eq((int)$projectID)->fetchPairs('id');
$this->dao->delete()->from(TABLE_PROJECTPRODUCT)->where('project')->in($executions)->andWhere('product')->notin($products)->exec();
if(isset($_POST['division'])) $this->dao->update(TABLE_PROJECT)->set('division')->eq('1')->where('id')->eq((int)$projectID)->exec();
}
$oldProductKeys = array_keys($oldProjectProducts);
@@ -75,4 +75,20 @@
</form>
</div>
</div>
<?php if(!$project->division and count($linkedProducts) == 1):?>
<?php js::set('noticeDivsion', $lang->project->noticeDivsion);?>
<script>
$('#submit').click(function()
{
var checkedProducts = $("input[name*='products']:checked").length;
if(checkedProducts > 1)
{
if(confirm(noticeDivsion))
{
$('div.form-actions').append("<input type='hidden' value='1' name='division'>");
}
}
})
</script>
<?php endif;?>
<?php include '../../common/view/footer.html.php';?>