This commit is contained in:
hufangzhou
2021-10-14 13:52:05 +08:00
17 changed files with 70 additions and 23 deletions
+1 -1
View File
@@ -12,7 +12,7 @@
$lang->action->common = 'Log';
$lang->action->product = $lang->productCommon;
$lang->action->project = 'Project';
$lang->action->execution = $lang->executionCommon;
$lang->action->execution = $lang->execution->common;
$lang->action->objectType = 'Object Type';
$lang->action->objectID = 'ID';
$lang->action->objectName = 'Objekt Name';
+1 -1
View File
@@ -15,7 +15,7 @@ $lang->action->common = 'Log';
$lang->action->id = 'ID';
$lang->action->product = $lang->productCommon;
$lang->action->project = 'Project';
$lang->action->execution = $lang->executionCommon;
$lang->action->execution = $lang->execution->common;
$lang->action->objectType = 'Object Type';
$lang->action->objectID = 'ID';
$lang->action->objectName = 'Object Name';
+2 -2
View File
@@ -11,8 +11,8 @@
*/
$lang->action->common = 'Log';
$lang->action->product = $lang->productCommon;
$lang->action->project = $lang->executionCommon;
$lang->action->execution = $lang->executionCommon;
$lang->action->project = 'Project';
$lang->action->execution = $lang->execution->common;
$lang->action->objectType = "Type d'objet";
$lang->action->objectID = 'ID';
$lang->action->objectName = "Nom de l'object";
+1 -1
View File
@@ -12,7 +12,7 @@
$lang->action->common = 'Nhật ký';
$lang->action->product = $lang->productCommon;
$lang->action->project = 'Project';
$lang->action->execution = $lang->executionCommon;
$lang->action->execution = $lang->execution->common;
$lang->action->objectType = 'Loại đối tượng';
$lang->action->objectID = 'ID';
$lang->action->objectName = 'Tên đối tượng';
+1 -1
View File
@@ -15,7 +15,7 @@ $lang->action->common = '系统日志';
$lang->action->id = '编号';
$lang->action->product = $lang->productCommon;
$lang->action->project = '项目';
$lang->action->execution = $lang->executionCommon;
$lang->action->execution = $lang->execution->common;
$lang->action->objectType = '对象类型';
$lang->action->objectID = '对象ID';
$lang->action->objectName = '对象名称';
+2 -2
View File
@@ -864,8 +864,8 @@ class actionModel extends model
}
if($this->session->actionQuery == false) $this->session->set('actionQuery', ' 1 = 1');
$allProducts = "`product` = 'all'";
$allProjects = "`project` = 'all'";
$allProducts = "`product` = 'all'";
$allProjects = "`project` = 'all'";
$allExecutions = "`execution` = 'all'";
$actionQuery = $this->session->actionQuery;
+1 -1
View File
@@ -10,7 +10,7 @@
* @link http://www.zentao.net
*/
/* Fields. */
$lang->execution->allExecutions = 'All ' . $lang->executionCommon . 's';
$lang->execution->allExecutions = 'All ' . $lang->execution->common . 's';
$lang->execution->allExecutionAB = 'Execution List';
$lang->execution->id = $lang->executionCommon . ' ID';
$lang->execution->type = $lang->executionCommon . 'Type';
+1 -1
View File
@@ -10,7 +10,7 @@
* @link https://www.zentao.pm
*/
/* Fields. */
$lang->execution->allExecutions = 'Tous les ' . $lang->executionCommon . 's';
$lang->execution->allExecutions = 'Tous les ' . $lang->execution->common . 's';
$lang->execution->allExecutionAB = 'Execution List';
$lang->execution->id = $lang->executionCommon . ' ID';
$lang->execution->type = $lang->executionCommon . 'Type';
+1 -1
View File
@@ -10,7 +10,7 @@
* @link http://www.zentao.net
*/
/* Fields. */
$lang->execution->allExecutions = 'Tất cả ' . $lang->executionCommon;
$lang->execution->allExecutions = 'Tất cả ' . $lang->execution->common;
$lang->execution->allExecutionAB = 'Execution List';
$lang->execution->id = 'ID '.$lang->executionCommon;
$lang->execution->type = 'Loại';
+1 -1
View File
@@ -10,7 +10,7 @@
* @link http://www.zentao.net
*/
/* 字段列表。*/
$lang->execution->allExecutions = '所有' . $lang->executionCommon;
$lang->execution->allExecutions = '所有' . $lang->execution->common;
$lang->execution->allExecutionAB = "{$lang->execution->common}列表";
$lang->execution->id = $lang->executionCommon . '编号';
$lang->execution->type = $lang->executionCommon . '类型';
+13
View File
@@ -8,3 +8,16 @@ function showVideo()
{
$('video').removeClass('hidden');
}
$(function()
{
$('#modeclassic').click(function()
{
$('#selectedModeTips').show();
});
$('#modenew').click(function()
{
$('#selectedModeTips').hide();
});
})
+30 -5
View File
@@ -677,17 +677,26 @@ class personnelModel extends model
*/
public function deleteProductWhitelist($productID, $account = '')
{
$product = $this->dao->select('id,whitelist')->from(TABLE_PRODUCT)->where('id')->eq($productID)->fetch('whitelist');
$product = $this->dao->select('id,whitelist')->from(TABLE_PRODUCT)->where('id')->eq($productID)->fetch();
if(empty($product)) return false;
$newWhitelist = str_replace(',' . $account, '', $product->whitelist);
$this->dao->update(TABLE_PRODUCT)->set('whitelist')->eq($newWhitelist)->where('id')->eq($productID)->exec();
$this->dao->delete()->from(TABLE_ACL)
$result = $this->dao->delete()->from(TABLE_ACL)
->where('objectID')->eq($productID)
->andWhere('account')->eq($account)
->andWhere('objectType')->eq('product')
->andWhere('source')->eq('sync')
->exec();
/* Update user view when delete success. */
if($result)
{
$viewProducts = $this->dao->select('products')->from(TABLE_USERVIEW)->where('account')->eq($account)->fetch('products');
$newViewProducts = trim(str_replace(",$productID,", '', ",$viewProducts,"), ',');
$this->dao->update(TABLE_USERVIEW)->set('products')->eq($newViewProducts)->where('account')->eq($account)->exec();
}
}
/**
@@ -711,12 +720,20 @@ class personnelModel extends model
{
$newWhitelist = str_replace(',' . $account, '', $program->whitelist);
$this->dao->update(TABLE_PROGRAM)->set('whitelist')->eq($newWhitelist)->where('id')->eq($programID)->exec();
$this->dao->delete()->from(TABLE_ACL)
$result = $this->dao->delete()->from(TABLE_ACL)
->where('objectID')->eq($programID)
->andWhere('account')->eq($account)
->andWhere('objectType')->eq('program')
->andWhere('source')->eq('sync')
->exec();
/* Update user view when delete success. */
if($result)
{
$viewPrograms = $this->dao->select('programs')->from(TABLE_USERVIEW)->where('account')->eq($account)->fetch('programs');
$newViewPrograms = trim(str_replace(",$programID,", '', ",$viewPrograms,"), ',');
$this->dao->update(TABLE_USERVIEW)->set('programs')->eq($newViewPrograms)->where('account')->eq($account)->exec();
}
}
$this->loadModel('user')->updateUserView($programID, 'program', array($account));
}
@@ -734,7 +751,7 @@ class personnelModel extends model
$project = $this->dao->select('id,project,whitelist')->from(TABLE_PROJECT)->where('id')->eq($objectID)->fetch();
if(empty($project)) return false;
$projectID = $project->project;
$projectID = $project->project ? $project->project : $objectID;
$sprints = $this->dao->select('id')->from(TABLE_PROJECT)->where('project')->eq($projectID)->andWhere('deleted')->eq('0')->fetchPairs('id');
$whitelist = $this->dao->select('*')->from(TABLE_ACL)->where('objectID')->in($sprints)->andWhere('account')->eq($account)->andWhere('objectType')->eq('sprint')->fetch();
@@ -743,12 +760,20 @@ class personnelModel extends model
{
$newWhitelist = str_replace(',' . $account, '', $project->whitelist);
$this->dao->update(TABLE_PROJECT)->set('whitelist')->eq($newWhitelist)->where('id')->eq($projectID)->exec();
$this->dao->delete()->from(TABLE_ACL)
$result = $this->dao->delete()->from(TABLE_ACL)
->where('objectID')->eq($projectID)
->andWhere('account')->eq($account)
->andWhere('objectType')->eq('project')
->andWhere('source')->eq('sync')
->exec();
/* Update user view when delete success. */
if($result)
{
$viewProjects = $this->dao->select('projects')->from(TABLE_USERVIEW)->where('account')->eq($account)->fetch('projects');
$newViewProjects = trim(str_replace(",$projectID,", '', ",$viewProjects,"), ',');
$this->dao->update(TABLE_USERVIEW)->set('projects')->eq($newViewProjects)->where('account')->eq($account)->exec();
}
}
$this->loadModel('user')->updateUserView($projectID, 'project', array($account));
}
+1 -1
View File
@@ -29,7 +29,7 @@
<?php endif;?>
<tr>
<th class='w-140px'><?php echo $lang->product->line;?></th>
<?php if($programID):?>
<?php if($config->systemMode == 'classic' or $programID):?>
<td>
<div class='input-group'>
<?php echo html::select("line", $lines, '', "class='form-control hidden line-exist'");?>
+7 -2
View File
@@ -350,17 +350,22 @@ class upgrade extends control
if(dao::isError()) die(js::error(dao::getError()));
/* Process merged independent projects. */
$productIdList = array();
if($type == 'noProject')
{
$productIdList = $this->dao->select('product')->from(TABLE_PROJECTPRODUCT)->where('project')->in($linkedSprints)->fetchPairs();
}
if($_POST['projectType'] == 'execution')
{
/* Use historical projects as execution upgrades. */
$this->upgrade->processMergedData($programID, $projectList, $lineID, array(), $linkedSprints);
$this->upgrade->processMergedData($programID, $projectList, $lineID, $productIdList, $linkedSprints);
}
else
{
/* Use historical projects as project upgrades. */
foreach($linkedSprints as $sprint)
{
$this->upgrade->processMergedData($programID, $projectList[$sprint], $lineID, array(), array($sprint => $sprint));
$this->upgrade->processMergedData($programID, $projectList[$sprint], $lineID, $productIdList, array($sprint => $sprint));
}
}
}
+5 -1
View File
@@ -522,6 +522,7 @@ $(function()
setProgramBegin(programBegin);
setProgramEnd(programEnd);
setProjectPM();
toggleProgram();
hiddenProject();
})
@@ -638,7 +639,7 @@ function getLineByProgram()
function toggleProgram(obj)
{
var $obj = $(obj);
if($obj.length == 0) return false;
if($obj.length == 0 && type != 'noProject') return false;
var $programs = $obj.closest('table').find('#programs');
if($obj.prop('checked'))
@@ -647,6 +648,8 @@ function toggleProgram(obj)
$('form .pgm-exist').addClass('hidden');
$programs.attr('disabled', 'disabled');
$('.programStatus').show();
$('#programStatus').val('wait');
$('#programStatus').removeAttr('disabled').trigger("chosen:updated");
$('form #newProject0').prop('checked', true);
$('form #newLine0').prop('checked', true);
@@ -658,6 +661,7 @@ function toggleProgram(obj)
$('form .pgm-exist').removeClass('hidden');
$('form .pgm-no-exist').addClass('hidden');
$('.programStatus').hide();
$('#programStatus').attr('disabled', 'disabled');
if(!$('#newProgram0').prop('disabled'))
{
+1 -2
View File
@@ -13,8 +13,7 @@
</th>
<td class='required'>
<div class='input-group'>
<?php $hidden = $type == 'noProject' ? '' : 'hidden';?>
<?php echo html::select("programs", $programs, $programID, "class='form-control $hidden pgm-exist' onchange='getProjectByProgram(this)'");?>
<?php echo html::select("programs", $programs, $programID, "class='form-control hidden pgm-exist' onchange='getProjectByProgram(this)'");?>
<?php if($type != 'noProject'):?>
<?php echo html::input("programName", '', "class='form-control pgm-no-exist'");?>
<span class='input-group-addon'>
@@ -12,6 +12,7 @@
?>
<?php include '../../common/view/header.lite.html.php';?>
<?php js::set('weekend', $config->execution->weekend);?>
<?php js::set('type', $type);?>
<div class='container'>
<form method='post' target='hiddenwin'>
<div class='modal-dialog'>