Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
z
2020-07-13 16:27:06 +08:00
19 changed files with 44 additions and 19 deletions
+1 -1
View File
@@ -528,7 +528,7 @@ $lang->error->date = "『%s』should be valid date.";
$lang->error->datetime = "『%s』should be valid date.";
$lang->error->code = "『%s』should be letters or numbers.";
$lang->error->account = "『%s』should be valid account.";
$lang->error->passwordsame = "Two passwords should be consistent.";
$lang->error->passwordsame = "The password input is inconsistent.";
$lang->error->passwordrule = "Password should follow rules. It must be at least 6 characters.";
$lang->error->accessDenied = 'Access is denied.';
$lang->error->pasteImg = 'Image is not allowed to be pasted in your browser!';
+1 -1
View File
@@ -528,7 +528,7 @@ $lang->error->date = "『%s』should be valid date.";
$lang->error->datetime = "『%s』should be valid date.";
$lang->error->code = "『%s』should be letters or numbers.";
$lang->error->account = "『%s』should be >= 3 letters or numbers.";
$lang->error->passwordsame = "Passwords should be consistent.";
$lang->error->passwordsame = "The password input is inconsistent.";
$lang->error->passwordrule = "Password should conform to rules. It should be >= 6 characters.";
$lang->error->accessDenied = 'Access is denied.';
$lang->error->pasteImg = 'Images are not allowed to be pasted in your browser!';
+1 -1
View File
@@ -528,7 +528,7 @@ $lang->error->date = "『%s』should be valid date.";
$lang->error->datetime = "『 %s 』should be valid date.";
$lang->error->code = "『 %s 』should be letters or numbers.";
$lang->error->account = "『 %s 』should be >= 3 letters or numbers.";
$lang->error->passwordsame = "Passwords should be consistent.";
$lang->error->passwordsame = "The password input is inconsistent.";
$lang->error->passwordrule = "Password should conform to rules. It should be >= 6 characters.";
$lang->error->accessDenied = 'Access is denied.';
$lang->error->pasteImg = 'Images are not allowed to be pasted in your browser!';
+1 -1
View File
@@ -528,7 +528,7 @@ $lang->error->date = "『%s』should be valid date.";
$lang->error->datetime = "『%s』should be valid date.";
$lang->error->code = "『%s』nên là chữ hoặc số.";
$lang->error->account = "『%s』should be >= 3 letters or numbers.";
$lang->error->passwordsame = "Passwords should be consistent.";
$lang->error->passwordsame = "The password input is inconsistent.";
$lang->error->passwordrule = "Password should conform to rules. It should be >= 6 characters.";
$lang->error->accessDenied = 'Truy cập bị từ chối.';
$lang->error->pasteImg = 'Images are not allowed to be pasted in your browser!';
+1 -1
View File
@@ -528,7 +528,7 @@ $lang->error->date = "『%s』应当为合法的日期。";
$lang->error->datetime = "『%s』应当为合法的日期。";
$lang->error->code = "『%s』应当为字母或数字的组合。";
$lang->error->account = "『%s』只能是字母和数字的组合三位以上。";
$lang->error->passwordsame = "两次密码应当相等。";
$lang->error->passwordsame = "密码输入不一致。";
$lang->error->passwordrule = "密码应该符合规则,长度至少为六位。";
$lang->error->accessDenied = '您没有访问权限';
$lang->error->pasteImg = '您的浏览器不支持粘贴图片!';
+1 -2
View File
@@ -537,10 +537,9 @@ class fileModel extends model
{
/* Parse file only in zentao. */
if(strpos(realpath($fileName), $this->app->getBasePath()) !== 0) return array();
$content = file_get_contents($fileName);
/* Fix bug #890. */
$content = str_replace("\x82\x32", "\x10", $content);
$content = str_replace(array("\r\n","\r"), "\n", $content);
$lines = explode("\n", $content);
$col = -1;
+4
View File
@@ -460,6 +460,7 @@ class projectModel extends model
$projects[$projectID]->order = $data->orders[$projectID];
}
$this->loadModel('user');
foreach($projects as $projectID => $project)
{
$oldProject = $oldProjects[$projectID];
@@ -492,9 +493,12 @@ class projectModel extends model
$member->days = 0;
$member->hours = $this->config->project->defaultWorkhours;
$this->dao->replace(TABLE_TEAM)->data($member)->exec();
$changedAccounts[] = $value;
}
}
}
$this->user->updateUserView($projectID, 'project', $changedAccounts);
if(dao::isError()) die(js::error('project#' . $projectID . dao::getError(true)));
$allChanges[$projectID] = common::createChanges($oldProject, $project);
+3 -3
View File
@@ -51,12 +51,12 @@ function diffDate(date1, date2)
{
date1 = convertStringToDate(date1);
date2 = convertStringToDate(date2);
delta = (date2 - date1) / (1000 * 60 * 60 * 24);
delta = (date2 - date1) / (1000 * 60 * 60 * 24) + 1;
weekEnds = 0;
for(i = 0; i < delta + 1; i++)
for(i = 0; i < delta; i++)
{
if(date1.getDay() == 0 || date1.getDay() == 6) weekEnds ++;
if((weekend == 2 && date1.getDay() == 6) || date1.getDay() == 0) weekEnds ++;
date1 = date1.valueOf();
date1 += 1000 * 60 * 60 * 24;
date1 = new Date(date1);
+1
View File
@@ -1,5 +1,6 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/datepicker.html.php';?>
<?php js::set('weekend', $config->project->weekend);?>
<div id='mainContent' class='main-row'>
<div class='side-col col-lg'>
<?php include 'blockreportlist.html.php';?>
+4 -1
View File
@@ -478,10 +478,13 @@ class story extends control
/* Assign. */
$story = $this->story->getById($storyID, 0, true);
$product = $this->loadModel('product')->getById($story->product);
$stories = $this->story->getParentStoryPairs($story->product, $story->parent);
if(isset($stories[$storyID])) unset($stories[$storyID]);
$this->view->title = $this->lang->story->edit . "STORY" . $this->lang->colon . $this->view->story->title;
$this->view->position[] = $this->lang->story->edit;
$this->view->story = $story;
$this->view->stories = $this->story->getParentStoryPairs($story->product, $story->parent);
$this->view->stories = $stories;
$this->view->users = $this->user->getPairs('pofirst|nodeleted', "$story->assignedTo,$story->openedBy,$story->closedBy");
$this->view->product = $product;
$this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($story->product);
+3
View File
@@ -123,6 +123,9 @@ $lang->story->released = 'Released Stories';
$lang->story->ditto = 'Ditto';
$lang->story->dittoNotice = 'This story is not linked to the same product as the last one is!';
$lang->story->needNotReviewList[0] = 'Need Review';
$lang->story->needNotReviewList[1] = 'Need Not Review';
$lang->story->useList[0] = 'Yes';
$lang->story->useList[1] = 'No';
+3
View File
@@ -123,6 +123,9 @@ $lang->story->released = "已发布{$lang->storyCommon}数";
$lang->story->ditto = '同上';
$lang->story->dittoNotice = "该{$lang->storyCommon}与上一{$lang->storyCommon}不属于同一产品!";
$lang->story->needNotReviewList[0] = '需要评审';
$lang->story->needNotReviewList[1] = '不需要评审';
$lang->story->useList[0] = '不使用';
$lang->story->useList[1] = '使用';
+8
View File
@@ -662,6 +662,7 @@ class storyModel extends model
unset($oldStory->parent);
unset($story->parent);
$this->setStage($storyID);
return common::createChanges($oldStory, $story);
}
}
@@ -2828,6 +2829,13 @@ class storyModel extends model
else if($id == 'stage')
{
$style .= 'overflow: visible;';
if(isset($storyStages[$story->id]))
{
foreach($storyStages[$story->id] as $storyBranch => $storyStage)
{
if(isset($branches[$storyBranch])) $title .= $branches[$storyBranch] . ": " . $this->lang->story->stageList[$storyStage->stage] . "\n";
}
}
}
echo "<td class='" . $class . "' title='$title' style='$style'>";
+4 -4
View File
@@ -21,11 +21,11 @@
<form method='post' target='hiddenwin' action="<?php echo inLink('batchClose', "from=storyBatchClose")?>">
<table class='table table-fixed table-form with-border'>
<thead>
<tr>
<tr class='text-center'>
<th class='w-50px'> <?php echo $lang->idAB;?></th>
<th> <?php echo $lang->story->title;?></th>
<th class='text-left'><?php echo $lang->story->title;?></th>
<th class='w-80px'> <?php echo $lang->story->status;?></th>
<th class='w-120px'><?php echo $lang->story->closedReason;?></th>
<th class='w-150px'><?php echo $lang->story->closedReason;?></th>
<th class='w-p40 '> <?php echo $lang->story->comment;?></th>
</tr>
</thead>
@@ -39,7 +39,7 @@
<table class='w-p100'>
<tr>
<td class='pd-0'>
<?php echo html::select("closedReasons[$storyID]", $lang->story->reasonList, 'done', "class=form-control onchange=setDuplicateAndChild(this.value,$storyID) style='min-width: 70px'");?>
<?php echo html::select("closedReasons[$storyID]", $lang->story->reasonList, 'done', "class=form-control onchange=setDuplicateAndChild(this.value,$storyID) style='min-width: 80px'");?>
</td>
<td class='pd-0' id='<?php echo 'duplicateStoryBox' . $storyID;?>' <?php if($story->closedReason != 'duplicate') echo "style='display:none'";?>>
<?php echo html::input("duplicateStoryIDList[$storyID]", '', "class='form-control' placeholder='{$lang->idAB}'");?>
+2 -1
View File
@@ -350,7 +350,8 @@
{
if(!isset($projects[$task->project])) continue;
$projectName = $projects[$task->project];
echo "<li title='$task->name'>" . html::a($this->createLink('task', 'view', "taskID=$task->id", '', true), "[T]$task->id $task->name", '', "class='iframe' data-width='80%'");
$class = isonlybody() ? 'showinonlybody' : 'iframe';
echo "<li title='$task->name'>" . html::a($this->createLink('task', 'view', "taskID=$task->id", '', true), "[T]$task->id $task->name", '', "class=$class data-width='80%'");
echo html::a($this->createLink('project', 'browse', "projectID=$task->project"), $projectName, '', "class='text-muted'") . '</li>';
}
}
+1 -1
View File
@@ -47,7 +47,7 @@ $lang->task->case = '相关用例';
$lang->task->confirmStoryChange = "确认{$lang->storyCommon}变动";
$lang->task->storyChange = "{$lang->storyCommon}变更";
$lang->task->progress = '进度';
$lang->task->progressAB = '%';
$lang->task->progressAB = '进度';
$lang->task->progressTips = '已消耗/(已消耗+剩余)';
$lang->task->copy = '复制任务';
$lang->task->waitTask = '未开始的任务';
+2
View File
@@ -1420,6 +1420,7 @@ class taskModel extends model
{
$oldTask = $this->getById($taskID);
$now = helper::now();
$today = helper::today();
if(strpos($this->config->task->finish->requiredFields, 'comment') !== false and !$this->post->comment)
{
@@ -1429,6 +1430,7 @@ class taskModel extends model
$task = fixer::input('post')
->setIF(is_numeric($this->post->consumed), 'consumed', (float)$this->post->consumed)
->setIF($oldTask->realStarted == '0000-00-00', 'realStarted', $today)
->setDefault('left', 0)
->setDefault('assignedTo', $oldTask->openedBy)
->setDefault('assignedDate', $now)
+2 -1
View File
@@ -233,7 +233,8 @@
<td>
<?php
if(!$task->storyTitle) echo $lang->noData;
if($task->storyTitle and !common::printLink('story', 'view', "storyID=$task->story", $task->storyTitle, '', "class='iframe' data-width='80%'", true, true)) echo $task->storyTitle;
$class = isonlybody() ? 'showinonlybody' : 'iframe';
if($task->storyTitle and !common::printLink('story', 'view', "storyID=$task->story", $task->storyTitle, '', "class=$class data-width='80%'", true, true)) echo $task->storyTitle;
if($task->needConfirm)
{
echo "(<span class='warning'>{$lang->story->changed}</span> ";
+1 -1
View File
@@ -1446,7 +1446,7 @@ class testtaskModel extends model
break;
case 'title':
if($run->branch) echo "<span class='label label-info label-outline'>{$branches[$run->branch]}</span>";
echo $canView ? html::a($caseLink, $run->title) : $run->title;
echo $canView ? html::a($caseLink, $run->title, null, "style='color: $run->color'") : $run->title;
break;
case 'branch':
echo $branches[$run->branch];