Merge branch 'sprint/tianshujie_bug21210' into 'master'
* Fix bug #21210. See merge request easycorp/zentaopms!2821
This commit is contained in:
@@ -112,7 +112,7 @@ $(function()
|
||||
}
|
||||
echo html::hidden('isEndPage', $isEndPage ? 1 : 0);
|
||||
echo html::hidden('pagerID', $pagerID);
|
||||
echo ' ' . html::backButton();
|
||||
echo ' ' . html::a($this->createLink('caselib', 'browse', "libID=$libID"), $lang->goback, '', 'class="btn btn-wide"');
|
||||
echo ' ' . sprintf($lang->file->importPager, $allCount, $pagerID, $allPager);
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -1018,21 +1018,7 @@ class story extends control
|
||||
|
||||
$module = $this->app->tab == 'project' ? 'projectstory' : 'story';
|
||||
|
||||
if(isonlybody())
|
||||
{
|
||||
$execution = $this->execution->getByID($this->session->execution);
|
||||
if($this->app->tab == 'execution' and $execution->type == 'kanban' and $this->app->tab == 'execution')
|
||||
{
|
||||
$kanbanData = $this->loadModel('kanban')->getRDKanban($this->session->execution, $this->session->execLaneType ? $this->session->execLaneType : 'all');
|
||||
$kanbanData = json_encode($kanbanData);
|
||||
|
||||
return print(js::closeModal('parent.parent', '', "parent.parent.updateKanban($kanbanData)"));
|
||||
}
|
||||
else
|
||||
{
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
}
|
||||
if(isonlybody()) return print(js::reload('parent.parent'));
|
||||
|
||||
if(defined('RUN_MODE') && RUN_MODE == 'api') return $this->send(array('status' => 'success'));
|
||||
return print(js::locate($this->createLink($module, 'view', "storyID=$storyID"), 'parent'));
|
||||
|
||||
@@ -73,16 +73,14 @@ class testsuite extends control
|
||||
/* Append id for secend sort. */
|
||||
$sort = common::appendOrder($orderBy);
|
||||
|
||||
$suites = $this->testsuite->getSuites($productID, $sort, $pager);
|
||||
$productName = isset($this->products[$productID]) ? $this->products[$productID] : '';
|
||||
$suites = $this->testsuite->getSuites($productID, $sort, $pager, 'all');
|
||||
if(empty($suites) and $pageID > 1)
|
||||
{
|
||||
$pager = pager::init(0, $recPerPage, 1);
|
||||
$suites = $this->testsuite->getSuites($productID, $sort, $pager);
|
||||
$pager = pager::init(0, $recPerPage, 1);
|
||||
$suites = $this->testsuite->getSuites($productID, $sort, $pager, 'all');
|
||||
}
|
||||
|
||||
$productName = isset($this->products[$productID]) ? $this->products[$productID] : '';
|
||||
$suites = $this->testsuite->getSuites($productID, $sort, $pager);
|
||||
|
||||
$this->view->title = $productName . $this->lang->testsuite->common;
|
||||
$this->view->position[] = html::a($this->createLink('testsuite', 'browse', "productID=$productID"), $productName);
|
||||
$this->view->position[] = $this->lang->testsuite->common;
|
||||
|
||||
@@ -87,16 +87,17 @@ class testsuiteModel extends model
|
||||
* @param int $productID
|
||||
* @param string $orderBy
|
||||
* @param object $pager
|
||||
* @param string $param
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getSuites($productID, $orderBy = 'id_desc', $pager = null)
|
||||
public function getSuites($productID, $orderBy = 'id_desc', $pager = null, $param = '')
|
||||
{
|
||||
return $this->dao->select("*")->from(TABLE_TESTSUITE)
|
||||
->where('product')->eq((int)$productID)
|
||||
->beginIF($this->config->systemMode == 'new' and $this->lang->navGroup->testsuite != 'qa')->andWhere('project')->eq($this->session->project)->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->andWhere("(`type` = 'public' OR (`type` = 'private' and addedBy = '{$this->app->user->account}'))")
|
||||
->beginIF(strpos($param, 'all') === false)->andWhere("(`type` = 'public' OR (`type` = 'private' and addedBy = '{$this->app->user->account}'))")->fi()
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<?php foreach($suites as $suite):?>
|
||||
<tr class='text-left'>
|
||||
<td><?php echo html::a(helper::createLink('testsuite', 'view', "suiteID=$suite->id"), sprintf('%03d', $suite->id));?></td>
|
||||
<td class='text-left' title="<?php echo $suite->name?>">
|
||||
<td class='text-left c-name' title="<?php echo $suite->name?>">
|
||||
<?php if($suite->type == 'public') echo "<span class='label label-success label-badge'>{$lang->testsuite->authorList['public']}</span> ";?>
|
||||
<?php if($suite->type == 'private') echo "<span class='label label-info label-badge'>{$lang->testsuite->authorList['private']}</span> ";?>
|
||||
<?php echo html::a(inlink('view', "suiteID=$suite->id"), $suite->name);?>
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
<td><?php echo html::textarea('desc', htmlSpecialString($suite->desc), "rows=10 class='form-control'");?></td>
|
||||
</tr>
|
||||
<?php $this->printExtendFields($suite, 'table');?>
|
||||
<?php if($suite->type != 'library'):?>
|
||||
<?php if($suite->type != 'library' and $suite->type != 'unit'):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testsuite->author;?></th>
|
||||
<td><?php echo html::radio('type', $lang->testsuite->authorList, $suite->type);?></td>
|
||||
|
||||
Reference in New Issue
Block a user