Merge branch 'master' of github.com:easysoft/zentaopms
This commit is contained in:
@@ -43,7 +43,7 @@ class router extends baseRouter
|
||||
global $config;
|
||||
if(!isset($config->global)) $config->global = new stdclass();
|
||||
$flow = $this->dbh->query('SELECT value FROM' . TABLE_CONFIG . "WHERE `owner`='system' AND `module`='common' AND `key`='flow'")->fetch();
|
||||
$config->global->flow = $flow->value;
|
||||
if($flow) $config->global->flow = $flow->value;
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
@@ -154,7 +154,6 @@ class build extends control
|
||||
$this->view->product = isset($productGroups[$build->product]) ? $productGroups[$build->product] : '';
|
||||
$this->view->branches = (isset($productGroups[$build->product]) and $productGroups[$build->product]->type == 'normal') ? array() : $this->loadModel('branch')->getPairs($build->product);
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
$this->view->productGroups = $productGroups;
|
||||
|
||||
@@ -4,3 +4,5 @@
|
||||
.green {color:green}
|
||||
input[type=checkbox].ml-10px{margin-left:10px;}
|
||||
.pdl-8px{padding-left:8px;}
|
||||
|
||||
.input-group > .input-group-addon.fix-padding{padding: 0;}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th class='w-110px'><?php echo $lang->build->product;?></th>
|
||||
<?php if($products or $this->config->global->flow == 'onlyTest'):?>
|
||||
<?php if($products):?>
|
||||
<td>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('product', $products, $product->id, "onchange='loadBranches(this.value);' class='form-control chosen'");?>
|
||||
@@ -32,7 +32,7 @@
|
||||
if($product->type != 'normal')
|
||||
{
|
||||
if($product->branch) $branches = array($product->branch => $branches[$product->branch]);
|
||||
echo html::select('branch', $branches, $product->branch, "class='form-control' style='width:100px; display:inline-block;'");
|
||||
echo "<span class='input-group-addon fix-padding fix-border'></span>" . html::select('branch', $branches, $product->branch, "class='form-control' style='width:100px; display:inline-block;'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->id);?>
|
||||
</td>
|
||||
<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>
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', true), $bug->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td><?php echo $users[$bug->openedBy];?></td>
|
||||
<td style='overflow:visible;padding-top:1px;padding-bottom:1px;'><?php echo ($bug->status == 'resolved' or $bug->status == 'closed') ? $users[$bug->resolvedBy] : html::select("resolvedBy[{$bug->id}]", $users, $this->app->user->account, "class='form-control chosen'");?></td>
|
||||
<td class='text-center bug-<?php echo $bug->status?>'><?php echo $lang->bug->statusList[$bug->status];?></td>
|
||||
@@ -59,4 +59,10 @@
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script>$(function(){ajaxGetSearchForm('#bugs .linkBox #querybox')})</script>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
ajaxGetSearchForm('#bugs .linkBox #querybox');
|
||||
setModal();
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<?php echo html::a($this->createLink('story', 'view', "storyID=$story->id"), $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 nobr' title='<?php echo $story->title?>'><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?></td>
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td><?php echo $users[$story->openedBy];?></td>
|
||||
<td><?php echo $users[$story->assignedTo];?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
@@ -64,4 +64,10 @@
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script>$(function(){ajaxGetSearchForm('#stories .linkBox #querybox')})</script>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
ajaxGetSearchForm('#stories .linkBox #querybox');
|
||||
setModal();
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -555,7 +555,7 @@ $lang->icons['confirmStoryChange'] = 'search';
|
||||
include (dirname(__FILE__) . '/menuOrder.php');
|
||||
|
||||
global $config;
|
||||
if($config->global->flow == 'onlyStory')
|
||||
if(isset($config->global->flow) and $config->global->flow == 'onlyStory')
|
||||
{
|
||||
/* Remove project, report and qa module. */
|
||||
unset($lang->menu->project);
|
||||
@@ -588,7 +588,7 @@ if($config->global->flow == 'onlyStory')
|
||||
unset($lang->searchObjects['testtask']);
|
||||
}
|
||||
|
||||
if($config->global->flow == 'onlyTask')
|
||||
if(isset($config->global->flow) and $config->global->flow == 'onlyTask')
|
||||
{
|
||||
/* Remove product, report and qa module. */
|
||||
unset($lang->menu->product);
|
||||
@@ -629,7 +629,7 @@ if($config->global->flow == 'onlyTask')
|
||||
unset($lang->searchObjects['testtask']);
|
||||
}
|
||||
|
||||
if($config->global->flow == 'onlyTest')
|
||||
if(isset($config->global->flow) and $config->global->flow == 'onlyTest')
|
||||
{
|
||||
/* Remove project and test module. */
|
||||
unset($lang->menu->project);
|
||||
@@ -653,18 +653,22 @@ if($config->global->flow == 'onlyTest')
|
||||
unset($lang->project->menu);
|
||||
unset($lang->project->menuOrder);
|
||||
|
||||
/* 增加缺陷管理、用例管理和测试任务视图 */
|
||||
$lang->menu->bug = 'Bug|bug|index';
|
||||
$lang->menu->testcase = '用例|testcase|index';
|
||||
$lang->menu->testtask = '测试|testtask|index';
|
||||
/* Add bug, testcase and testtask module. */
|
||||
$lang->menu->bug = 'Bug|bug|index';
|
||||
$lang->menu->testcase = '用例|testcase|index';
|
||||
$lang->menu->testtask = '测试|testtask|index';
|
||||
$lang->menu->testsuite = '套件|testsuite|index';
|
||||
$lang->menu->testreport = '报告|testreport|browse';
|
||||
|
||||
$lang->menuOrder[6] = 'bug';
|
||||
$lang->menuOrder[7] = 'testcase';
|
||||
$lang->menuOrder[8] = 'testtask';
|
||||
|
||||
/* 调整缺陷管理的二级菜单 */
|
||||
$lang->bug->menu = new stdclass();
|
||||
$lang->menuOrder[6] = 'bug';
|
||||
$lang->menuOrder[7] = 'testcase';
|
||||
$lang->menuOrder[8] = 'testtask';
|
||||
$lang->menuOrder[9] = 'testsuite';
|
||||
$lang->menuOrder[10] = 'testreport';
|
||||
$lang->menuOrder[11] = 'product';
|
||||
|
||||
/* Adjust sub menu of bug module. */
|
||||
$lang->bug->menu = new stdclass();
|
||||
$lang->bug->menu->product = '%s';
|
||||
$lang->bug->menu->browse = array('link' => '浏览Bug|bug|browse|productID=%s', 'alias' => 'viewedit,resolve,close,activate,report', 'subModule' => 'tree');
|
||||
$lang->bug->menu->create = array('link' => '提Bug|bug|create|productID=%s');
|
||||
@@ -673,9 +677,8 @@ if($config->global->flow == 'onlyTest')
|
||||
$lang->bug->menuOrder[10] = 'browse';
|
||||
$lang->bug->menuOrder[15] = 'create';
|
||||
|
||||
/* 调整用例管理的二级菜单 */
|
||||
$lang->testcase->menu = new stdclass();
|
||||
|
||||
/* Adjust sub menu of testcase. */
|
||||
$lang->testcase->menu = new stdclass();
|
||||
$lang->testcase->menu->product = '%s';
|
||||
$lang->testcase->menu->browse = array('link' => '浏览用例|testcase|browse|productID=%s', 'alias' => 'viewedit,resolve,close,activate,report', 'subModule' => 'tree');
|
||||
$lang->testcase->menu->create = array('link' => '创建用例|testcase|create|productID=%s');
|
||||
@@ -684,9 +687,8 @@ if($config->global->flow == 'onlyTest')
|
||||
$lang->testcase->menuOrder[10] = 'browse';
|
||||
$lang->testcase->menuOrder[15] = 'create';
|
||||
|
||||
/* 调整测试任务的二级菜单 */
|
||||
$lang->testtask->menu = new stdclass();
|
||||
|
||||
/* Adjust sub menu of testtask. */
|
||||
$lang->testtask->menu = new stdclass();
|
||||
$lang->testtask->menu->product = '%s';
|
||||
$lang->testtask->menu->browse = array('link' => '浏览版本|testtask|browse|productID=%s', 'alias' => 'viewedit,resolve,close,activate,report', 'subModule' => 'tree');
|
||||
$lang->testtask->menu->create = array('link' => '提交测试|testtask|create|productID=%s');
|
||||
@@ -695,7 +697,29 @@ if($config->global->flow == 'onlyTest')
|
||||
$lang->testtask->menuOrder[10] = 'browse';
|
||||
$lang->testtask->menuOrder[15] = 'create';
|
||||
|
||||
/* 调整产品视图的二级菜单 */
|
||||
/* Adjust sub menu of bug module. */
|
||||
$lang->testsuite->menu = new stdclass();
|
||||
$lang->testsuite->menu->product = '%s';
|
||||
$lang->testsuite->menu->browse = array('link' => '浏览套件|testsuite|browse|productID=%s', 'alias' => 'linkcase,edit,view');
|
||||
$lang->testsuite->menu->caselib = array('link' => '用例库|testsuite|library', 'alias' => 'createcase,libview,edit,batchcreatecase,showimport', 'subModule' => 'tree,testcase');
|
||||
|
||||
$lang->testsuite->menuOrder[5] = 'product';
|
||||
$lang->testsuite->menuOrder[10] = 'browse';
|
||||
$lang->testsuite->menuOrder[15] = 'create';
|
||||
|
||||
/* Adjust sub menu of caselib module. */
|
||||
$lang->caselib->menu = new stdclass();
|
||||
$lang->caselib->menu->lib = array('link' => '%s', 'fixed' => true);
|
||||
$lang->caselib->menu->testsuite = array('link' => '浏览套件|testsuite|browse|productID=%s', 'alias' => 'linkcase,edit,view');
|
||||
$lang->caselib->menu->caselib = array('link' => '用例库|testsuite|library', 'alias' => 'createlib,createcase,libview,edit,batchcreatecase,showimport', 'subModule' => 'tree,testcase');
|
||||
$lang->caselib->menu->createlib = array('link' => "<i class='icon-plus'></i>创建库|testsuite|createLib|", 'float' => 'right');
|
||||
|
||||
/* Adjust sub menu of report module. */
|
||||
$lang->testreport->menu = new stdclass();
|
||||
$lang->testreport->menu->product = '%s';
|
||||
$lang->testreport->menu->browse = array('link' => '浏览报告|testreport|browse|productID=%s', 'alias' => 'create,edit,view');
|
||||
|
||||
/* Adjust sub menu of product module. */
|
||||
unset($lang->product->menu->story);
|
||||
unset($lang->product->menu->project);
|
||||
unset($lang->product->menu->release);
|
||||
@@ -714,12 +738,15 @@ if($config->global->flow == 'onlyTest')
|
||||
$lang->build->menu = $lang->product->menu;
|
||||
$lang->build->menuOrder = $lang->product->menuOrder;
|
||||
|
||||
/* 调整菜单分组 */
|
||||
$lang->menugroup->bug = 'bug';
|
||||
$lang->menugroup->testcase = 'testcase';
|
||||
$lang->menugroup->testtask = 'testtask';
|
||||
/* Adjust menu group. */
|
||||
$lang->menugroup->bug = 'bug';
|
||||
$lang->menugroup->testcase = 'testcase';
|
||||
$lang->menugroup->testtask = 'testtask';
|
||||
$lang->menugroup->testsuite = 'testsuite';
|
||||
$lang->menugroup->testreport = 'testreport';
|
||||
$lang->menugroup->build = 'product';
|
||||
|
||||
/* 调整搜索项 */
|
||||
/* Adjust search objects. */
|
||||
unset($lang->searchObjects['story']);
|
||||
unset($lang->searchObjects['task']);
|
||||
unset($lang->searchObjects['release']);
|
||||
|
||||
@@ -1235,6 +1235,8 @@ class commonModel extends model
|
||||
*/
|
||||
public static function setMenuVars($menu, $key, $params)
|
||||
{
|
||||
if(!isset($menu->$key)) return false;
|
||||
|
||||
if(is_array($params))
|
||||
{
|
||||
if(is_array($menu->$key))
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
if($libID == 'files') $libLink = inlink('showFiles', "type=$type&objectID=$object->id");
|
||||
?>
|
||||
<a class='lib <?php echo $libID == 'files' ? 'files' : '';?>' title='<?php echo $libName?>' href='<?php echo $libLink?>' data-id='<?php echo $libID;?>'>
|
||||
<?php if($libID != 'files'):?><i class='icon icon-move'></i><?php endif;?>
|
||||
<?php if($libID != 'files' and $libID != 'project'):?><i class='icon icon-move'></i><?php endif;?>
|
||||
<img src='<?php echo $config->webRoot . 'theme/default/images/main/doc-lib.png'?>' class='file-icon' />
|
||||
<div class='lib-name' title='<?php echo $libName?>'><?php echo $libName?></div>
|
||||
</a>
|
||||
|
||||
@@ -662,6 +662,13 @@ class product extends control
|
||||
$this->locate($this->createLink('doc', 'objectLibs', "type=product&objectID=$productID&from=product"));
|
||||
}
|
||||
|
||||
/**
|
||||
* Build of product.
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function build($productID = 0)
|
||||
{
|
||||
$this->app->loadLang('build');
|
||||
|
||||
@@ -830,7 +830,7 @@ class productModel extends model
|
||||
public function getProductLink($module, $method, $extra, $branch = false)
|
||||
{
|
||||
$link = '';
|
||||
if(strpos('product,roadmap,bug,testcase,testtask,story,qa,testsuite,testreport', $module) !== false)
|
||||
if(strpos('product,roadmap,bug,testcase,testtask,story,qa,testsuite,testreport,build', $module) !== false)
|
||||
{
|
||||
if($module == 'product' && $method == 'project')
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ include '../../common/view/tablesorter.html.php';
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->id);?>
|
||||
</td>
|
||||
<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>
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', true), $bug->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td><?php echo $users[$bug->openedBy];?></td>
|
||||
<td><?php echo $users[$bug->assignedTo];?></td>
|
||||
<td class='bug-<?php echo $bug->status?>'><?php echo $lang->bug->statusList[$bug->status];?></td>
|
||||
@@ -65,4 +65,10 @@ include '../../common/view/tablesorter.html.php';
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script>$(function(){ajaxGetSearchForm('#bugs .linkBox #querybox');})</script>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
ajaxGetSearchForm('#bugs .linkBox #querybox');
|
||||
setModal();
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -88,7 +88,7 @@
|
||||
<div class='type-tips'><?php echo $lang->project->typeDesc;?></div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if($this->config->global->flow != '')?>
|
||||
<?php if($this->config->global->flow != 'onlyTask'):?>
|
||||
<tr <?php if($this->config->global->flow != 'onlyTask') echo "class='hidden'";?>>
|
||||
<th><?php echo $lang->project->manageProducts;?></th>
|
||||
<td class='text-left' id='productsBox' colspan="2">
|
||||
@@ -113,6 +113,7 @@
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->project->desc;?></th>
|
||||
<td colspan='2'><?php echo html::textarea('desc', '', "rows='6' class='form-control'");?></td>
|
||||
|
||||
@@ -38,7 +38,7 @@ $formID = $type == 'leftBug' ? 'unlinkedLeftBugsForm' : 'unlinkedBugsForm';
|
||||
<?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->id);?>
|
||||
</td>
|
||||
<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>
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id"), $bug->title);?></td>
|
||||
<td class='text-left nobr' title='<?php echo $bug->title?>'><?php echo html::a($this->createLink('bug', 'view', "bugID=$bug->id", '', true), $bug->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td><?php echo $users[$bug->openedBy];?></td>
|
||||
<td><?php echo $users[$bug->resolvedBy];?></td>
|
||||
<td class='text-center bug-<?php echo $bug->status?>'><?php echo $lang->bug->statusList[$bug->status];?></td>
|
||||
@@ -62,4 +62,10 @@ $formID = $type == 'leftBug' ? 'unlinkedLeftBugsForm' : 'unlinkedBugsForm';
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script>$(function(){ajaxGetSearchForm('#<?php echo $type == 'bug' ? 'bugs' : 'leftBugs'?> .linkBox #querybox')})</script>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
ajaxGetSearchForm('#<?php echo $type == 'bug' ? 'bugs' : 'leftBugs'?> .linkBox #querybox')
|
||||
setModal();
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<?php echo html::a($this->createLink('story', 'view', "storyID=$story->id"), $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 nobr' title='<?php echo $story->title?>'><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id"), $story->title);?></td>
|
||||
<td class='text-left nobr' title='<?php echo $story->title?>'><?php echo html::a($this->createLink('story', 'view', "storyID=$story->id", '', true), $story->title, '', "data-toggle='modal' data-type='iframe' data-width='90%'");?></td>
|
||||
<td><?php echo $users[$story->openedBy];?></td>
|
||||
<td><?php echo $users[$story->assignedTo];?></td>
|
||||
<td><?php echo $story->estimate;?></td>
|
||||
@@ -62,4 +62,10 @@
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<script>$(function(){ajaxGetSearchForm('#stories .linkBox #querybox')})</script>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
ajaxGetSearchForm('#stories .linkBox #querybox');
|
||||
setModal();
|
||||
})
|
||||
</script>
|
||||
|
||||
@@ -38,7 +38,7 @@ $config->story->list->exportFields = '
|
||||
childStories, linkStories, duplicateStory, files';
|
||||
|
||||
$config->story->list->customCreateFields = 'source,verify,pri,estimate,mailto,keywords';
|
||||
$config->story->list->customBatchCreateFields = 'module,plan,source,spec,verify,pri,estimate,review,keywords';
|
||||
$config->story->list->customBatchCreateFields = 'module,plan,spec,source,verify,pri,estimate,review,keywords';
|
||||
$config->story->list->customBatchEditFields = 'module,plan,estimate,pri,assignedTo,source,stage,closedBy,closedReason,keywords';
|
||||
|
||||
$config->story->custom = new stdclass();
|
||||
|
||||
@@ -68,16 +68,12 @@ if($this->story->checkForceReview()) unset($visibleFields['review']);
|
||||
<div class='input-group'>
|
||||
<?php echo html::hidden("color[$i]", '', "data-provide='colorpicker' data-wrapper='input-group-btn fix-border-right' data-pull-menu-right='false' data-btn-tip='{$lang->story->colorTag}' data-update-text='#title\\[{$i}\\]'");?>
|
||||
<?php echo html::input("title[$i]", $storyTitle, "class='form-control' autocomplete='off'") . html::hidden("uploadImage[$i]", $fileName);?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'spec', 'hidden')?>'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-btn'>
|
||||
<a href='javascript:copyTitle(<?php echo $i;?>)' class='btn' title='<?php echo $lang->story->copyTitle; ?>'><i class='icon-angle-right'></i></a>
|
||||
</span>
|
||||
<?php echo html::textarea("spec[$i]", $spec, "rows='1' class='form-control autosize'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'spec', 'hidden')?>'><?php echo html::textarea("spec[$i]", $spec, "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'source', ' hidden')?>'><?php echo html::select("source[$i]", $sourceList, $source, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'verify', 'hidden')?>'><?php echo html::textarea("verify[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'pri', ' hidden')?>' style='overflow:visible'><?php echo html::select("pri[$i]", $priList, $pri, "class='form-control'");?></td>
|
||||
@@ -104,16 +100,12 @@ if($this->story->checkForceReview()) unset($visibleFields['review']);
|
||||
<div class='input-group'>
|
||||
<?php echo html::hidden("color[$i]", '', "data-provide='colorpicker' data-wrapper='input-group-btn fix-border-right' data-pull-menu-right='false' data-btn-tip='{$lang->story->colorTag}' data-update-text='#title\\[{$i}\\]'");?>
|
||||
<?php echo html::input("title[$i]", $storyTitle, "class='form-control' autocomplete='off'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'spec', 'hidden')?>'>
|
||||
<div class='input-group'>
|
||||
<span class='input-group-btn'>
|
||||
<a href='javascript:copyTitle(<?php echo $i;?>)' class='btn' title='<?php echo $lang->story->copyTitle; ?>'><i class='icon-angle-right'></i></a>
|
||||
</span>
|
||||
<?php echo html::textarea("spec[$i]", $spec, "rows='1' class='form-control autosize'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'spec', 'hidden')?>'><?php echo html::textarea("spec[$i]", $spec, "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'source', ' hidden')?>'><?php echo html::select("source[$i]", $sourceList, $source, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'verify', 'hidden')?>'><?php echo html::textarea("verify[$i]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'pri', ' hidden')?>' style='overflow:visible'><?php echo html::select("pri[$i]", $priList, $pri, "class='form-control'");?></td>
|
||||
@@ -134,17 +126,14 @@ if($this->story->checkForceReview()) unset($visibleFields['review']);
|
||||
<td class='text-left<?php echo zget($visibleFields, 'plan', ' hidden')?>' style='overflow:visible'><?php echo html::select("plan[%s]", $plans, $planID, "class='form-control'");?></td>
|
||||
<td style='overflow:visible'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::hidden("color[%s]", '', "data-wrapper='input-group-btn fix-border-right' data-pull-menu-right='false' data-btn-tip='{$lang->story->colorTag}' data-update-text='#title\\[%s\\]'");?>
|
||||
<?php echo html::input("title[%s]", $storyTitle, "class='form-control' autocomplete='off'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'spec', ' hidden')?>'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::hidden("color[%s]", '', "data-wrapper='input-group-btn fix-border-right' data-pull-menu-right='false' data-btn-tip='{$lang->story->colorTag}' data-update-text='#title\\[%s\\]'");?>
|
||||
<?php echo html::input("title[%s]", $storyTitle, "class='form-control' autocomplete='off'");?>
|
||||
<span class='input-group-btn'>
|
||||
<a href='javascript:copyTitle(%s)' class='btn' title='<?php echo $lang->story->copyTitle; ?>'><i class='icon-angle-right'></i></a>
|
||||
</span>
|
||||
<?php echo html::textarea("spec[%s]", $spec, "rows='1' class='form-control autosize'");?>
|
||||
</div>
|
||||
</td>
|
||||
<td class='<?php echo zget($visibleFields, 'spec', ' hidden')?>'><?php echo html::textarea("spec[%s]", $spec, "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'source', ' hidden')?>'><?php echo html::select("source[%s]", $sourceList, $source, "class='form-control'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'verify', ' hidden')?>'><?php echo html::textarea("verify[%s]", '', "rows='1' class='form-control autosize'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'pri', ' hidden')?>' style='overflow:visible'><?php echo html::select("pri[%s]", $priList, $pri, "class='form-control'");?></td>
|
||||
|
||||
@@ -37,6 +37,8 @@ $config->task->exportFields = '
|
||||
closedBy, closedDate, closedReason,
|
||||
lastEditedBy, lastEditedDate,files
|
||||
';
|
||||
if($config->global->flow == 'onlyTask') $config->task->exportFields = str_replace(array(' story,'), '', $config->task->exportFields);
|
||||
|
||||
$config->task->customCreateFields = 'story,estStarted,deadline,mailto,pri,estimate';
|
||||
$config->task->customBatchCreateFields = 'module,story,assignedTo,estimate,estStarted,deadline,desc,pri';
|
||||
$config->task->customBatchEditFields = 'module,assignedTo,status,pri,estimate,record,left,estStarted,deadline,finishedBy,canceledBy,closedBy,closedReason';
|
||||
@@ -46,6 +48,13 @@ $config->task->custom->createFields = $config->task->customCreateFields;
|
||||
$config->task->custom->batchCreateFields = 'module,story,assignedTo,estimate,desc,pri';
|
||||
$config->task->custom->batchEditFields = 'module,assignedTo,status,pri,estimate,record,left,finishedBy,closedBy,closedReason';
|
||||
|
||||
if($config->global->flow == 'onlyTask')
|
||||
{
|
||||
$config->task->customCreateFields = str_replace(array('story,'), '', $config->task->customCreateFields);
|
||||
$config->task->customBatchCreateFields = str_replace(array('story,'), '', $config->task->customBatchCreateFields);
|
||||
$config->task->custom->batchCreateFields = str_replace(array('story,'), '', $config->task->custom->batchCreateFields);
|
||||
}
|
||||
|
||||
$config->task->datatable = new stdclass();
|
||||
$config->task->datatable->defaultField = array('id', 'pri', 'name', 'status', 'deadline', 'openedDate', 'assignedTo', 'finishedBy', 'finishedDate', 'estimate', 'consumed', 'left', 'story', 'actions');
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
if(isset($menuItem->hidden)) continue;
|
||||
$menuType = $menuItem->name;
|
||||
if(!$config->testcase->needReview and $menuType == 'wait') continue;
|
||||
if($this->config->global->flow == 'onlyTest' and $menuType == 'needconfirm') continue;
|
||||
if($this->config->global->flow == 'onlyTest' and (strpos(',needconfirm,group,zerocase,', ',' . $menuType . ',') !== false)) continue;
|
||||
if($hasBrowsePriv and strpos($menuType, 'QUERY') === 0)
|
||||
{
|
||||
$queryID = (int)substr($menuType, 5);
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
if($hasCasesPriv) echo "<li id='allTab'>" . html::a($this->inlink('cases', "taskID=$taskID&browseType=all¶m=0"), $lang->testtask->allCases) . "</li>";
|
||||
if($hasCasesPriv) echo "<li id='assignedtomeTab'>" . html::a($this->inlink('cases', "taskID=$taskID&browseType=assignedtome¶m=0"), $lang->testtask->assignedToMe) . "</li>";
|
||||
|
||||
if($hasGroupPriv)
|
||||
if($hasGroupPriv and $this->config->global->flow != 'onlyTest')
|
||||
{
|
||||
echo "<li id='groupTab' class='dropdown'>";
|
||||
$groupBy = isset($groupBy) ? $groupBy : '';
|
||||
|
||||
@@ -75,12 +75,14 @@
|
||||
<fieldset>
|
||||
<legend><?php echo $lang->testtask->legendBasicInfo;?></legend>
|
||||
<table class='table table-data table-condensed table-borderless table-fixed'>
|
||||
<?php if($this->config->global->flow != 'onlyTest'):?>
|
||||
<tr>
|
||||
<th class='w-60px'><?php echo $lang->testtask->project;?></th>
|
||||
<td><?php echo html::a($this->createLink('project', 'story', "projectID=$task->project"), $task->projectName);?></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testtask->build;?></th>
|
||||
<th class='w-60px'><?php echo $lang->testtask->build;?></th>
|
||||
<td><?php $task->build == 'trunk' ? print($lang->trunk) : print(html::a($this->createLink('build', 'view', "buildID=$task->build"), $task->buildName));?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -174,6 +174,9 @@ class upgradeModel extends model
|
||||
$this->execSQL($this->getUpgradeFile('9.1'));
|
||||
case '9_1_1':
|
||||
$this->execSQL($this->getUpgradeFile('9.1.1'));
|
||||
case '9_1_2':
|
||||
$this->execSQL($this->getUpgradeFile('9.1.2'));
|
||||
$this->processCustomMenus();
|
||||
}
|
||||
|
||||
$this->deletePatch();
|
||||
@@ -265,6 +268,7 @@ class upgradeModel extends model
|
||||
case '9_0_1': $confirmContent .= file_get_contents($this->getUpgradeFile('9.0.1'));
|
||||
case '9_1': $confirmContent .= file_get_contents($this->getUpgradeFile('9.1'));
|
||||
case '9_1_1': $confirmContent .= file_get_contents($this->getUpgradeFile('9.1.1'));
|
||||
case '9_1_2': $confirmContent .= file_get_contents($this->getUpgradeFile('9.1.2'));
|
||||
}
|
||||
return str_replace('zt_', $this->config->db->prefix, $confirmContent);
|
||||
}
|
||||
@@ -1691,4 +1695,22 @@ class upgradeModel extends model
|
||||
if(strpos($fromVersion, 'pro') === false ? $fromVersion < '8.3' : $fromVersion < 'pro5.4') $needProcess['updateFile'] = true;
|
||||
return $needProcess;
|
||||
}
|
||||
|
||||
/**
|
||||
* Process customMenus for different working.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function processCustomMenus()
|
||||
{
|
||||
$customMenus = $this->dao->select('*')->from(TABLE_CONFIG)->where('section')->eq('customMenu')->fetchAll();
|
||||
|
||||
foreach($customMenus as $customMenu)
|
||||
{
|
||||
$this->dao->update(TABLE_CONFIG)->set('`key`')->eq("full_{$customMenu->key}")->where('id')->eq($customMenu->id)->exec();
|
||||
}
|
||||
|
||||
return !dao::isError();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user