* finish task #6205.

This commit is contained in:
wangyidong
2019-08-08 16:29:51 +08:00
parent ccb5ddd474
commit dec97060a6
5 changed files with 11 additions and 3 deletions
+3 -2
View File
@@ -636,7 +636,7 @@ class productModel extends model
{
if(($plan->end != '0000-00-00' and strtotime($plan->end) - time() <= 0) or $plan->end == '2030-01-01') continue;
$year = substr($plan->end, 0, 4);
$roadmap[$year][$plan->branch][] = $plan;
$roadmap[$year][$plan->branch][$plan->end] = $plan;
$total++;
}
@@ -650,7 +650,7 @@ class productModel extends model
foreach($releases as $release)
{
$year = substr($release->date, 0, 4);
$roadmap[$year][$release->branch][] = $release;
$roadmap[$year][$release->branch][$release->date] = $release;
$total++;
if($count > 0 and $total >= $count) break;
@@ -664,6 +664,7 @@ class productModel extends model
{
foreach($branchRoadmaps as $branch => $roadmaps)
{
krsort($roadmaps);
$totalData = count($roadmaps);
$rows = ceil($totalData / 8);
$maxPerRow = ceil($totalData / $rows);
+1
View File
@@ -28,6 +28,7 @@ $lang->release->confirmUnlinkStory = "您确认移除该需求吗?";
$lang->release->confirmUnlinkBug = "您确认移除该Bug吗?";
$lang->release->existBuild = '『版本』已经有『%s』这条记录了。您可以更改『发布名称』或者选择一个『版本』。';
$lang->release->noRelease = '暂时没有发布。';
$lang->release->errorDate = '发布日期不能大于今天。';
$lang->release->basicInfo = '基本信息';
+5
View File
@@ -106,6 +106,11 @@ class releaseModel extends model
$productID = (int)$productID;
$branch = (int)$branch;
$buildID = 0;
/* Check date must be not more than today. */
if($this->post->date > date('Y-m-d')) return dao::$errors[] = $this->lang->release->errorDate;
/* Auto create build when release is not link build. */
if($this->post->build == false && $this->post->name)
{
$build = $this->dao->select('*')->from(TABLE_BUILD)
+1 -1
View File
@@ -8,4 +8,4 @@ function checkLeft()
if(!result) setTimeout(function() {$.enableForm()}, 500);
return result;
}
}
}
+1
View File
@@ -659,6 +659,7 @@ class testsuite extends control
$this->view->position[] = $this->lang->testsuite->view;
$this->view->lib = $lib;
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
$this->view->actions = $this->loadModel('action')->getList('caselib', $libID);
$this->display();
}