* finish task #2380,2389,2390.
This commit is contained in:
@@ -100,4 +100,3 @@ class branchModel extends model
|
||||
return $branchGroups;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -176,6 +176,7 @@ class bug extends control
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->memberPairs = $memberPairs;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -325,7 +326,7 @@ class bug extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch, 'noempty,release,noterminate,nodone');
|
||||
$builds = $this->loadModel('build')->getProductBuildPairs($productID, $branch, 'noempty,noterminate,nodone');
|
||||
$stories = $this->story->getProductStoryPairs($productID, $branch);
|
||||
}
|
||||
|
||||
|
||||
@@ -885,7 +885,7 @@ class bugModel extends model
|
||||
->andWhere('toStory')->eq(0)
|
||||
->andWhere('openedDate')->ge($project->begin)
|
||||
->andWhere('openedDate')->le($project->end)
|
||||
->andWhere("(status = 'active' OR resolvedDate > {$project->end})")
|
||||
->andWhere("(status = 'active' OR resolvedDate > '{$project->end}')")
|
||||
->andWhere('openedBuild')->notin($beforeBuilds)
|
||||
->beginIF($branch)->andWhere('branch')->in("0,$branch")->fi()
|
||||
->fetchAll();
|
||||
|
||||
@@ -125,7 +125,13 @@ js::set('moduleID', $moduleID);
|
||||
<td><span class='<?php echo 'pri' . zget($lang->bug->priList, $bug->pri, $bug->pri);?>'><?php echo zget($lang->bug->priList, $bug->pri, $bug->pri);?></span></td>
|
||||
|
||||
<?php $class = 'confirm' . $bug->confirmed;?>
|
||||
<td class='text-left' title="<?php echo $bug->title?>"><?php echo "<span class='$class'>[{$lang->bug->confirmedList[$bug->confirmed]}] </span>" . html::a($bugLink, $bug->title);?></td>
|
||||
<td class='text-left' title="<?php echo $bug->title?>">
|
||||
<?php
|
||||
echo "<span class='$class'>[{$lang->bug->confirmedList[$bug->confirmed]}] </span>";
|
||||
if($bug->branch)echo "<span class='label label-info label-badge'>{$branches[$bug->branch]}</span>";
|
||||
echo html::a($bugLink, $bug->title);
|
||||
?>
|
||||
</td>
|
||||
<td class='bug-<?php echo $bug->status?>'><?php echo $bug->needconfirm ? "<span class='warning'>{$lang->story->changed}</span>" : $lang->bug->statusList[$bug->status];?></td>
|
||||
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
|
||||
@@ -122,19 +122,15 @@ class buildModel extends model
|
||||
->beginIF($branch)->andWhere('branch')->in("0,$branch")->fi()
|
||||
->fetchAll('build');
|
||||
|
||||
/* Filter done projects and terminate releases, replace build name with release name. */
|
||||
$builds = array();
|
||||
foreach($productBuilds as $key => $build)
|
||||
{
|
||||
if((strpos($params, 'nodone') !== false) and ($build->projectStatus === 'done')) continue;
|
||||
if((strpos($params, 'noterminate') !== false) and ($build->releaseStatus === 'terminate')) continue;
|
||||
if((strpos($params, 'nodone') !== false) and ($build->projectStatus === 'done')) continue;
|
||||
if($build->project)
|
||||
{
|
||||
$builds[$key] = $build->name;
|
||||
}
|
||||
else if(isset($releases[$key]) and !$releases[$key]->deleted)
|
||||
{
|
||||
$builds[$key] = $releases[$key]->name;
|
||||
}
|
||||
|
||||
if($build->project) $builds[$key] = $build->name;
|
||||
if(isset($releases[$key]) and !$releases[$key]->deleted) $builds[$key] = $releases[$key]->name;
|
||||
}
|
||||
|
||||
if(!$builds) return $sysBuilds;
|
||||
|
||||
@@ -266,10 +266,11 @@ class fileModel extends model
|
||||
preg_match_all('/<img src="(data:image\/(\S+);base64,(\S+))".*\/>/U', $data, $out);
|
||||
foreach($out[3] as $key => $base64Image)
|
||||
{
|
||||
if(!in_array($out[2][$key], $this->config->file->imageExtensions)) die();
|
||||
$extension = strtolower($out[2][$key]);
|
||||
if(!in_array($extension, $this->config->file->imageExtensions)) die();
|
||||
$imageData = base64_decode($base64Image);
|
||||
|
||||
$file['extension'] = $out[2][$key];
|
||||
$file['extension'] = $extension;
|
||||
$file['pathname'] = $this->setPathName($key, $file['extension']);
|
||||
$file['size'] = strlen($imageData);
|
||||
$file['addedBy'] = $this->app->user->account;
|
||||
|
||||
@@ -22,10 +22,10 @@ include '../../common/view/header.html.php';
|
||||
<tr>
|
||||
<td class='text-center'>
|
||||
<?php if(common::hasPriv('mail', 'detect')):?>
|
||||
<?php echo html::a(inlink('detect'), $lang->mail->smtp, '', "class='btn btn-default w-150px'")?>
|
||||
<?php echo html::a(inlink('detect'), $lang->mail->smtp, '', "class='btn btn-sm w-120px'")?>
|
||||
<?php endif;?>
|
||||
<?php if($this->app->getClientLang() != 'en' and common::hasPriv('mail', 'sendCloud')):?>
|
||||
<?php echo html::a(inlink('sendCloud'), $lang->mail->sendCloud, '', "class='btn btn-default w-150px'")?>
|
||||
<?php echo html::a(inlink('sendCloud'), $lang->mail->sendCloud, '', "class='btn btn-sm w-120px'")?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -29,14 +29,14 @@ include '../../common/view/header.html.php';
|
||||
<th><?php echo $lang->mail->accessKey; ?></th>
|
||||
<td>
|
||||
<div class='required required-wrapper'></div>
|
||||
<?php echo html::input('accessKey', $mailConfig->accessKey, "class='form-control'");?>
|
||||
<?php echo html::input('accessKey', isset($mailConfig->accessKey) ? $mailConfig->accessKey : '', "class='form-control'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->mail->secretKey; ?></th>
|
||||
<td>
|
||||
<div class='required required-wrapper'></div>
|
||||
<?php echo html::input('secretKey', $mailConfig->secretKey, "class='form-control'");?>
|
||||
<?php echo html::input('secretKey', isset($mailConfig->secretKey) ? $mailConfig->secretKey : '', "class='form-control'");?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -204,7 +204,7 @@
|
||||
{
|
||||
unset($plans['']);
|
||||
$plans = array(0 => $lang->null) + $plans;
|
||||
$withSearch = count($plans) > 10;
|
||||
$withSearch = count($plans) > 8;
|
||||
echo "<li class='dropdown-submenu'>";
|
||||
echo html::a('javascript:;', $lang->story->planAB, '', "id='planItem'");
|
||||
echo "<ul class='dropdown-menu" . ($withSearch ? ' with-search':'') . "'>";
|
||||
|
||||
+32
-23
@@ -586,19 +586,20 @@ class project extends control
|
||||
if($products) $productID = key($products);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->summary = $this->product->summary($stories);
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->type = $type;
|
||||
$this->view->param = $param;
|
||||
$this->view->storyTasks = $storyTasks;
|
||||
$this->view->moduleTree = $this->loadModel('tree')->getProjectStoryTreeMenu($projectID, $startModuleID = 0, array('treeModel', 'createProjectStoryLink'));
|
||||
$this->view->tabID = 'story';
|
||||
$this->view->users = $users;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->summary = $this->product->summary($stories);
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->type = $type;
|
||||
$this->view->param = $param;
|
||||
$this->view->storyTasks = $storyTasks;
|
||||
$this->view->moduleTree = $this->loadModel('tree')->getProjectStoryTreeMenu($projectID, $startModuleID = 0, array('treeModel', 'createProjectStoryLink'));
|
||||
$this->view->tabID = 'story';
|
||||
$this->view->users = $users;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noempty');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -1531,11 +1532,19 @@ class project extends control
|
||||
|
||||
$queryID = ($browseType == 'bySearch') ? (int)$param : 0;
|
||||
|
||||
$productPairs = array();
|
||||
foreach($products as $product)
|
||||
{
|
||||
$branches[$product->branch] = $product->branch;
|
||||
$productPairs[$product->id] = $product->name;
|
||||
}
|
||||
|
||||
|
||||
/* Build search form. */
|
||||
unset($this->config->product->search['fields']['module']);
|
||||
$this->config->product->search['actionURL'] = $this->createLink('project', 'linkStory', "projectID=$projectID&browseType=bySearch&queryID=myQueryID");
|
||||
$this->config->product->search['queryID'] = $queryID;
|
||||
$this->config->product->search['params']['product']['values'] = $products + array('all' => $this->lang->product->allProductsOfProject);
|
||||
$this->config->product->search['params']['product']['values'] = $productPairs + array('all' => $this->lang->product->allProductsOfProject);
|
||||
$this->config->product->search['params']['plan']['values'] = $this->loadModel('productplan')->getForProducts($products);
|
||||
unset($this->lang->story->statusList['draft']);
|
||||
unset($this->config->product->search['fields']['branch']);
|
||||
@@ -1554,19 +1563,19 @@ class project extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach($products as $product) $branches[$product->branch] = $product->branch;
|
||||
$allStories = $this->story->getProductStories(array_keys($products), $branches, $moduleID = '0', $status = 'active');
|
||||
}
|
||||
$prjStories = $this->story->getProjectStoryPairs($projectID);
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->project = $project;
|
||||
$this->view->products = $products;
|
||||
$this->view->allStories = $allStories;
|
||||
$this->view->prjStories = $prjStories;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->project = $project;
|
||||
$this->view->products = $products;
|
||||
$this->view->allStories = $allStories;
|
||||
$this->view->prjStories = $prjStories;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noempty');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
<th><?php echo $lang->story->product;?></th>
|
||||
<th><?php echo $lang->story->title;?></th>
|
||||
<th><?php echo $lang->story->plan;?></th>
|
||||
<th><?php echo $lang->branch->common;?></th>
|
||||
<th class='w-user'><?php echo $lang->openedByAB;?></th>
|
||||
<th class='w-80px'><?php echo $lang->story->estimateAB;?></th>
|
||||
</tr>
|
||||
@@ -48,6 +49,7 @@
|
||||
<td><?php echo html::a($this->createLink('product', 'browse', "productID=$story->product&branch=$story->branch"), $products[$story->product]->name, '_blank');?></td>
|
||||
<td class='text-left nobr' title="<?php echo $story->title?>"><?php echo html::a($storyLink, $story->title);?></td>
|
||||
<td><?php echo $story->planTitle;?></td>
|
||||
<td><?php if(isset($branchGroups[$story->product][$story->branch])) echo $branchGroups[$story->product][$story->branch];?></td>
|
||||
<td><?php echo $users[$story->openedBy];?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
</tr>
|
||||
|
||||
@@ -78,7 +78,10 @@
|
||||
<?php echo html::a($storyLink, sprintf('%03d', $story->id));?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->story->priList, $story->pri, $story->pri)?>'><?php echo zget($lang->story->priList, $story->pri, $story->pri);?></span></td>
|
||||
<td class='text-left' title="<?php echo $story->title?>"><?php echo html::a($storyLink,$story->title);?></td>
|
||||
<td class='text-left' title="<?php echo $story->title?>">
|
||||
<?php if(isset($branchGroups[$story->product][$story->branch])) echo "<span class='label label-info lagel-badge'>" . $branchGroups[$story->product][$story->branch] . '</span>';?>
|
||||
<?php echo html::a($storyLink,$story->title);?>
|
||||
</td>
|
||||
<td><?php echo $users[$story->openedBy];?></td>
|
||||
<td><?php echo $users[$story->assignedTo];?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
|
||||
@@ -171,6 +171,7 @@ class testcase extends control
|
||||
$this->view->param = $param;
|
||||
$this->view->cases = $cases;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -66,7 +66,10 @@ js::set('batchDelete', $lang->testcase->confirmBatchDelete);
|
||||
<?php echo html::a($viewLink, sprintf('%03d', $case->id));?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $case->pri, $case->pri)?>'><?php echo zget($lang->testcase->priList, $case->pri, $case->pri);?></span></td>
|
||||
<td class='text-left' title="<?php echo $case->title?>"><?php echo html::a($viewLink, $case->title);?></td>
|
||||
<td class='text-left' title="<?php echo $case->title?>">
|
||||
<?php if($case->branch) echo "<span class='label label-info label-badge'>{$branches[$case->branch]}</span>"?>
|
||||
<?php echo html::a($viewLink, $case->title);?>
|
||||
</td>
|
||||
<?php if($browseType == 'needconfirm'):?>
|
||||
<td class='text-left'><?php echo html::a($this->createLink('story', 'view', "storyID=$case->story"), $case->storyTitle, '_blank');?></td>
|
||||
<td><?php $lang->testcase->confirmStoryChange = $lang->confirm; common::printIcon('testcase', 'confirmStoryChange', "caseID=$case->id", '', 'list', '', 'hiddenwin');?></td>
|
||||
|
||||
@@ -324,6 +324,7 @@ class testtask extends control
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden';
|
||||
$this->view->pager = $pager;
|
||||
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -62,7 +62,9 @@ var moduleID = '<?php echo $moduleID;?>';
|
||||
<?php printf('%03d', $run->case);?>
|
||||
</td>
|
||||
<td><span class='<?php echo 'pri' . zget($lang->testcase->priList, $run->pri, $run->pri)?>'><?php echo zget($lang->testcase->priList, $run->pri, $run->pri)?></span></td>
|
||||
<td class='text-left nobr'><?php echo html::a($this->createLink('testcase', 'view', "caseID=$run->case&version=$run->version&from=testtask&taskID=$run->task"), $run->title, '_blank');?>
|
||||
<td class='text-left nobr'>
|
||||
<?php if($run->branch) echo "<span class='label label-info label-badge'>{$branches[$run->branch]}</span>"?>
|
||||
<?php echo html::a($this->createLink('testcase', 'view', "caseID=$run->case&version=$run->version&from=testtask&taskID=$run->task"), $run->title, '_blank');?>
|
||||
</td>
|
||||
<td><?php echo $lang->testcase->typeList[$run->type];?></td>
|
||||
<td><?php $assignedTo = $users[$run->assignedTo]; echo substr($assignedTo, strpos($assignedTo, ':') + 1);?></td>
|
||||
|
||||
@@ -140,7 +140,6 @@ $lang->user->placeholder->account = 'Letters/underline/numbers, three above';
|
||||
$lang->user->placeholder->password1 = 'Six above';
|
||||
$lang->user->placeholder->role = '';
|
||||
$lang->user->placeholder->group = '';
|
||||
$lang->user->placeholder->join = 'The date the employee joined the company';
|
||||
$lang->user->placeholder->commiter = 'The account in version control systems';
|
||||
$lang->user->placeholder->verify = 'You need to enter the password to verify.';
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ $lang->user->mobile = '手机';
|
||||
$lang->user->phone = '电话';
|
||||
$lang->user->address = '通讯地址';
|
||||
$lang->user->zipcode = '邮编';
|
||||
$lang->user->join = '入职时间';
|
||||
$lang->user->join = '入职日期';
|
||||
$lang->user->visits = '访问次数';
|
||||
$lang->user->ip = '最后IP';
|
||||
$lang->user->last = '最后登录';
|
||||
@@ -140,7 +140,6 @@ $lang->user->placeholder->account = '英文、数字和下划线的组合,
|
||||
$lang->user->placeholder->password1 = '六位以上';
|
||||
$lang->user->placeholder->role = '职位影响内容和用户列表的顺序。';
|
||||
$lang->user->placeholder->group = '分组决定用户的权限列表。';
|
||||
$lang->user->placeholder->join = '入职日期';
|
||||
$lang->user->placeholder->commiter = '版本控制系统(subversion)中的帐号';
|
||||
$lang->user->placeholder->verify = '需要输入你的密码加以验证';
|
||||
|
||||
|
||||
Reference in New Issue
Block a user