Merge branch '12.x' of github.com:easysoft/zentaopms into 12.x
This commit is contained in:
+10
-9
@@ -1606,6 +1606,7 @@ class bugModel extends model
|
||||
* Get bugs of a story.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
@@ -2507,16 +2508,16 @@ class bugModel extends model
|
||||
public function printCell($col, $bug, $users, $builds, $branches, $modulePairs, $projects = array(), $plans = array(), $stories = array(), $tasks = array(), $mode = 'datatable')
|
||||
{
|
||||
/* Check the product is closed. */
|
||||
$changeAllowed = common::checkObjectChangeAllowed('bug', $bug);
|
||||
$canBeChanged = common::checkObjectChangeAllowed('bug', $bug);
|
||||
|
||||
$canBatchEdit = ($changeAllowed and common::hasPriv('bug', 'batchEdit'));
|
||||
$canBatchConfirm = ($changeAllowed and common::hasPriv('bug', 'batchConfirm'));
|
||||
$canBatchEdit = ($canBeChanged and common::hasPriv('bug', 'batchEdit'));
|
||||
$canBatchConfirm = ($canBeChanged and common::hasPriv('bug', 'batchConfirm'));
|
||||
$canBatchClose = common::hasPriv('bug', 'batchClose');
|
||||
$canBatchActivate = ($changeAllowed and common::hasPriv('bug', 'batchActivate'));
|
||||
$canBatchChangeBranch = ($changeAllowed and common::hasPriv('bug', 'batchChangeBranch'));
|
||||
$canBatchChangeModule = ($changeAllowed and common::hasPriv('bug', 'batchChangeModule'));
|
||||
$canBatchResolve = ($changeAllowed and common::hasPriv('bug', 'batchResolve'));
|
||||
$canBatchAssignTo = ($changeAllowed and common::hasPriv('bug', 'batchAssignTo'));
|
||||
$canBatchActivate = ($canBeChanged and common::hasPriv('bug', 'batchActivate'));
|
||||
$canBatchChangeBranch = ($canBeChanged and common::hasPriv('bug', 'batchChangeBranch'));
|
||||
$canBatchChangeModule = ($canBeChanged and common::hasPriv('bug', 'batchChangeModule'));
|
||||
$canBatchResolve = ($canBeChanged and common::hasPriv('bug', 'batchResolve'));
|
||||
$canBatchAssignTo = ($canBeChanged and common::hasPriv('bug', 'batchAssignTo'));
|
||||
|
||||
$canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo);
|
||||
|
||||
@@ -2730,7 +2731,7 @@ class bugModel extends model
|
||||
break;
|
||||
case 'actions':
|
||||
$params = "bugID=$bug->id";
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true);
|
||||
common::printIcon('bug', 'resolve', $params, $bug, 'list', 'checked', '', 'iframe', true);
|
||||
|
||||
@@ -117,7 +117,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
|
||||
<?php if(!empty($this->config->CRProduct) or $product->status != 'closed'):?>
|
||||
<?php if(!common::checkNotCN()):?>
|
||||
<?php
|
||||
common::printLink('bug', 'batchCreate', "productID=$productID&branch=$branch&projectID=0&moduleID=$moduleID", "<i class='icon icon-plus'></i>" . $lang->bug->batchCreate, '', "class='btn btn-secondary'");
|
||||
@@ -189,7 +189,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->bug->noBug;?></span>
|
||||
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('bug', 'create')):?>
|
||||
<?php if((!empty($this->config->CRProduct) or $product->status != 'closed') and common::hasPriv('bug', 'create')):?>
|
||||
<?php echo html::a($this->createLink('bug', 'create', "productID=$productID&branch=$branch&extra=moduleID=$moduleID"), "<i class='icon icon-plus'></i> " . $lang->bug->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
@@ -211,15 +211,15 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
|
||||
$widths = $this->datatable->setFixedFieldWidth($setting);
|
||||
$columns = 0;
|
||||
|
||||
$changeAllowed = (empty($config->global->closedProductStatus) or $product->status != 'closed');
|
||||
$canBatchEdit = ($changeAllowed and common::hasPriv('bug', 'batchEdit'));
|
||||
$canBatchConfirm = ($changeAllowed and common::hasPriv('bug', 'batchConfirm'));
|
||||
$canBeChanged = (!empty($config->CRProduct) or $product->status != 'closed');
|
||||
$canBatchEdit = ($canBeChanged and common::hasPriv('bug', 'batchEdit'));
|
||||
$canBatchConfirm = ($canBeChanged and common::hasPriv('bug', 'batchConfirm'));
|
||||
$canBatchClose = common::hasPriv('bug', 'batchClose');
|
||||
$canBatchActivate = ($changeAllowed and common::hasPriv('bug', 'batchActivate'));
|
||||
$canBatchChangeBranch = ($changeAllowed and common::hasPriv('bug', 'batchChangeBranch'));
|
||||
$canBatchChangeModule = ($changeAllowed and common::hasPriv('bug', 'batchChangeModule'));
|
||||
$canBatchResolve = ($changeAllowed and common::hasPriv('bug', 'batchResolve'));
|
||||
$canBatchAssignTo = ($changeAllowed and common::hasPriv('bug', 'batchAssignTo'));
|
||||
$canBatchActivate = ($canBeChanged and common::hasPriv('bug', 'batchActivate'));
|
||||
$canBatchChangeBranch = ($canBeChanged and common::hasPriv('bug', 'batchChangeBranch'));
|
||||
$canBatchChangeModule = ($canBeChanged and common::hasPriv('bug', 'batchChangeModule'));
|
||||
$canBatchResolve = ($canBeChanged and common::hasPriv('bug', 'batchResolve'));
|
||||
$canBatchAssignTo = ($canBeChanged and common::hasPriv('bug', 'batchAssignTo'));
|
||||
|
||||
$canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo);
|
||||
?>
|
||||
|
||||
@@ -268,10 +268,10 @@ js::set('stepsNotEmpty', $lang->bug->stepsNotEmpty);
|
||||
<?php if($showMailto):?>
|
||||
<td>
|
||||
<div class='input-group' id='contactListGroup'>
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, str_replace(' ', '', $mailto), "class='form-control chosen' multiple");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, str_replace(' ', '', $mailto), "class='form-control chosen' multiple");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</div>
|
||||
<?php if(!isonlybody()):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
|
||||
<?php if(!empty($this->config->CRProduct) or $product->status != 'closed'):?>
|
||||
<?php common::printLink('bug', 'create', "productID={$bug->product}&branch={$bug->branch}&extra=moduleID={$bug->module}", "<i class='icon icon-plus'></i>" . $lang->bug->create, '', "class='btn btn-primary'"); ?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
@@ -13,7 +13,7 @@ global $lang;
|
||||
$config->build->search['module'] = 'build';
|
||||
$config->build->search['fields']['name'] = $lang->build->name;
|
||||
$config->build->search['fields']['id'] = $lang->build->id;
|
||||
$config->build->search['fields']['product'] = '所属' . $lang->build->product;
|
||||
$config->build->search['fields']['product'] = $lang->story->product;
|
||||
$config->build->search['fields']['scmPath'] = $lang->build->scmPath;
|
||||
$config->build->search['fields']['filePath'] = $lang->build->filePath;
|
||||
$config->build->search['fields']['date'] = $lang->build->date;
|
||||
|
||||
+13
-13
@@ -213,7 +213,7 @@ class build extends control
|
||||
if(!$build) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = common::checkObjectChangeAllowed('build', $build);
|
||||
$canBeChanged = common::checkObjectChangeAllowed('build', $build);
|
||||
|
||||
$product = $this->loadModel('product')->getById($build->product);
|
||||
if($product->type != 'normal') $this->lang->product->branch = sprintf($this->lang->product->branch, $this->lang->product->branchName[$product->type]);
|
||||
@@ -261,18 +261,18 @@ class build extends control
|
||||
$this->executeHooks($buildID);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->build = $build;
|
||||
$this->view->buildPairs = $this->build->getProjectBuildPairs($build->project, 0, 0, 'noempty,notrunk');
|
||||
$this->view->actions = $this->loadModel('action')->getList('build', $buildID);
|
||||
$this->view->link = $link;
|
||||
$this->view->param = $param;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->type = $type;
|
||||
$this->view->bugPager = $bugPager;
|
||||
$this->view->branchName = $build->productType == 'normal' ? '' : $this->loadModel('branch')->getById($build->branch);
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->build = $build;
|
||||
$this->view->buildPairs = $this->build->getProjectBuildPairs($build->project, 0, 0, 'noempty,notrunk');
|
||||
$this->view->actions = $this->loadModel('action')->getList('build', $buildID);
|
||||
$this->view->link = $link;
|
||||
$this->view->param = $param;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->type = $type;
|
||||
$this->view->bugPager = $bugPager;
|
||||
$this->view->branchName = $build->productType == 'normal' ? '' : $this->loadModel('branch')->getById($build->branch);
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ class buildModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getProjectBuilds($projectID, $type, $param)
|
||||
public function getProjectBuilds($projectID, $type = '', $param = '')
|
||||
{
|
||||
return $this->dao->select('t1.*, t2.name as projectName, t3.name as productName, t4.name as branchName')
|
||||
->from(TABLE_BUILD)->alias('t1')
|
||||
|
||||
@@ -48,7 +48,7 @@ tbody tr td:first-child input{display:none;}
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php
|
||||
if(!$build->deleted and $changeAllowed)
|
||||
if(!$build->deleted and $canBeChanged)
|
||||
{
|
||||
echo $this->buildOperateMenu($build, 'view');
|
||||
|
||||
@@ -91,13 +91,13 @@ tbody tr td:first-child input{display:none;}
|
||||
</ul>
|
||||
<div class='tab-content'>
|
||||
<div class='tab-pane <?php if($type == 'story') echo 'active'?>' id='stories'>
|
||||
<?php if($changeAllowed and common::hasPriv('build', 'linkStory')):?>
|
||||
<?php if($canBeChanged and common::hasPriv('build', 'linkStory')):?>
|
||||
<div class='actions'><?php echo html::a("javascript:showLink($build->id, \"story\")", '<i class="icon-link"></i> ' . $lang->build->linkStory, '', "class='btn btn-primary'");?></div>
|
||||
<div class='linkBox cell hidden'></div>
|
||||
<?php endif;?>
|
||||
<form class='main-table table-story' data-ride='table' method='post' target='hiddenwin' action='<?php echo inlink('batchUnlinkStory', "buildID={$build->id}")?>' id='linkedStoriesForm'>
|
||||
<table class='table has-sort-head' id='storyList'>
|
||||
<?php $canBatchUnlink = $changeAllowed and common::hasPriv('build', 'batchUnlinkStory');?>
|
||||
<?php $canBatchUnlink = $canBeChanged and common::hasPriv('build', 'batchUnlinkStory');?>
|
||||
<?php $vars = "buildID={$build->id}&type=story&link=$link¶m=$param&orderBy=%s";?>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
@@ -146,7 +146,7 @@ tbody tr td:first-child input{display:none;}
|
||||
<td><?php echo $lang->story->stageList[$story->stage];?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if($changeAllowed and common::hasPriv('build', 'unlinkStory'))
|
||||
if($canBeChanged and common::hasPriv('build', 'unlinkStory'))
|
||||
{
|
||||
$unlinkURL = inlink('unlinkStory', "buildID=$build->id&story=$story->id");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '<i class="icon-unlink"></i>', '', "class='btn btn-icon' title='{$lang->build->unlinkStory}'");
|
||||
@@ -176,13 +176,13 @@ tbody tr td:first-child input{display:none;}
|
||||
</form>
|
||||
</div>
|
||||
<div class='tab-pane <?php if($type == 'bug') echo 'active'?>' id='bugs'>
|
||||
<?php if($changeAllowed and common::hasPriv('build', 'linkBug')):?>
|
||||
<?php if($canBeChanged and common::hasPriv('build', 'linkBug')):?>
|
||||
<div class='actions'><?php echo html::a("javascript:showLink($build->id, \"bug\")", '<i class="icon-bug"></i> ' . $lang->build->linkBug, '', "class='btn btn-primary'");?></div>
|
||||
<div class='linkBox cell hidden'></div>
|
||||
<?php endif;?>
|
||||
<form class='main-table table-bug' data-ride='table' method='post' target='hiddenwin' action="<?php echo inLink('batchUnlinkBug', "build=$build->id");?>" id='linkedBugsForm'>
|
||||
<table class='table has-sort-head' id='bugList'>
|
||||
<?php $canBatchUnlink = $changeAllowed and common::hasPriv('build', 'batchUnlinkBug');?>
|
||||
<?php $canBatchUnlink = $canBeChanged and common::hasPriv('build', 'batchUnlinkBug');?>
|
||||
<?php $vars = "buildID={$build->id}&type=bug&link=$link¶m=$param&orderBy=%s";?>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
@@ -227,7 +227,7 @@ tbody tr td:first-child input{display:none;}
|
||||
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if($changeAllowed and common::hasPriv('build', 'unlinkBug'))
|
||||
if($canBeChanged and common::hasPriv('build', 'unlinkBug'))
|
||||
{
|
||||
$unlinkURL = inlink('unlinkBug', "buildID=$build->id&bug=$bug->id");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn btn-icon' title='{$lang->build->unlinkBug}'");
|
||||
|
||||
@@ -1855,7 +1855,7 @@ EOD;
|
||||
global $app, $config;
|
||||
|
||||
/* Check the product is closed. */
|
||||
if(!empty($object->product) and is_numeric($object->product) and !empty($config->global->closedProductStatus))
|
||||
if(!empty($object->product) and is_numeric($object->product) and empty($config->CRProduct))
|
||||
{
|
||||
$productID = trim($object->product, ',');
|
||||
$product = $app->control->loadModel('product')->getByID($productID);
|
||||
@@ -1863,7 +1863,8 @@ EOD;
|
||||
}
|
||||
|
||||
/* Check the project is closed. */
|
||||
if(strpos('story|bug|testtask', $module) === false and !empty($object->project) and is_numeric($object->project) and !empty($config->global->closedProjectStatus))
|
||||
$productModuleList = array('story', 'bug', 'testtask');
|
||||
if(!in_array($module, $productModuleList) and !empty($object->project) and is_numeric($object->project) and empty($config->CRProject))
|
||||
{
|
||||
$project = $app->control->loadModel('project')->getByID($object->project);
|
||||
if($project->status == 'closed') return false;
|
||||
|
||||
@@ -357,7 +357,7 @@ class custom extends control
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->loadModel('setting')->setItem('system.common.global.closedProjectStatus', $this->post->project);
|
||||
$this->loadModel('setting')->setItem('system.common.CRProject', $this->post->project);
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
|
||||
}
|
||||
|
||||
@@ -377,7 +377,7 @@ class custom extends control
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
$this->loadModel('setting')->setItem('system.common.global.closedProductStatus', $this->post->product);
|
||||
$this->loadModel('setting')->setItem('system.common.CRProduct', $this->post->product);
|
||||
$this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'reload'));
|
||||
}
|
||||
|
||||
|
||||
@@ -153,11 +153,11 @@ $lang->custom->page = ' Page';
|
||||
$lang->custom->scoreStatus[1] = 'On';
|
||||
$lang->custom->scoreStatus[0] = 'Off';
|
||||
|
||||
$lang->custom->closedProjectStatus[1] = 'Change Forbidden';
|
||||
$lang->custom->closedProjectStatus[0] = 'Change Allowed';
|
||||
$lang->custom->CRProject[1] = 'Change Forbidden';
|
||||
$lang->custom->CRProject[0] = 'Change Allowed';
|
||||
|
||||
$lang->custom->closedProductStatus[1] = 'Change Forbidden';
|
||||
$lang->custom->closedProductStatus[0] = 'Change Allowed';
|
||||
$lang->custom->CRProduct[1] = 'Change Forbidden';
|
||||
$lang->custom->CRProduct[0] = 'Change Allowed';
|
||||
|
||||
$lang->custom->moduleName['product'] = $lang->productCommon;
|
||||
$lang->custom->moduleName['productplan'] = 'Plan';
|
||||
|
||||
@@ -153,11 +153,11 @@ $lang->custom->page = ' Page';
|
||||
$lang->custom->scoreStatus[1] = 'On';
|
||||
$lang->custom->scoreStatus[0] = 'Off';
|
||||
|
||||
$lang->custom->closedProjectStatus[1] = 'Change Forbidden';
|
||||
$lang->custom->closedProjectStatus[0] = 'Change Allowed';
|
||||
$lang->custom->CRProject[1] = 'Change Forbidden';
|
||||
$lang->custom->CRProject[0] = 'Change Allowed';
|
||||
|
||||
$lang->custom->closedProductStatus[1] = 'Change Forbidden';
|
||||
$lang->custom->closedProductStatus[0] = 'Change Allowed';
|
||||
$lang->custom->CRProduct[1] = 'Change Forbidden';
|
||||
$lang->custom->CRProduct[0] = 'Change Allowed';
|
||||
|
||||
$lang->custom->moduleName['product'] = $lang->productCommon;
|
||||
$lang->custom->moduleName['productplan'] = 'Plan';
|
||||
|
||||
@@ -153,11 +153,11 @@ $lang->custom->page = ' Page';
|
||||
$lang->custom->scoreStatus[1] = 'On';
|
||||
$lang->custom->scoreStatus[0] = 'Off';
|
||||
|
||||
$lang->custom->closedProjectStatus[1] = 'Change Forbidden';
|
||||
$lang->custom->closedProjectStatus[0] = 'Change Allowed';
|
||||
$lang->custom->CRProject[1] = 'Change Forbidden';
|
||||
$lang->custom->CRProject[0] = 'Change Allowed';
|
||||
|
||||
$lang->custom->closedProductStatus[1] = 'Change Forbidden';
|
||||
$lang->custom->closedProductStatus[0] = 'Change Allowed';
|
||||
$lang->custom->CRProduct[1] = 'Change Forbidden';
|
||||
$lang->custom->CRProduct[0] = 'Change Allowed';
|
||||
|
||||
$lang->custom->moduleName['product'] = $lang->productCommon;
|
||||
$lang->custom->moduleName['productplan'] = 'Plan';
|
||||
|
||||
@@ -153,11 +153,11 @@ $lang->custom->page = '';
|
||||
$lang->custom->scoreStatus[1] = 'On';
|
||||
$lang->custom->scoreStatus[0] = 'Off';
|
||||
|
||||
$lang->custom->closedProjectStatus[1] = 'Change Forbidden';
|
||||
$lang->custom->closedProjectStatus[0] = 'Change Allowed';
|
||||
$lang->custom->CRProject[1] = 'Change Forbidden';
|
||||
$lang->custom->CRProject[0] = 'Change Allowed';
|
||||
|
||||
$lang->custom->closedProductStatus[1] = 'Change Forbidden';
|
||||
$lang->custom->closedProductStatus[0] = 'Change Allowed';
|
||||
$lang->custom->CRProduct[1] = 'Change Forbidden';
|
||||
$lang->custom->CRProduct[0] = 'Change Allowed';
|
||||
|
||||
$lang->custom->moduleName['product'] = $lang->productCommon;
|
||||
$lang->custom->moduleName['productplan'] = 'Kế hoạch';
|
||||
|
||||
@@ -153,11 +153,11 @@ $lang->custom->page = '页面';
|
||||
$lang->custom->scoreStatus[1] = '开启';
|
||||
$lang->custom->scoreStatus[0] = '关闭';
|
||||
|
||||
$lang->custom->closedProjectStatus[1] = '禁止修改';
|
||||
$lang->custom->closedProjectStatus[0] = '允许修改';
|
||||
$lang->custom->CRProject[1] = '禁止修改';
|
||||
$lang->custom->CRProject[0] = '允许修改';
|
||||
|
||||
$lang->custom->closedProductStatus[1] = '禁止修改';
|
||||
$lang->custom->closedProductStatus[0] = '允许修改';
|
||||
$lang->custom->CRProduct[1] = '禁止修改';
|
||||
$lang->custom->CRProduct[0] = '允许修改';
|
||||
|
||||
$lang->custom->moduleName['product'] = $lang->productCommon;
|
||||
$lang->custom->moduleName['productplan'] = '计划';
|
||||
|
||||
@@ -153,11 +153,11 @@ $lang->custom->page = '頁面';
|
||||
$lang->custom->scoreStatus[1] = '開啟';
|
||||
$lang->custom->scoreStatus[0] = '關閉';
|
||||
|
||||
$lang->custom->closedProjectStatus[1] = '禁止修改';
|
||||
$lang->custom->closedProjectStatus[0] = '允許修改';
|
||||
$lang->custom->CRProject[1] = '禁止修改';
|
||||
$lang->custom->CRProject[0] = '允許修改';
|
||||
|
||||
$lang->custom->closedProductStatus[1] = '禁止修改';
|
||||
$lang->custom->closedProductStatus[0] = '允許修改';
|
||||
$lang->custom->CRProduct[1] = '禁止修改';
|
||||
$lang->custom->CRProduct[0] = '允許修改';
|
||||
|
||||
$lang->custom->moduleName['product'] = $lang->productCommon;
|
||||
$lang->custom->moduleName['productplan'] = '計劃';
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
<tr>
|
||||
<th class='w-300px'><?php echo $lang->custom->closedProduct;?></th>
|
||||
<td class='w-250px text-center'>
|
||||
<?php $checkedKey = isset($config->global->closedProductStatus) ? $config->global->closedProductStatus : 0;?>
|
||||
<?php foreach($lang->custom->closedProductStatus as $key => $value):?>
|
||||
<?php $checkedKey = isset($config->global->CRProduct) ? $config->global->CRProduct : 0;?>
|
||||
<?php foreach($lang->custom->CRProduct as $key => $value):?>
|
||||
<label class="radio-inline"><input type="radio" name="product" value="<?php echo $key?>"<?php echo $key == $checkedKey ? " checked='checked'" : ''?> id="product<?php echo $key;?>"><?php echo $value;?></label>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
<tr>
|
||||
<th class='w-300px'><?php echo $lang->custom->closedProject;?></th>
|
||||
<td class='w-250px text-center'>
|
||||
<?php $checkedKey = isset($config->global->closedProjectStatus) ? $config->global->closedProjectStatus : 0;?>
|
||||
<?php foreach($lang->custom->closedProjectStatus as $key => $value):?>
|
||||
<?php $checkedKey = isset($config->global->CRProject) ? $config->global->CRProject : 0;?>
|
||||
<?php foreach($lang->custom->CRProject as $key => $value):?>
|
||||
<label class="radio-inline"><input type="radio" name="project" value="<?php echo $key?>"<?php echo $key == $checkedKey ? " checked='checked'" : ''?> id="project<?php echo $key;?>"><?php echo $value;?></label>
|
||||
<?php endforeach;?>
|
||||
</td>
|
||||
|
||||
+22
-26
@@ -447,10 +447,6 @@ class doc extends control
|
||||
$hyperdown = $this->app->loadClass('hyperdown');
|
||||
$doc->content = $hyperdown->makeHtml($doc->content);
|
||||
|
||||
/* Add a newline attribute to the table. */
|
||||
$doc->content = str_replace("<th>", "<th style='word-break: break-word;'>", $doc->content);
|
||||
$doc->content = str_replace("<td>", "<td style='word-break: break-word;'>", $doc->content);
|
||||
|
||||
$doc->digest = $hyperdown->makeHtml($doc->digest);
|
||||
}
|
||||
|
||||
@@ -759,9 +755,9 @@ class doc extends control
|
||||
$object = $this->dao->select('id,name,status')->from($table)->where('id')->eq($objectID)->fetch();
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = true;
|
||||
if($type == 'product' and !empty($this->config->global->closedProductStatus) and $object->status == 'closed') $changeAllowed = false;
|
||||
if($type == 'project' and !empty($this->config->global->closedProjectStatus) and $object->status == 'closed') $changeAllowed = false;
|
||||
$canBeChanged = true;
|
||||
if($type == 'product' and empty($this->config->CRProduct) and $object->status == 'closed') $canBeChanged = false;
|
||||
if($type == 'project' and empty($this->config->CRProject) and $object->status == 'closed') $canBeChanged = false;
|
||||
|
||||
/* According the from, set menus. */
|
||||
if($this->from == 'product')
|
||||
@@ -806,18 +802,18 @@ class doc extends control
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager($recTotal, $recPerPage, $pageID);
|
||||
|
||||
$this->view->title = $object->name;
|
||||
$this->view->position[] = $object->name;
|
||||
$this->view->title = $object->name;
|
||||
$this->view->position[] = $object->name;
|
||||
|
||||
$this->view->type = $type;
|
||||
$this->view->object = $object;
|
||||
$this->view->files = $this->doc->getLibFiles($type, $objectID, $orderBy, $pager);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->pager = $pager;
|
||||
$this->view->viewType = $viewType;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
$this->view->type = $type;
|
||||
$this->view->object = $object;
|
||||
$this->view->files = $this->doc->getLibFiles($type, $objectID, $orderBy, $pager);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->pager = $pager;
|
||||
$this->view->viewType = $viewType;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -859,9 +855,9 @@ class doc extends control
|
||||
if(empty($object)) $this->locate($this->createLink($type, 'create'));
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = true;
|
||||
if($type == 'product' and !empty($this->config->global->closedProductStatus) and $object->status == 'closed') $changeAllowed = false;
|
||||
if($type == 'project' and !empty($this->config->global->closedProjectStatus) and $object->status == 'closed') $changeAllowed = false;
|
||||
$canBeChanged = true;
|
||||
if($type == 'product' and empty($this->config->CRProduct) and $object->status == 'closed') $canBeChanged = false;
|
||||
if($type == 'project' and empty($this->config->CRProject) and $object->status == 'closed') $canBeChanged = false;
|
||||
|
||||
if($from == 'product')
|
||||
{
|
||||
@@ -899,11 +895,11 @@ class doc extends control
|
||||
$this->view->title = $object->name;
|
||||
$this->view->position[] = $object->name;
|
||||
|
||||
$this->view->type = $type;
|
||||
$this->view->object = $object;
|
||||
$this->view->from = $from;
|
||||
$this->view->libs = $this->doc->getLibsByObject($type, $objectID);
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
$this->view->type = $type;
|
||||
$this->view->object = $object;
|
||||
$this->view->from = $from;
|
||||
$this->view->libs = $this->doc->getLibsByObject($type, $objectID);
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,3 +19,4 @@
|
||||
.doc-fullscreen .main-row > .side-col {width: 0; position: relative; overflow: hidden}
|
||||
.doc-fullscreen .fullscreen-btn > .icon-fullscreen:before {content: '\e972'}
|
||||
.right-icon a{color: #1183fb}
|
||||
.cell th,td {word-break: break-word;}
|
||||
|
||||
@@ -111,11 +111,11 @@ class docModel extends model
|
||||
$docLib = new stdClass();
|
||||
$docLib->product = $productID;
|
||||
$docLib->project = $projectID;
|
||||
$changeAllowed = common::checkObjectChangeAllowed('doc', $docLib);
|
||||
$canBeChanged = common::checkObjectChangeAllowed('doc', $docLib);
|
||||
|
||||
$lib = isset($lib) ? $lib : new stdClass();
|
||||
$actions = $this->setFastMenu($fastLib);
|
||||
$actions .= ($changeAllowed and common::hasPriv('doc', 'createLib', $lib)) ? html::a(helper::createLink('doc', 'createLib', "type={$type}&objectID={$currentLib}"), "<i class='icon icon-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : '';
|
||||
$actions .= ($canBeChanged and common::hasPriv('doc', 'createLib', $lib)) ? html::a(helper::createLink('doc', 'createLib', "type={$type}&objectID={$currentLib}"), "<i class='icon icon-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe'") : '';
|
||||
|
||||
$this->lang->TRActions = $actions;
|
||||
}
|
||||
|
||||
@@ -86,10 +86,10 @@
|
||||
<th><?php echo $lang->doc->mailto;?></th>
|
||||
<td colspan="2">
|
||||
<div class="input-group">
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, '', "multiple class='form-control chosen'");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, '', "multiple class='form-control chosen'");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -63,10 +63,10 @@
|
||||
<th><?php echo $lang->doc->mailto;?></th>
|
||||
<td colspan="2">
|
||||
<div class="input-group">
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, $doc->mailto, "multiple class='form-control chosen'");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, $doc->mailto, "multiple class='form-control chosen'");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
<?php $star = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
|
||||
<?php $collectTitle = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
|
||||
<div class="actions">
|
||||
<?php if($changeAllowed):?>
|
||||
<?php if($canBeChanged):?>
|
||||
<?php if(common::hasPriv('doc', 'collect')):?>
|
||||
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$libID&objectType=doclib");?>" title="<?php echo $collectTitle;?>" class='btn btn-link ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<td class="c-name"><?php echo html::a($libLink, $lib->name);?></td>
|
||||
<td class="c-num"><?php echo $lib->allCount . $lang->doc->item;?></td>
|
||||
<td class="c-actions">
|
||||
<?php if($changeAllowed and $libID != 'project' and $libID != 'files'):?>
|
||||
<?php if($canBeChanged and $libID != 'project' and $libID != 'files'):?>
|
||||
<?php $star = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
|
||||
<?php $collectTitle = strpos($lib->collector, ',' . $this->app->user->account . ',') !== false ? $lang->doc->cancelCollection : $lang->doc->collect;?>
|
||||
<?php if(common::hasPriv('doc', 'collect')):?>
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
<td class="c-actions">
|
||||
<?php
|
||||
common::printLink('file', 'download', "fileID=$file->id", '<i class="icon-import"></i>', "data-toggle='modal'", "class='btn' title={$lang->doc->download}", true, false, $file);
|
||||
if($changeAllowed) common::printLink('file', 'delete', "fileID=$file->id", '<i class="icon-trash"></i>', 'hiddenwin', "class='btn' title={$lang->delete}", true, false, $file);
|
||||
if($canBeChanged) common::printLink('file', 'delete', "fileID=$file->id", '<i class="icon-trash"></i>', 'hiddenwin', "class='btn' title={$lang->delete}", true, false, $file);
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -135,7 +135,7 @@
|
||||
<div class='file-name'><a href='<?php echo $this->createLink($file->objectType, 'view', "objectID=$file->objectID");?>' title='<?php echo substr($file->addedDate, 0, 10)?>'><?php echo $file->title . ' [' . strtoupper($file->objectType) . ' #' . $file->objectID . ']';?></a></div>
|
||||
</div>
|
||||
<div class='actions'>
|
||||
<?php if(common::hasPriv('file', 'delete') and $changeAllowed): ?>
|
||||
<?php if(common::hasPriv('file', 'delete') and $canBeChanged): ?>
|
||||
<a href='<?php echo $this->createLink('file', 'delete', "fileID=$file->id"); ?>' target='hiddenwin' title='<?php echo $lang->delete?>' class='delete btn btn-link'><i class='icon icon-trash'></i></a>
|
||||
<?php endif?>
|
||||
</div>
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang->extension->downloads = 'Downloads';
|
||||
$lang->extension->compatible = 'Kompatibilität';
|
||||
$lang->extension->grade = 'Wertung';
|
||||
$lang->extension->depends = 'Benötigt';
|
||||
$lang->extension->expireDate = 'Verfällt';
|
||||
$lang->extension->expiredDate = 'Verfällt';
|
||||
$lang->extension->zentaoCompatible = 'Kompatible Version';
|
||||
$lang->extension->installedTime = 'Installationszeit';
|
||||
$lang->extension->life = 'lifetime';
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang->extension->downloads = 'Downloads';
|
||||
$lang->extension->compatible = 'Compatibility';
|
||||
$lang->extension->grade = 'Score';
|
||||
$lang->extension->depends = 'Dependency';
|
||||
$lang->extension->expireDate = 'Expire';
|
||||
$lang->extension->expiredDate = 'Expire';
|
||||
$lang->extension->zentaoCompatible = 'Compatible Version';
|
||||
$lang->extension->installedTime = 'Installed Time';
|
||||
$lang->extension->life = 'lifetime';
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang->extension->downloads = 'Téléchargements';
|
||||
$lang->extension->compatible = 'Compatibilité';
|
||||
$lang->extension->grade = 'Score';
|
||||
$lang->extension->depends = 'Dépendence';
|
||||
$lang->extension->expireDate = 'Expire le';
|
||||
$lang->extension->expiredDate = 'Expire le';
|
||||
$lang->extension->zentaoCompatible = 'Version Compatible';
|
||||
$lang->extension->installedTime = 'Date Installation';
|
||||
$lang->extension->life = 'lifetime';
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang->extension->downloads = 'Downloads';
|
||||
$lang->extension->compatible = 'Compatibility';
|
||||
$lang->extension->grade = 'Điểm';
|
||||
$lang->extension->depends = 'Dependency';
|
||||
$lang->extension->expireDate = 'Expire';
|
||||
$lang->extension->expiredDate = 'Expire';
|
||||
$lang->extension->zentaoCompatible = 'Compatible Version';
|
||||
$lang->extension->installedTime = 'Installed Time';
|
||||
$lang->extension->life = 'lifetime';
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang->extension->downloads = '下载量';
|
||||
$lang->extension->compatible = '兼容性';
|
||||
$lang->extension->grade = '评分';
|
||||
$lang->extension->depends = '依赖';
|
||||
$lang->extension->expireDate = '到期日期';
|
||||
$lang->extension->expiredDate = '到期日期';
|
||||
$lang->extension->zentaoCompatible = '适用版本';
|
||||
$lang->extension->installedTime = '安装时间';
|
||||
$lang->extension->life = '终身';
|
||||
|
||||
@@ -51,7 +51,7 @@ $lang->extension->downloads = '下載量';
|
||||
$lang->extension->compatible = '兼容性';
|
||||
$lang->extension->grade = '評分';
|
||||
$lang->extension->depends = '依賴';
|
||||
$lang->extension->expireDate = '到期日期';
|
||||
$lang->extension->expiredDate = '到期日期';
|
||||
$lang->extension->zentaoCompatible = '適用版本';
|
||||
$lang->extension->installedTime = '安裝時間';
|
||||
$lang->extension->life = '終身';
|
||||
|
||||
@@ -886,16 +886,16 @@ class extensionModel extends model
|
||||
|
||||
/**
|
||||
* Get extension expire date.
|
||||
*
|
||||
*
|
||||
* @param int $extension
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getExpireDate($extension)
|
||||
{
|
||||
$licencePath = $this->app->getConfigRoot() . 'license/';
|
||||
$today = date('Y-m-d');
|
||||
$expireDate = '';
|
||||
$expiredDate = '';
|
||||
|
||||
$licenceOrderFiles = glob($licencePath . 'order*' . $extension->code . $extension->version . '.txt');
|
||||
foreach($licenceOrderFiles as $licenceOrderFile)
|
||||
@@ -908,14 +908,14 @@ class extensionModel extends model
|
||||
if($order->type == 'demo') $days = 31;
|
||||
if($order->type == 'year') $days = 365;
|
||||
$startDate = $order->paidDate != '0000-00-00 00:00:00' ? $order->paidDate : $order->createdDate;
|
||||
if($days) $expireDate = date('Y-m-d', strtotime($startDate) + $days * 24 * 3600);
|
||||
if($days) $expiredDate = date('Y-m-d', strtotime($startDate) + $days * 24 * 3600);
|
||||
}
|
||||
else
|
||||
{
|
||||
$expireDate = $order->type;
|
||||
$expiredDate = $order->type;
|
||||
}
|
||||
}
|
||||
|
||||
return $expireDate;
|
||||
return $expiredDate;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,14 +54,13 @@
|
||||
<?php
|
||||
echo "{$lang->extension->version}: <i>{$extension->version}</i> ";
|
||||
echo "{$lang->extension->author}: <i>{$extension->author}</i> ";
|
||||
$expireDate = $this->extension->getExpireDate($extension);
|
||||
|
||||
if(!empty($expireDate))
|
||||
$expiredDate = $this->extension->getExpireDate($extension);
|
||||
if(!empty($expiredDate))
|
||||
{
|
||||
echo $lang->extension->expireDate . ': ';
|
||||
if($expireDate != 'life') echo "<i>{$expireDate}</i>";
|
||||
else echo "<i>{$lang->extension->life}</i>";
|
||||
echo $lang->extension->expiredDate . ': ';
|
||||
$expiredDate != 'life' ? echo "<i>{$expiredDate}</i>" : echo "<i>{$lang->extension->life}</i>";
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
+13
-13
@@ -111,15 +111,15 @@ class gitModel extends model
|
||||
*
|
||||
* @param object $repo
|
||||
* @param array $commentGroup
|
||||
* @param bool $isPrintLog
|
||||
* @param bool $printLog
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function updateCommit($repo, $commentGroup, $isPrintLog = true)
|
||||
public function updateCommit($repo, $commentGroup, $printLog = true)
|
||||
{
|
||||
/* Load mudule and print log. */
|
||||
$this->loadModel('repo');
|
||||
if($isPrintLog) $this->printLog("begin repo $repo->id");
|
||||
if($printLog) $this->printLog("begin repo $repo->id");
|
||||
|
||||
if(!$this->setRepo($repo)) return false;
|
||||
|
||||
@@ -130,17 +130,17 @@ class gitModel extends model
|
||||
/* Update code commit history. */
|
||||
foreach($branches as $branch)
|
||||
{
|
||||
if($isPrintLog) $this->printLog("sync branch $branch logs.");
|
||||
if($printLog) $this->printLog("sync branch $branch logs.");
|
||||
$_COOKIE['repoBranch'] = $branch;
|
||||
|
||||
if($isPrintLog) $this->printLog("get this repo logs.");
|
||||
if($printLog) $this->printLog("get this repo logs.");
|
||||
|
||||
$lastInDB = $this->repo->getLatestCommit($repo->id);
|
||||
|
||||
/* Ignore unsynced branch. */
|
||||
if(empty($lastInDB))
|
||||
{
|
||||
if($isPrintLog) $this->printLog("Please init repo {$repo->name}");
|
||||
if($printLog) $this->printLog("Please init repo {$repo->name}");
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -149,18 +149,18 @@ class gitModel extends model
|
||||
$objects = array();
|
||||
if(!empty($logs))
|
||||
{
|
||||
if($isPrintLog) $this->printLog("get " . count($logs) . " logs");
|
||||
if($isPrintLog) $this->printLog('begin parsing logs');
|
||||
if($printLog) $this->printLog("get " . count($logs) . " logs");
|
||||
if($printLog) $this->printLog('begin parsing logs');
|
||||
|
||||
foreach($logs as $log)
|
||||
{
|
||||
if($isPrintLog) $this->printLog("parsing log {$log->revision}");
|
||||
if($isPrintLog) $this->printLog("comment is\n----------\n" . trim($log->msg) . "\n----------");
|
||||
if($printLog) $this->printLog("parsing log {$log->revision}");
|
||||
if($printLog) $this->printLog("comment is\n----------\n" . trim($log->msg) . "\n----------");
|
||||
|
||||
$objects = $this->repo->parseComment($log->msg);
|
||||
if($objects)
|
||||
{
|
||||
if($isPrintLog) $this->printLog('extract' .
|
||||
if($printLog) $this->printLog('extract' .
|
||||
' story:' . join(' ', $objects['stories']) .
|
||||
' task:' . join(' ', $objects['tasks']) .
|
||||
' bug:' . join(',', $objects['bugs']));
|
||||
@@ -169,7 +169,7 @@ class gitModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
if($isPrintLog) $this->printLog('no objects found' . "\n");
|
||||
if($printLog) $this->printLog('no objects found' . "\n");
|
||||
}
|
||||
|
||||
/* Create compile by comment. */
|
||||
@@ -190,7 +190,7 @@ class gitModel extends model
|
||||
|
||||
$this->repo->updateCommitCount($repo->id, $commits);
|
||||
$this->dao->update(TABLE_REPO)->set('lastSync')->eq(helper::now())->where('id')->eq($repo->id)->exec();
|
||||
if($isPrintLog) $this->printLog("\n\nrepo #" . $repo->id . ': ' . $repo->path . " finished");
|
||||
if($printLog) $this->printLog("\n\nrepo #" . $repo->id . ': ' . $repo->path . " finished");
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,7 +43,7 @@ class jobModel extends model
|
||||
}
|
||||
|
||||
/**
|
||||
* Get list by triggerType field
|
||||
* Get list by triggerType field.
|
||||
*
|
||||
* @param string $triggerType
|
||||
* @param array $repoIdList
|
||||
|
||||
@@ -90,12 +90,12 @@
|
||||
<th><?php echo $lang->job->customParam;?></th>
|
||||
<td colspan='2' id='paramDiv'>
|
||||
<div class='table-row input-group'>
|
||||
<span class='input-group-addon w-50px'><?php echo $lang->job->paramName; ?></span>
|
||||
<?php echo html::input('paramName[]', '', "class='form-control id='test''"); ?>
|
||||
<span class='input-group-addon w-40px'><?php echo $lang->job->paramValue; ?></span>
|
||||
<?php echo html::input('paramValue[]', '', "class='form-control'"); ?>
|
||||
<span class='input-group-addon w-40px'><a href='javascript:;' onclick='addItem(this);'><i class='icon icon-plus'></i></a></span>
|
||||
<span class='input-group-addon w-40px'><a href='javascript:;' onclick='deleteItem(this)'><i class='icon icon-close'></i></a></span>
|
||||
<span class='input-group-addon w-50px'><?php echo $lang->job->paramName; ?></span>
|
||||
<?php echo html::input('paramName[]', '', "class='form-control id='test''"); ?>
|
||||
<span class='input-group-addon w-40px'><?php echo $lang->job->paramValue; ?></span>
|
||||
<?php echo html::input('paramValue[]', '', "class='form-control'"); ?>
|
||||
<span class='input-group-addon w-40px'><a href='javascript:;' onclick='addItem(this);'><i class='icon icon-plus'></i></a></span>
|
||||
<span class='input-group-addon w-40px'><a href='javascript:;' onclick='deleteItem(this)'><i class='icon icon-close'></i></a></span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -114,14 +114,22 @@
|
||||
<td colspan='2' id='paramDiv'>
|
||||
<?php foreach(json_decode($job->customParam) as $paramName => $paramValue):?>
|
||||
<div class='table-row input-group'>
|
||||
<span class='input-group-addon w-50px'><?php echo $lang->job->paramName; ?></span>
|
||||
<?php echo html::input('paramName[]', $paramName, "class='form-control'"); ?>
|
||||
<span class='input-group-addon w-40px'><?php echo $lang->job->paramValue; ?></span>
|
||||
<?php echo html::input('paramValue[]', $paramValue, "class='form-control'"); ?>
|
||||
<span class='input-group-addon w-40px'><a href='javascript:;' onclick='addItem(this);'><i class='icon icon-plus'></i></a></span>
|
||||
<span class='input-group-addon w-40px'><a href='javascript:;' onclick='deleteItem(this)'><i class='icon icon-close'></i></a></span>
|
||||
<span class='input-group-addon w-50px'><?php echo $lang->job->paramName; ?></span>
|
||||
<?php echo html::input('paramName[]', $paramName, "class='form-control'"); ?>
|
||||
<span class='input-group-addon w-40px'><?php echo $lang->job->paramValue; ?></span>
|
||||
<?php echo html::input('paramValue[]', $paramValue, "class='form-control'"); ?>
|
||||
<span class='input-group-addon w-40px'><a href='javascript:;' onclick='addItem(this);'><i class='icon icon-plus'></i></a></span>
|
||||
<span class='input-group-addon w-40px'><a href='javascript:;' onclick='deleteItem(this)'><i class='icon icon-close'></i></a></span>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
<div class='table-row input-group'>
|
||||
<span class='input-group-addon w-50px'><?php echo $lang->job->paramName; ?></span>
|
||||
<?php echo html::input('paramName[]', '', "class='form-control'"); ?>
|
||||
<span class='input-group-addon w-40px'><?php echo $lang->job->paramValue; ?></span>
|
||||
<?php echo html::input('paramValue[]', '', "class='form-control'"); ?>
|
||||
<span class='input-group-addon w-40px'><a href='javascript:;' onclick='addItem(this);'><i class='icon icon-plus'></i></a></span>
|
||||
<span class='input-group-addon w-40px'><a href='javascript:;' onclick='deleteItem(this)'><i class='icon icon-close'></i></a></span>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
|
||||
@@ -73,12 +73,12 @@
|
||||
?>
|
||||
<tbody>
|
||||
<?php foreach($bugs as $bug):?>
|
||||
<?php $changeAllowed = common::checkObjectChangeAllowed('bug', $bug);?>
|
||||
<?php $canBeChanged = common::checkObjectChangeAllowed('bug', $bug);?>
|
||||
<tr>
|
||||
<td class="c-id">
|
||||
<?php if($canBatchAction):?>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='bugIDList[]' value='<?php echo $bug->id;?>' <?php if(!$changeAllowed) echo 'disabled';?> />
|
||||
<input type='checkbox' name='bugIDList[]' value='<?php echo $bug->id;?>' <?php if(!$canBeChanged) echo 'disabled';?> />
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
@@ -100,7 +100,7 @@
|
||||
<td><?php echo zget($lang->bug->resolutionList, $bug->resolution);?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
$params = "bugID=$bug->id";
|
||||
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true);
|
||||
|
||||
@@ -63,14 +63,14 @@
|
||||
<tbody>
|
||||
<?php foreach($stories as $story):?>
|
||||
<?php
|
||||
$storyLink = $this->createLink('story', 'view', "id=$story->id");
|
||||
$changeAllowed = common::checkObjectChangeAllowed('story', $story);
|
||||
$storyLink = $this->createLink('story', 'view', "id=$story->id");
|
||||
$canBeChanged = common::checkObjectChangeAllowed('story', $story);
|
||||
?>
|
||||
<tr>
|
||||
<td class="c-id">
|
||||
<?php if($canBatchAction):?>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='storyIdList[<?php echo $story->id;?>]' value='<?php echo $story->id;?>' <?php if(!$changeAllowed) echo 'disabled';?>/>
|
||||
<input type='checkbox' name='storyIdList[<?php echo $story->id;?>]' value='<?php echo $story->id;?>' <?php if(!$canBeChanged) echo 'disabled';?>/>
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
@@ -86,7 +86,7 @@
|
||||
<td class='c-stage'><?php echo zget($lang->story->stageList, $story->stage);?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
$vars = "story={$story->id}";
|
||||
common::printIcon('story', 'change', $vars, $story, 'list', 'fork');
|
||||
@@ -105,7 +105,7 @@
|
||||
<td class="c-id">
|
||||
<?php if($canBatchAction):?>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='storyIdList[<?php echo $child->id;?>]' value='<?php echo $child->id;?>' <?php if(!$changeAllowed) echo 'disabled';?>/>
|
||||
<input type='checkbox' name='storyIdList[<?php echo $child->id;?>]' value='<?php echo $child->id;?>' <?php if(!$canBeChanged) echo 'disabled';?>/>
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
@@ -121,7 +121,7 @@
|
||||
<td class='c-stage'><?php echo zget($lang->story->stageList, $child->stage);?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
$vars = "story={$child->id}";
|
||||
common::printIcon('story', 'change', $vars, $child, 'list', 'fork');
|
||||
|
||||
@@ -61,12 +61,12 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($tasks as $task):?>
|
||||
<?php $changeAllowed = common::checkObjectChangeAllowed('task', $task);?>
|
||||
<?php $canBeChanged = common::checkObjectChangeAllowed('task', $task);?>
|
||||
<tr>
|
||||
<td class="c-id">
|
||||
<?php if($canBatchEdit or $canBatchClose):?>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='taskIDList[]' value='<?php echo $task->id;?>' <?php if(!$changeAllowed) echo 'disabled';?>/>
|
||||
<input type='checkbox' name='taskIDList[]' value='<?php echo $task->id;?>' <?php if(!$canBeChanged) echo 'disabled';?>/>
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
@@ -93,7 +93,7 @@
|
||||
</td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
if($task->needConfirm)
|
||||
{
|
||||
|
||||
@@ -67,15 +67,15 @@
|
||||
<tbody>
|
||||
<?php foreach($cases as $case):?>
|
||||
<?php
|
||||
$caseID = $type == 'assigntome' ? $case->case : $case->id;
|
||||
$runID = $type == 'assigntome' ? $case->id : 0;
|
||||
$changeAllowed = common::checkObjectChangeAllowed('testcase', $case);
|
||||
$caseID = $type == 'assigntome' ? $case->case : $case->id;
|
||||
$runID = $type == 'assigntome' ? $case->id : 0;
|
||||
$canBeChanged = common::checkObjectChangeAllowed('testcase', $case);
|
||||
?>
|
||||
<tr>
|
||||
<td class="c-id">
|
||||
<?php if($canBatchEdit or $canBatchRun):?>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='caseIDList[]' value='<?php echo $case->id;?>' <?php if(!$changeAllowed) echo 'disabled';?>/>
|
||||
<input type='checkbox' name='caseIDList[]' value='<?php echo $case->id;?>' <?php if(!$canBeChanged) echo 'disabled';?>/>
|
||||
<label></label>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
@@ -93,7 +93,7 @@
|
||||
<td class='<?php if(isset($run)) echo $run->status;?>'><?php echo $this->processStatus('testcase', $case);?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
common::printIcon('testcase', 'createBug', "product=$case->product&branch=$case->branch&extra=caseID=$caseID,version=$case->version,runID=$runID", $case, 'list', 'bug');
|
||||
common::printIcon('testcase', 'create', "productID=$case->product&branch=$case->branch&moduleID=$case->module&from=testcase¶m=$caseID", $case, 'list', 'copy');
|
||||
|
||||
@@ -38,8 +38,8 @@ class productModel extends model
|
||||
/* init currentModule and currentMethod for report and story. */
|
||||
if($currentModule == 'story')
|
||||
{
|
||||
$method = ",create,batchcreate,batchclose,";
|
||||
if(strpos($method, "," . $currentMethod . ",") === false) $currentModule = 'product';
|
||||
$storyMethods = ",create,batchcreate,batchclose,";
|
||||
if(strpos($storyMethods, "," . $currentMethod . ",") === false) $currentModule = 'product';
|
||||
if($currentMethod == 'view' || $currentMethod == 'change' || $currentMethod == 'review') $currentMethod = 'browse';
|
||||
}
|
||||
if($currentMethod == 'report') $currentMethod = 'browse';
|
||||
|
||||
@@ -94,7 +94,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
|
||||
<?php if(!empty($this->config->CRProduct) or $product->status != 'closed'):?>
|
||||
<?php if(!common::checkNotCN()):?>
|
||||
<?php if(common::hasPriv('story', 'batchCreate')) echo html::a($this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID"), "<i class='icon icon-plus'></i> {$lang->story->batchCreate}", '', "class='btn btn btn-secondary'");?>
|
||||
<?php
|
||||
@@ -169,7 +169,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->story->noStory;?></span>
|
||||
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('story', 'create')):?>
|
||||
<?php if((!empty($this->config->CRProduct) or $product->status != 'closed') and common::hasPriv('story', 'create')):?>
|
||||
<?php echo html::a($this->createLink('story', 'create', "productID={$productID}&branch={$branch}&moduleID={$moduleID}"), "<i class='icon icon-plus'></i> " . $lang->story->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
@@ -189,15 +189,15 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
$widths = $this->datatable->setFixedFieldWidth($setting);
|
||||
$columns = 0;
|
||||
|
||||
$changeAllowed = (empty($config->global->closedProductStatus) or $product->status != 'closed');
|
||||
$canBatchEdit = ($changeAllowed and common::hasPriv('story', 'batchEdit'));
|
||||
$canBeChanged = (!empty($config->CRProduct) or $product->status != 'closed');
|
||||
$canBatchEdit = ($canBeChanged and common::hasPriv('story', 'batchEdit'));
|
||||
$canBatchClose = (common::hasPriv('story', 'batchClose') and strtolower($browseType) != 'closedbyme' and strtolower($browseType) != 'closedstory');
|
||||
$canBatchReview = ($changeAllowed and common::hasPriv('story', 'batchReview'));
|
||||
$canBatchChangeStage = ($changeAllowed and common::hasPriv('story', 'batchChangeStage'));
|
||||
$canBatchChangeBranch = ($changeAllowed and common::hasPriv('story', 'batchChangeBranch'));
|
||||
$canBatchChangeModule = ($changeAllowed and common::hasPriv('story', 'batchChangeModule'));
|
||||
$canBatchChangePlan = ($changeAllowed and common::hasPriv('story', 'batchChangePlan'));
|
||||
$canBatchAssignTo = ($changeAllowed and common::hasPriv('story', 'batchAssignTo'));
|
||||
$canBatchReview = ($canBeChanged and common::hasPriv('story', 'batchReview'));
|
||||
$canBatchChangeStage = ($canBeChanged and common::hasPriv('story', 'batchChangeStage'));
|
||||
$canBatchChangeBranch = ($canBeChanged and common::hasPriv('story', 'batchChangeBranch'));
|
||||
$canBatchChangeModule = ($canBeChanged and common::hasPriv('story', 'batchChangeModule'));
|
||||
$canBatchChangePlan = ($canBeChanged and common::hasPriv('story', 'batchChangePlan'));
|
||||
$canBatchAssignTo = ($canBeChanged and common::hasPriv('story', 'batchAssignTo'));
|
||||
|
||||
$canBatchAction = ($canBatchEdit or $canBatchClose or $canBatchReview or $canBatchChangeStage or $canBatchChangeModule or $canBatchChangePlan or $canBatchAssignTo);
|
||||
?>
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->release->noRelease;?></span>
|
||||
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('release', 'create')):?>
|
||||
<?php if((!empty($this->config->CRProduct) or $product->status != 'closed') and common::hasPriv('release', 'create')):?>
|
||||
<?php echo html::a($this->createLink('release', 'create', "productID=$product->id&branch=$branchKey"), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
|
||||
@@ -250,7 +250,7 @@ class productplan extends control
|
||||
$this->session->set('bugList', $this->app->getURI(true) . '&type=' . 'bug');
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = common::checkObjectChangeAllowed('plan', $plan);
|
||||
$canBeChanged = common::checkObjectChangeAllowed('plan', $plan);
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
@@ -274,25 +274,25 @@ class productplan extends control
|
||||
if($plan->parent == '-1') $this->view->childrenPlans = $this->productplan->getChildren($plan->id);
|
||||
|
||||
$this->loadModel('datatable');
|
||||
$this->view->modulePairs = $this->loadModel('tree')->getOptionMenu($plan->product, 'story');
|
||||
$this->view->title = "PLAN #$plan->id $plan->title/" . $products[$plan->product];
|
||||
$this->view->position[] = $this->lang->productplan->view;
|
||||
$this->view->planStories = $planStories;
|
||||
$this->view->planBugs = $this->loadModel('bug')->getPlanBugs($planID, 'all', $type == 'bug' ? $sort : 'id_desc', $bugPager);
|
||||
$this->view->products = $products;
|
||||
$this->view->summary = $this->product->summary($this->view->planStories);
|
||||
$this->view->plan = $plan;
|
||||
$this->view->actions = $this->loadModel('action')->getList('productplan', $planID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->plans = $this->productplan->getPairs($plan->product, $plan->branch);
|
||||
$this->view->modules = $this->loadModel('tree')->getOptionMenu($plan->product);
|
||||
$this->view->type = $type;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->link = $link;
|
||||
$this->view->param = $param;
|
||||
$this->view->storyPager = $storyPager;
|
||||
$this->view->bugPager = $bugPager;
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
$this->view->modulePairs = $this->loadModel('tree')->getOptionMenu($plan->product, 'story');
|
||||
$this->view->title = "PLAN #$plan->id $plan->title/" . $products[$plan->product];
|
||||
$this->view->position[] = $this->lang->productplan->view;
|
||||
$this->view->planStories = $planStories;
|
||||
$this->view->planBugs = $this->loadModel('bug')->getPlanBugs($planID, 'all', $type == 'bug' ? $sort : 'id_desc', $bugPager);
|
||||
$this->view->products = $products;
|
||||
$this->view->summary = $this->product->summary($this->view->planStories);
|
||||
$this->view->plan = $plan;
|
||||
$this->view->actions = $this->loadModel('action')->getList('productplan', $planID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->plans = $this->productplan->getPairs($plan->product, $plan->branch);
|
||||
$this->view->modules = $this->loadModel('tree')->getOptionMenu($plan->product);
|
||||
$this->view->type = $type;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->link = $link;
|
||||
$this->view->param = $param;
|
||||
$this->view->storyPager = $storyPager;
|
||||
$this->view->bugPager = $bugPager;
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
|
||||
<?php if(!empty($this->config->CRProduct) or $product->status != 'closed'):?>
|
||||
<?php common::printLink('productplan', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->productplan->create}", '', "class='btn btn-primary'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
@@ -34,7 +34,7 @@
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->productplan->noPlan;?></span>
|
||||
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('productplan', 'create')):?>
|
||||
<?php if((!empty($this->config->CRProduct) or $product->status != 'closed') and common::hasPriv('productplan', 'create')):?>
|
||||
<?php echo html::a($this->createLink('productplan', 'create', "productID=$product->id&branch=$branch"), "<i class='icon icon-plus'></i> " . $lang->productplan->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
@@ -75,8 +75,8 @@
|
||||
<?php $this->loadModel('file');?>
|
||||
<?php foreach($plans as $plan):?>
|
||||
<?php
|
||||
$changeAllowed = common::checkObjectChangeAllowed('plan', $plan);
|
||||
$disabled = $changeAllowed ? '' : 'disabled';
|
||||
$canBeChanged = common::checkObjectChangeAllowed('plan', $plan);
|
||||
$attribute = $canBeChanged ? '' : 'disabled';
|
||||
|
||||
$plan = $this->file->replaceImgURL($plan, 'desc');
|
||||
if($plan->parent == '-1')
|
||||
@@ -100,7 +100,7 @@
|
||||
<tr class='<?php echo $class;?>'>
|
||||
<td class='cell-id'>
|
||||
<?php if(common::hasPriv('productplan', 'batchEdit')):?>
|
||||
<?php echo html::checkbox('planIDList', array($plan->id => ''), '', $disabled) . html::a(helper::createLink('productplan', 'view', "planID=$plan->id"), sprintf('%03d', $plan->id));?>
|
||||
<?php echo html::checkbox('planIDList', array($plan->id => ''), '', $attribute) . html::a(helper::createLink('productplan', 'view', "planID=$plan->id"), sprintf('%03d', $plan->id));?>
|
||||
<?php else:?>
|
||||
<?php echo sprintf('%03d', $plan->id);?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
<div id='stories' class='tab-pane <?php if($type == 'story') echo 'active'?>'>
|
||||
<?php $canOrder = common::hasPriv('project', 'storySort');?>
|
||||
<div class='actions'>
|
||||
<?php if(!$plan->deleted and $plan->parent >= 0 and $changeAllowed):?>
|
||||
<?php if(!$plan->deleted and $plan->parent >= 0 and $canBeChanged):?>
|
||||
<div class="btn-group">
|
||||
<div class='drop-down dropdown-hover'>
|
||||
<?php
|
||||
@@ -101,7 +101,7 @@
|
||||
$canBatchChangeStage = common::hasPriv('story', 'batchChangeStage');
|
||||
$canBatchAssignTo = common::hasPriv('story', 'batchAssignTo');
|
||||
|
||||
$canBatchAction = ($changeAllowed and ($canBatchUnlink or $canBatchClose or $canBatchEdit or $canBatchReview or $canBatchChangeBranch or $canBatchChangeModule or $canBatchChangePlan or $canBatchChangeStage or $canBatchAssignTo));
|
||||
$canBatchAction = ($canBeChanged and ($canBatchUnlink or $canBatchClose or $canBatchEdit or $canBatchReview or $canBatchChangeBranch or $canBatchChangeModule or $canBatchChangePlan or $canBatchChangeStage or $canBatchAssignTo));
|
||||
$vars = "planID={$plan->id}&type=story&orderBy=%s&link=$link¶m=$param";
|
||||
?>
|
||||
<thead>
|
||||
@@ -165,7 +165,7 @@
|
||||
<td><?php echo $lang->story->stageList[$story->stage];?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if($changeAllowed and common::hasPriv('productplan', 'unlinkStory'))
|
||||
if($canBeChanged and common::hasPriv('productplan', 'unlinkStory'))
|
||||
{
|
||||
$unlinkURL = $this->createLink('productplan', 'unlinkStory', "story=$story->id&plan=$plan->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->productplan->unlinkStory}'");
|
||||
@@ -363,7 +363,7 @@
|
||||
<?php endif;?>
|
||||
<form class='main-table table-bug' data-ride='table' method='post' target='hiddenwin' action="<?php echo inLink('batchUnlinkBug', "planID=$plan->id&orderBy=$orderBy");?>">
|
||||
<table class='table has-sort-head' id='bugList'>
|
||||
<?php $canBatchUnlink = $changeAllowed and common::hasPriv('productplan', 'batchUnlinkBug');?>
|
||||
<?php $canBatchUnlink = $canBeChanged and common::hasPriv('productplan', 'batchUnlinkBug');?>
|
||||
<?php $vars = "planID={$plan->id}&type=bug&orderBy=%s&link=$link¶m=$param"; ?>
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
@@ -404,7 +404,7 @@
|
||||
</td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if($changeAllowed and common::hasPriv('productplan', 'unlinkBug'))
|
||||
if($canBeChanged and common::hasPriv('productplan', 'unlinkBug'))
|
||||
{
|
||||
$unlinkURL = $this->createLink('productplan', 'unlinkBug', "story=$bug->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->productplan->unlinkBug}'");
|
||||
|
||||
+95
-90
@@ -128,6 +128,10 @@ class project extends control
|
||||
$products = $this->config->global->flow == 'onlyTask' ? array() : $this->loadModel('product')->getProductsByProject($projectID);
|
||||
setcookie('preProjectID', $projectID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$canBeChanged = true;
|
||||
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false;
|
||||
|
||||
if($this->cookie->preProjectID != $projectID)
|
||||
{
|
||||
$_COOKIE['moduleBrowseParam'] = $_COOKIE['productBrowseParam'] = 0;
|
||||
@@ -197,26 +201,27 @@ class project extends control
|
||||
$this->view->modulePairs = $showModule ? $this->tree->getModulePairs($projectID, 'task', $showModule) : array();
|
||||
|
||||
/* Assign. */
|
||||
$this->view->tasks = $tasks;
|
||||
$this->view->summary = $this->project->summary($tasks);
|
||||
$this->view->tabID = 'task';
|
||||
$this->view->pager = $pager;
|
||||
$this->view->recTotal = $pager->recTotal;
|
||||
$this->view->recPerPage = $pager->recPerPage;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->status = $status;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->param = $param;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->project = $project;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->modules = $this->tree->getTaskOptionMenu($projectID, 0, 0, $showAllModule ? 'allModule' : '');
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->moduleTree = $this->tree->getTaskTreeMenu($projectID, $productID, $startModuleID = 0, array('treeModel', 'createTaskLink'), $extra);
|
||||
$this->view->memberPairs = $memberPairs;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noempty');
|
||||
$this->view->setModule = true;
|
||||
$this->view->tasks = $tasks;
|
||||
$this->view->summary = $this->project->summary($tasks);
|
||||
$this->view->tabID = 'task';
|
||||
$this->view->pager = $pager;
|
||||
$this->view->recTotal = $pager->recTotal;
|
||||
$this->view->recPerPage = $pager->recPerPage;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->status = $status;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->param = $param;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->project = $project;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->modules = $this->tree->getTaskOptionMenu($projectID, 0, 0, $showAllModule ? 'allModule' : '');
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->moduleTree = $this->tree->getTaskTreeMenu($projectID, $productID, $startModuleID = 0, array('treeModel', 'createTaskLink'), $extra);
|
||||
$this->view->memberPairs = $memberPairs;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), 'noempty');
|
||||
$this->view->setModule = true;
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -697,8 +702,8 @@ class project extends control
|
||||
$projectID = $project->id;
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = true;
|
||||
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false;
|
||||
$canBeChanged = true;
|
||||
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false;
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
@@ -760,25 +765,25 @@ class project extends control
|
||||
if($productPairs) $productID = key($productPairs);
|
||||
|
||||
/* Assign. */
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->project = $project;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->allPlans = $allPlans;
|
||||
$this->view->summary = $this->product->summary($stories);
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->type = $this->session->projectStoryBrowseType;
|
||||
$this->view->param = $param;
|
||||
$this->view->moduleTree = $this->loadModel('tree')->getProjectStoryTreeMenu($projectID, $startModuleID = 0, array('treeModel', 'createProjectStoryLink'));
|
||||
$this->view->tabID = 'story';
|
||||
$this->view->storyTasks = $storyTasks;
|
||||
$this->view->storyBugs = $storyBugs;
|
||||
$this->view->storyCases = $storyCases;
|
||||
$this->view->users = $users;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->branchGroups = $branchGroups;
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->project = $project;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->allPlans = $allPlans;
|
||||
$this->view->summary = $this->product->summary($stories);
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->type = $this->session->projectStoryBrowseType;
|
||||
$this->view->param = $param;
|
||||
$this->view->moduleTree = $this->loadModel('tree')->getProjectStoryTreeMenu($projectID, $startModuleID = 0, array('treeModel', 'createProjectStoryLink'));
|
||||
$this->view->tabID = 'story';
|
||||
$this->view->storyTasks = $storyTasks;
|
||||
$this->view->storyBugs = $storyBugs;
|
||||
$this->view->storyCases = $storyCases;
|
||||
$this->view->users = $users;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->branchGroups = $branchGroups;
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -939,8 +944,8 @@ class project extends control
|
||||
$projectID = $project->id;
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = true;
|
||||
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false;
|
||||
$canBeChanged = true;
|
||||
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false;
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
@@ -951,18 +956,18 @@ class project extends control
|
||||
$tasks = $this->testtask->getProjectTasks($projectID, $orderBy, $pager);
|
||||
foreach($tasks as $key => $task) $productTasks[$task->product][] = $task;
|
||||
|
||||
$this->view->title = $this->projects[$projectID] . $this->lang->colon . $this->lang->testtask->common;
|
||||
$this->view->position[] = html::a($this->createLink('project', 'testtask', "projectID=$projectID"), $this->projects[$projectID]);
|
||||
$this->view->position[] = $this->lang->testtask->common;
|
||||
$this->view->project = $project;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->projectName = $this->projects[$projectID];
|
||||
$this->view->pager = $pager;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->tasks = $productTasks;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
|
||||
$this->view->products = $this->loadModel('product')->getPairs();
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
$this->view->title = $this->projects[$projectID] . $this->lang->colon . $this->lang->testtask->common;
|
||||
$this->view->position[] = html::a($this->createLink('project', 'testtask', "projectID=$projectID"), $this->projects[$projectID]);
|
||||
$this->view->position[] = $this->lang->testtask->common;
|
||||
$this->view->project = $project;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->projectName = $this->projects[$projectID];
|
||||
$this->view->pager = $pager;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->tasks = $productTasks;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
|
||||
$this->view->products = $this->loadModel('product')->getPairs();
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -1059,16 +1064,16 @@ class project extends control
|
||||
$projectID = $project->id;
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = true;
|
||||
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false;
|
||||
$canBeChanged = true;
|
||||
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false;
|
||||
|
||||
$title = $project->name . $this->lang->colon . $this->lang->project->team;
|
||||
$position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name);
|
||||
$position[] = $this->lang->project->team;
|
||||
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -1587,8 +1592,8 @@ class project extends control
|
||||
if(!$project) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = true;
|
||||
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false;
|
||||
$canBeChanged = true;
|
||||
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false;
|
||||
|
||||
$products = $this->project->getProducts($project->id);
|
||||
$linkedBranches = array();
|
||||
@@ -1614,19 +1619,19 @@ class project extends control
|
||||
$this->view->position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name);
|
||||
$this->view->position[] = $this->view->title;
|
||||
|
||||
$this->view->project = $project;
|
||||
$this->view->products = $products;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches);
|
||||
$this->view->planGroups = $this->project->getPlans($products);
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->actions = $this->loadModel('action')->getList('project', $projectID);
|
||||
$this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->teamMembers = $this->project->getTeamMembers($projectID);
|
||||
$this->view->docLibs = $this->loadModel('doc')->getLibsByObject('project', $projectID);
|
||||
$this->view->statData = $this->project->statRelatedData($projectID);
|
||||
$this->view->chartData = $chartData;
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
$this->view->project = $project;
|
||||
$this->view->products = $products;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($products), '', $linkedBranches);
|
||||
$this->view->planGroups = $this->project->getPlans($products);
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->actions = $this->loadModel('action')->getList('project', $projectID);
|
||||
$this->view->dynamics = $this->loadModel('action')->getDynamic('all', 'all', 'date_desc', $pager, 'all', $projectID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->teamMembers = $this->project->getTeamMembers($projectID);
|
||||
$this->view->docLibs = $this->loadModel('doc')->getLibsByObject('project', $projectID);
|
||||
$this->view->statData = $this->project->statRelatedData($projectID);
|
||||
$this->view->chartData = $chartData;
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -1658,8 +1663,8 @@ class project extends control
|
||||
$stories = $this->loadModel('story')->getProjectStories($projectID, $orderBy);
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = true;
|
||||
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false;
|
||||
$canBeChanged = true;
|
||||
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false;
|
||||
|
||||
$kanbanGroup = $this->project->getKanbanGroupData($stories, $tasks, $bugs, $type);
|
||||
$kanbanSetting = $this->project->getKanbanSetting();
|
||||
@@ -1677,10 +1682,10 @@ class project extends control
|
||||
$this->view->type = $type;
|
||||
$this->view->kanbanGroup = $kanbanGroup;
|
||||
$this->view->kanbanColumns = $this->project->getKanbanColumns($kanbanSetting);
|
||||
$this->view->statusMap = $changeAllowed ? $this->project->getKanbanStatusMap($kanbanSetting) : array();
|
||||
$this->view->statusMap = $canBeChanged ? $this->project->getKanbanStatusMap($kanbanSetting) : array();
|
||||
$this->view->statusList = $this->project->getKanbanStatusList($kanbanSetting);
|
||||
$this->view->colorList = $this->project->getKanbanColorList($kanbanSetting);
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -1851,23 +1856,23 @@ class project extends control
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', false);
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = true;
|
||||
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = false;
|
||||
$canBeChanged = true;
|
||||
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $canBeChanged = false;
|
||||
|
||||
/* Get project's product. */
|
||||
$productID = 0;
|
||||
$productPairs = $this->loadModel('product')->getProductsByProject($projectID);
|
||||
if($productPairs) $productID = key($productPairs);
|
||||
|
||||
$this->view->title = $this->lang->project->storyKanban;
|
||||
$this->view->position[] = html::a($this->createLink('project', 'story', "projectID=$projectID"), $project->name);
|
||||
$this->view->position[] = $this->lang->project->storyKanban;
|
||||
$this->view->stories = $this->story->getKanbanGroupData($stories);
|
||||
$this->view->realnames = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->project = $project;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
$this->view->title = $this->lang->project->storyKanban;
|
||||
$this->view->position[] = html::a($this->createLink('project', 'story', "projectID=$projectID"), $project->name);
|
||||
$this->view->position[] = $this->lang->project->storyKanban;
|
||||
$this->view->stories = $this->story->getKanbanGroupData($stories);
|
||||
$this->view->realnames = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->project = $project;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -38,7 +38,22 @@ $(function()
|
||||
storyIdList += $(this).val() + ',';
|
||||
$('#storyIdList').val(storyIdList);
|
||||
});
|
||||
})
|
||||
});
|
||||
|
||||
/* Judge required. */
|
||||
$('#batchToTask #submit').on('click', function ()
|
||||
{
|
||||
var message = '';
|
||||
if($('#batchToTask #type').val() == '') message = typeError;
|
||||
|
||||
if($('#batchToTask #hourPointValue').val() == '') message += workingHourError;
|
||||
|
||||
if(message)
|
||||
{
|
||||
alert(message);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
$('.sorter-false a').unwrap();
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ $(function()
|
||||
var $kanban = $('#kanban');
|
||||
|
||||
var stageMap = new Object();
|
||||
if(changeAllowed)
|
||||
if(canBeChanged)
|
||||
{
|
||||
stageMap =
|
||||
{
|
||||
|
||||
@@ -75,13 +75,13 @@
|
||||
<tbody>
|
||||
<?php foreach($bugs as $bug):?>
|
||||
<?php
|
||||
$changeAllowed = common::checkObjectChangeAllowed('bug', $bug);
|
||||
$disabled = $changeAllowed ? '' : 'disabled';
|
||||
$canBeChanged = common::checkObjectChangeAllowed('bug', $bug);
|
||||
$arrtibute = $canBeChanged ? '' : 'disabled';
|
||||
?>
|
||||
<tr>
|
||||
<td class='cell-id'>
|
||||
<?php if($canBatchAssignTo):?>
|
||||
<?php echo html::checkbox('bugIDList', array($bug->id => ''), '', $disabled) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));?>
|
||||
<?php echo html::checkbox('bugIDList', array($bug->id => ''), '', $arrtibute) . html::a(helper::createLink('bug', 'view', "bugID=$bug->id"), sprintf('%03d', $bug->id));?>
|
||||
<?php else:?>
|
||||
<?php printf('%03d', $bug->id);?>
|
||||
<?php endif;?>
|
||||
@@ -101,7 +101,7 @@
|
||||
<td><?php echo zget($lang->bug->resolutionList, $bug->resolution);?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
$params = "bugID=$bug->id";
|
||||
common::printIcon('bug', 'confirmBug', $params, $bug, 'list', 'confirm', '', 'iframe', true);
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
$link = $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=kanban");
|
||||
if(common::hasPriv('task', 'export')) echo html::a($link, "<i class='icon-export muted'></i> " . $lang->task->export, '', "class='btn btn-link iframe export' data-width='700'");
|
||||
?>
|
||||
<?php if($changeAllowed):?>
|
||||
<?php if($canBeChanged):?>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown' id='importAction'>
|
||||
<i class='icon-import muted'></i> <?php echo $lang->import ?>
|
||||
@@ -67,7 +67,7 @@
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->task->noTask;?></span>
|
||||
<?php if($changeAllowed and common::hasPriv('task', 'create')):?>
|
||||
<?php if($canBeChanged and common::hasPriv('task', 'create')):?>
|
||||
<?php echo html::a($this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : '')), "<i class='icon icon-plus'></i> " . $lang->task->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
@@ -117,7 +117,7 @@
|
||||
echo "<span class='group-title' title='{$story->title}'>{$story->title}</span>";
|
||||
}
|
||||
?>
|
||||
<?php if($changeAllowed):?>
|
||||
<?php if($canBeChanged):?>
|
||||
<nav class='board-actions nav nav-default'>
|
||||
<li class='dropdown'>
|
||||
<a href='javascript:;' data-toggle='dropdown' class='panel-action'><i class='icon icon-ellipsis-v'></i></a>
|
||||
|
||||
@@ -17,6 +17,8 @@
|
||||
<?php js::set('productID', $this->cookie->storyProductParam);?>
|
||||
<?php js::set('branchID', str_replace(',', '_', $this->cookie->storyBranchParam));?>
|
||||
<?php js::set('confirmUnlinkStory', $lang->project->confirmUnlinkStory)?>
|
||||
<?php js::set('typeError', sprintf($this->lang->error->notempty, $this->lang->task->type))?>
|
||||
<?php js::set('workingHourError', sprintf($this->lang->error->notempty, $this->lang->workingHour))?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<?php if(!empty($module->name) or !empty($product->name) or !empty($branch)):?>
|
||||
<div id="sidebarHeader">
|
||||
@@ -119,7 +121,7 @@
|
||||
$canBatchUnlink = common::hasPriv('project', 'batchUnlinkStory');
|
||||
$canBatchToTask = common::hasPriv('story', 'batchToTask');
|
||||
|
||||
$canBatchAction = ($changeAllowed and ($canBatchEdit or $canBatchClose or $canBatchChangeStage or $canBatchUnlink or $canBatchToTask));
|
||||
$canBatchAction = ($canBeChanged and ($canBatchEdit or $canBatchClose or $canBatchChangeStage or $canBatchUnlink or $canBatchToTask));
|
||||
?>
|
||||
<?php $vars = "projectID={$project->id}&orderBy=%s&type=$type¶m=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
|
||||
<th class='c-id {sorter:false}'>
|
||||
@@ -149,8 +151,8 @@
|
||||
<tbody id='storyTableList' class='sortable'>
|
||||
<?php foreach($stories as $key => $story):?>
|
||||
<?php
|
||||
$storyLink = $this->createLink('story', 'view', "storyID=$story->id&version=$story->version&from=project¶m=$project->id");
|
||||
$totalEstimate += $story->estimate;
|
||||
$storyLink = $this->createLink('story', 'view', "storyID=$story->id&version=$story->version&from=project¶m=$project->id");
|
||||
$totalEstimate += $story->estimate;
|
||||
?>
|
||||
<tr id="story<?php echo $story->id;?>" data-id='<?php echo $story->id;?>' data-order='<?php echo $story->order ?>' data-estimate='<?php echo $story->estimate?>' data-cases='<?php echo zget($storyCases, $story->id, 0)?>'>
|
||||
<td class='cell-id'>
|
||||
@@ -197,7 +199,7 @@
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
$hasDBPriv = common::hasDBPriv($project, 'project');
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
$param = "projectID={$project->id}&story={$story->id}&moduleID={$story->module}";
|
||||
|
||||
@@ -218,7 +220,7 @@
|
||||
$lang->testcase->batchCreate = $lang->testcase->create;
|
||||
if($productID && $hasDBPriv) common::printIcon('testcase', 'batchCreate', "productID=$story->product&branch=$story->branch&moduleID=$story->module&storyID=$story->id", '', 'list', 'sitemap');
|
||||
|
||||
if($changeAllowed and common::hasPriv('project', 'unlinkStory', $project))
|
||||
if($canBeChanged and common::hasPriv('project', 'unlinkStory', $project))
|
||||
{
|
||||
$unlinkURL = $this->createLink('project', 'unlinkStory', "projectID=$project->id&storyID=$story->id&confirm=yes");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->project->unlinkStory}'");
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php js::set('confirmUnlinkStory', $lang->project->confirmUnlinkStory)?>
|
||||
<?php js::set('changeAllowed', $changeAllowed)?>
|
||||
<?php js::set('canBeChanged', $canBeChanged)?>
|
||||
<div id="mainMenu" class="clearfix">
|
||||
<div class="btn-toolbar pull-left">
|
||||
<?php $total = 0;?>
|
||||
@@ -23,7 +23,7 @@
|
||||
<?php
|
||||
common::printIcon('story', 'export', "productID=$productID&orderBy=id_desc", '', 'button', '', '', 'export');
|
||||
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
@@ -37,7 +37,7 @@
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
<?php if($changeAllowed and $productID and !$this->loadModel('story')->checkForceReview()) common::printLink('story', 'create', "productID=$productID&branch=&moduleID=0&story=0&project=$project->id", "<i class='icon icon-plus'></i> " . $lang->project->createStory, '', "class='btn btn-primary'");?>
|
||||
<?php if($canBeChanged and $productID and !$this->loadModel('story')->checkForceReview()) common::printLink('story', 'create', "productID=$productID&branch=&moduleID=0&story=0&project=$project->id", "<i class='icon icon-plus'></i> " . $lang->project->createStory, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php
|
||||
@@ -49,7 +49,7 @@ $account = $this->app->user->account;
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->story->noStory;?></span>
|
||||
<?php if($changeAllowed and common::hasPriv('project', 'linkStory')):?>
|
||||
<?php if($canBeChanged and common::hasPriv('project', 'linkStory')):?>
|
||||
<?php echo html::a($this->createLink('project', 'linkStory', "project=$project->id"), "<i class='icon icon-link'></i> " . $lang->project->linkStory, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
@@ -77,7 +77,7 @@ $account = $this->app->user->account;
|
||||
<div class='info'>
|
||||
<span class='label-pri label-pri-<?php echo $story->pri?>' title='<?php echo $lang->story->pri?>'><?php echo zget($lang->story->priList, $story->pri);?></span>
|
||||
<span class='status status-story status-<?php echo $story->status;?>' title='<?php echo $lang->story->status?>'><span class="label label-dot"></span> <?php echo $lang->story->statusList[$story->status];?></span>
|
||||
<?php if($changeAllowed and common::hasPriv('project', 'unlinkStory')):?>
|
||||
<?php if($canBeChanged and common::hasPriv('project', 'unlinkStory')):?>
|
||||
<div class='pull-right'><?php echo html::a($this->createLink('project', 'unlinkStory', "projectID=$projectID&story=$story->id"), "<i class='icon icon-unlink icon-sm'></i>", 'hiddenwin', "title='{$lang->project->unlinkStory}'");?></div>
|
||||
<?php endif;?>
|
||||
<div class='pull-right text-muted story-estimate' title='<?php echo $lang->story->estimate?>'><?php echo $story->estimate . 'h ';?></div>
|
||||
|
||||
@@ -136,23 +136,19 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
$checkObject = new stdclass();
|
||||
$checkObject->project = $projectID;
|
||||
?>
|
||||
<?php if(!common::checkNotCN()):?>
|
||||
<?php
|
||||
$link = $this->createLink('task', 'batchCreate', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : ''));
|
||||
if(common::hasPriv('task', 'batchCreate', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->batchCreate}", '', "class='btn btn btn-secondary'");
|
||||
if($canBeChanged and common::hasPriv('task', 'batchCreate')) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->batchCreate}", '', "class='btn btn btn-secondary'");
|
||||
|
||||
$link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : ""));
|
||||
if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create}", '', "class='btn btn-primary'");
|
||||
if($canBeChanged and common::hasPriv('task', 'create')) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create}", '', "class='btn btn-primary'");
|
||||
?>
|
||||
<?php else:?>
|
||||
<?php
|
||||
echo "<div class='btn-group dropdown-hover'>";
|
||||
$link = $this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : ""));
|
||||
if(common::hasPriv('task', 'create', $checkObject)) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create} </span><span class='caret'>", '', "class='btn btn-primary'");
|
||||
if($canBeChanged and common::hasPriv('task', 'create')) echo html::a($link, "<i class='icon icon-plus'></i> {$lang->task->create} </span><span class='caret'>", '', "class='btn btn-primary'");
|
||||
?>
|
||||
<ul class='dropdown-menu'>
|
||||
<?php $disabled = common::hasPriv('task', 'batchCreate') ? '' : "class='disabled'";?>
|
||||
@@ -184,7 +180,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->task->noTask;?></span>
|
||||
<?php if(common::hasPriv('task', 'create', $checkObject)):?>
|
||||
<?php if($canBeChanged and common::hasPriv('task', 'create')):?>
|
||||
<?php echo html::a($this->createLink('task', 'create', "project=$projectID" . (isset($moduleID) ? "&storyID=0&moduleID=$moduleID" : "")), "<i class='icon icon-plus'></i> " . $lang->task->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
@@ -55,7 +55,7 @@
|
||||
<th><?php echo $lang->team->hours;?></th>
|
||||
<th><?php echo $lang->team->totalHours;?></th>
|
||||
<th class='w-100px text-center'><?php echo $lang->team->limited;?></th>
|
||||
<?php if($changeAllowed):?>
|
||||
<?php if($canBeChanged):?>
|
||||
<th class='c-actions-1 w-80px text-center'><?php echo $lang->actions;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
@@ -77,7 +77,7 @@
|
||||
<td><?php echo $member->hours . $lang->project->workHour;?></td>
|
||||
<td><?php echo $memberHours . $lang->project->workHour;?></td>
|
||||
<td class="text-center"><?php echo $lang->team->limitedList[$member->limited];?></td>
|
||||
<?php if($changeAllowed):?>
|
||||
<?php if($canBeChanged):?>
|
||||
<td class='c-actions text-center'>
|
||||
<?php
|
||||
if (common::hasPriv('project', 'unlinkMember', $member))
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
<table class="table table-grouped has-sort-head" id='taskList'>
|
||||
<thead>
|
||||
<?php $vars = "projectID=$projectID&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}";?>
|
||||
<?php $canTestReport = ($changeAllowed and common::hasPriv('testreport', 'browse'));?>
|
||||
<?php $canTestReport = ($canBeChanged and common::hasPriv('testreport', 'browse'));?>
|
||||
<tr class='<?php if($total) echo 'divider'; ?>'>
|
||||
<th class='c-side text-center'><?php common::printOrderLink('product', $orderBy, $vars, $lang->testtask->product);?></th>
|
||||
<th class="c-id">
|
||||
@@ -98,7 +98,7 @@
|
||||
</td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
common::printIcon('testtask', 'cases', "taskID=$task->id", $task, 'list', 'sitemap');
|
||||
common::printIcon('testtask', 'linkCase', "taskID=$task->id", $task, 'list', 'link');
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
<?php $j++;?>
|
||||
<?php endforeach;?>
|
||||
<div class="col-xs-6">
|
||||
<?php if($changeAllowed) common::printLink('project', 'manageMembers', "projectID=$project->id", "<i class='icon icon-plus hl-primary text-primary'></i> " . $lang->project->manageMembers, '', "class='text-muted'");?>
|
||||
<?php if($canBeChanged) common::printLink('project', 'manageMembers', "projectID=$project->id", "<i class='icon icon-plus hl-primary text-primary'></i> " . $lang->project->manageMembers, '', "class='text-muted'");?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
@@ -133,7 +133,7 @@
|
||||
<?php $i++;?>
|
||||
<?php endforeach;?>
|
||||
<div class="col-xs-6">
|
||||
<?php if($changeAllowed) common::printLink('doc', 'createLib', "type=project&objectID=$project->id", "<i class='icon icon-plus hl-primary text-primary'></i> " . $lang->doc->createLib, '', "class='text-muted iframe' data-width='1000px'");?>
|
||||
<?php if($canBeChanged) common::printLink('doc', 'createLib', "type=project&objectID=$project->id", "<i class='icon icon-plus hl-primary text-primary'></i> " . $lang->doc->createLib, '', "class='text-muted iframe' data-width='1000px'");?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
|
||||
<?php if(!empty($this->config->CRProduct) or $product->status != 'closed'):?>
|
||||
<?php common::printLink('release', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->release->noRelease;?></span>
|
||||
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('release', 'create')):?>
|
||||
<?php if((!empty($this->config->CRProduct) or $product->status != 'closed') and common::hasPriv('release', 'create')):?>
|
||||
<?php echo html::a($this->createLink('release', 'create', "productID=$product->id&branch=$branch"), "<i class='icon icon-plus'></i> " . $lang->release->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
@@ -58,7 +58,7 @@
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach($releases as $release):?>
|
||||
<?php $changeAllowed = common::checkObjectChangeAllowed('release', $release);?>
|
||||
<?php $canBeChanged = common::checkObjectChangeAllowed('release', $release);?>
|
||||
<tr>
|
||||
<td><?php echo html::a(helper::createLink('release', 'view', "releaseID=$release->id"), sprintf('%03d', $release->id));?></td>
|
||||
<td>
|
||||
@@ -79,7 +79,7 @@
|
||||
<?php foreach($extendFields as $extendField) echo "<td>" . $this->loadModel('flow')->getFieldValue($extendField, $release) . "</td>";?>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
if(common::hasPriv('release', 'linkStory')) echo html::a(inlink('view', "releaseID=$release->id&type=story&link=true"), '<i class="icon-link"></i> ', '', "class='btn' title='{$lang->release->linkStory}'");
|
||||
if(common::hasPriv('release', 'linkBug') and $config->global->flow != 'onlyStory') echo html::a(inlink('view', "releaseID=$release->id&type=bug&link=true"), '<i class="icon-bug"></i> ', '', "class='btn' title='{$lang->release->linkBug}'");
|
||||
|
||||
@@ -31,9 +31,9 @@
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php
|
||||
$changeAllowed = common::checkObjectChangeAllowed('release', $release);
|
||||
$canBeChanged = common::checkObjectChangeAllowed('release', $release);
|
||||
|
||||
if(!$release->deleted and $changeAllowed)
|
||||
if(!$release->deleted and $canBeChanged)
|
||||
{
|
||||
echo $this->buildOperateMenu($release, 'view');
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
</ul>
|
||||
<div class='tab-content'>
|
||||
<div class='tab-pane <?php if($type == 'story') echo 'active'?>' id='stories'>
|
||||
<?php if(common::hasPriv('release', 'linkStory') and $changeAllowed):?>
|
||||
<?php if(common::hasPriv('release', 'linkStory') and $canBeChanged):?>
|
||||
<div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"story\")", '<i class="icon-link"></i> ' . $lang->release->linkStory, '', "class='btn btn-primary'");?></div>
|
||||
<div class='linkBox cell hidden'></div>
|
||||
<?php endif;?>
|
||||
@@ -80,7 +80,7 @@
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='c-id text-left'>
|
||||
<?php if(($canBatchUnlink or $canBatchClose) and $changeAllowed):?>
|
||||
<?php if(($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
@@ -101,7 +101,7 @@
|
||||
<?php $storyLink = $this->createLink('story', 'view', "storyID=$story->id", '', true);?>
|
||||
<tr>
|
||||
<td class='c-id text-left'>
|
||||
<?php if(($canBatchUnlink or $canBatchClose) and $changeAllowed):?>
|
||||
<?php if(($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='storyIdList[]' value='<?php echo $story->id;?>'/>
|
||||
<label></label>
|
||||
@@ -124,7 +124,7 @@
|
||||
<td><?php echo $lang->story->stageList[$story->stage];?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('release', 'unlinkStory') and $changeAllowed)
|
||||
if(common::hasPriv('release', 'unlinkStory') and $canBeChanged)
|
||||
{
|
||||
$unlinkURL = $this->createLink('release', 'unlinkStory', "releaseID=$release->id&story=$story->id");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"storyList\", confirmUnlinkStory)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkStory}'");
|
||||
@@ -136,7 +136,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php if($countStories and ($canBatchUnlink or $canBatchClose) and $changeAllowed):?>
|
||||
<?php if($countStories and ($canBatchUnlink or $canBatchClose) and $canBeChanged):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php
|
||||
@@ -164,7 +164,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class='tab-pane <?php if($type == 'bug') echo 'active'?>' id='bugs'>
|
||||
<?php if(common::hasPriv('release', 'linkBug') and $changeAllowed):?>
|
||||
<?php if(common::hasPriv('release', 'linkBug') and $canBeChanged):?>
|
||||
<div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"bug\")", '<i class="icon-bug"></i> ' . $lang->release->linkBug, '', "class='btn btn-primary'");?></div>
|
||||
<div class='linkBox cell hidden'></div>
|
||||
<?php endif;?>
|
||||
@@ -175,7 +175,7 @@
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='c-id text-left'>
|
||||
<?php if($canBatchUnlink and $changeAllowed):?>
|
||||
<?php if($canBatchUnlink and $canBeChanged):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
@@ -196,7 +196,7 @@
|
||||
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
|
||||
<tr>
|
||||
<td class='c-id text-left'>
|
||||
<?php if($canBatchUnlink and $changeAllowed):?>
|
||||
<?php if($canBatchUnlink and $canBeChanged):?>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
|
||||
<label></label>
|
||||
@@ -214,7 +214,7 @@
|
||||
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('release', 'unlinkBug') and $changeAllowed)
|
||||
if(common::hasPriv('release', 'unlinkBug') and $canBeChanged)
|
||||
{
|
||||
$unlinkURL = $this->createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"bugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkBug}'");
|
||||
@@ -226,7 +226,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php if($countBugs and $canBatchUnlink and $changeAllowed):?>
|
||||
<?php if($countBugs and $canBatchUnlink and $canBeChanged):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php echo html::submitButton($lang->release->batchUnlink, '', 'btn');?>
|
||||
@@ -242,7 +242,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class='tab-pane <?php if($type == 'leftBug') echo 'active'?>' id='leftBugs'>
|
||||
<?php if(common::hasPriv('release', 'linkBug') and $changeAllowed):?>
|
||||
<?php if(common::hasPriv('release', 'linkBug') and $canBeChanged):?>
|
||||
<div class='actions'><?php echo html::a("javascript:showLink({$release->id}, \"leftBug\")", '<i class="icon-bug"></i> ' . $lang->release->linkBug, '', "class='btn btn-primary'");?></div>
|
||||
<div class='linkBox cell hidden'></div>
|
||||
<?php endif;?>
|
||||
@@ -253,7 +253,7 @@
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='c-id text-left'>
|
||||
<?php if($canBatchUnlink and $changeAllowed):?>
|
||||
<?php if($canBatchUnlink and $canBeChanged):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
@@ -284,7 +284,7 @@
|
||||
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
|
||||
<tr>
|
||||
<td class='c-id text-left'>
|
||||
<?php if($canBatchUnlink and $changeAllowed):?>
|
||||
<?php if($canBatchUnlink and $canBeChanged):?>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
|
||||
<label></label>
|
||||
@@ -305,7 +305,7 @@
|
||||
<td><?php echo $bug->openedDate?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('release', 'unlinkBug') and $changeAllowed)
|
||||
if(common::hasPriv('release', 'unlinkBug') and $canBeChanged)
|
||||
{
|
||||
$unlinkURL = $this->createLink('release', 'unlinkBug', "releaseID=$release->id&bug=$bug->id&type=leftBug");
|
||||
echo html::a("javascript:ajaxDelete(\"$unlinkURL\", \"leftBugList\", confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn' title='{$lang->release->unlinkBug}'");
|
||||
@@ -317,7 +317,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php if($countLeftBugs and $canBatchUnlink and $changeAllowed):?>
|
||||
<?php if($countLeftBugs and $canBatchUnlink and $canBeChanged):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php echo html::submitButton($lang->release->batchUnlink, '', 'btn');?>
|
||||
|
||||
@@ -1063,7 +1063,7 @@ class story extends control
|
||||
}
|
||||
|
||||
/**
|
||||
* Batch conversion of stories into tasks.
|
||||
* Batch stories convert to tasks.
|
||||
*
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
@@ -1076,8 +1076,7 @@ class story extends control
|
||||
$this->story->batchToTask($projectID);
|
||||
|
||||
if(dao::isError()) die(js::error(dao::getError()) . js::locate('back'));
|
||||
|
||||
if(!dao::isError()) die(js::alert($this->lang->saveSuccess) . js::locate($this->createLink('project', 'task', "projectID=$projectID"), 'parent'));
|
||||
die(js::alert($this->lang->story->successToTask) . js::locate($this->createLink('project', 'task', "projectID=$projectID"), 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1235,6 +1234,7 @@ class story extends control
|
||||
* Bugs of a story.
|
||||
*
|
||||
* @param int $storyID
|
||||
* @param int $projectID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
|
||||
@@ -64,6 +64,7 @@ $lang->story->batchToTask = 'Batch Convert to Task';
|
||||
$lang->story->skipStory = '%s is a parent story. It cannot be closed.';
|
||||
$lang->story->closedStory = 'Story %s is closed and will not be closed.';
|
||||
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->storyCommon} and link {$lang->storyCommon} to the task. The closed {$lang->storyCommon} will not be converted into tasks.";
|
||||
$lang->story->successToTask = "Converted to task."
|
||||
|
||||
$lang->story->common = 'Story';
|
||||
$lang->story->id = 'ID';
|
||||
|
||||
@@ -64,6 +64,7 @@ $lang->story->batchToTask = 'Batch Convert to Task';
|
||||
$lang->story->skipStory = '%s is a parent story. It cannot be closed.';
|
||||
$lang->story->closedStory = 'Story %s is closed and will not be closed.';
|
||||
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->storyCommon} and link {$lang->storyCommon} to the task. The closed {$lang->storyCommon} will not be converted into tasks.";
|
||||
$lang->story->successToTask = "Converted to task."
|
||||
|
||||
$lang->story->common = 'Story';
|
||||
$lang->story->id = 'ID';
|
||||
|
||||
@@ -64,6 +64,7 @@ $lang->story->batchToTask = 'Batch Convert to Task';
|
||||
$lang->story->skipStory = '%s is a parent story. It cannot be closed.';
|
||||
$lang->story->closedStory = 'Story %s is closed and will not be closed.';
|
||||
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->storyCommon} and link {$lang->storyCommon} to the task. The closed {$lang->storyCommon} will not be converted into tasks.";
|
||||
$lang->story->successToTask = "Converted to task."
|
||||
|
||||
$lang->story->common = 'Story';
|
||||
$lang->story->id = 'ID';
|
||||
|
||||
@@ -64,6 +64,7 @@ $lang->story->batchToTask = 'Batch Convert to Task';
|
||||
$lang->story->skipStory = '%s is a parent story. It cannot be closed.';
|
||||
$lang->story->closedStory = 'Story %s is closed and will not be closed.';
|
||||
$lang->story->batchToTaskTips = "This action will create a task with the same name as the selected {$lang->storyCommon} and link {$lang->storyCommon} to the task. The closed {$lang->storyCommon} will not be converted into tasks.";
|
||||
$lang->story->successToTask = "Converted to task."
|
||||
|
||||
$lang->story->common = 'Câu chuyện';
|
||||
$lang->story->id = 'ID';
|
||||
|
||||
@@ -64,6 +64,7 @@ $lang->story->batchToTask = '批量转任务';
|
||||
$lang->story->skipStory = '需求:%s 为父需求,将不会被关闭。';
|
||||
$lang->story->closedStory = '需求:%s 已关闭,将不会被关闭。';
|
||||
$lang->story->batchToTaskTips = "此操作会创建与所选{$lang->storyCommon}同名的任务,并将{$lang->storyCommon}关联到任务中,已关闭的需求不会转为任务。";
|
||||
$lang->story->successToTask = '批量转任务成功';
|
||||
|
||||
$lang->story->common = $lang->storyCommon;
|
||||
$lang->story->id = '编号';
|
||||
|
||||
+12
-16
@@ -1426,12 +1426,6 @@ class storyModel extends model
|
||||
$data = fixer::input('post')->get();
|
||||
$now = helper::now();
|
||||
|
||||
/* Judge required. */
|
||||
$message = '';
|
||||
if(empty($data->type)) $message = sprintf($this->lang->error->notempty, $this->lang->task->type);
|
||||
if(isset($data->hourPointValue) and empty($data->hourPointValue)) $message .= sprintf($this->lang->error->notempty, $this->lang->workingHour);
|
||||
if($message) die(js::error($message) . js::locate(helper::createLink('project', 'story', "projectID=$projectID"), 'parent'));
|
||||
|
||||
/* Create tasks. */
|
||||
$stories = $this->getByList($data->storyIdList);
|
||||
foreach($stories as $story)
|
||||
@@ -1447,17 +1441,19 @@ class storyModel extends model
|
||||
$task->openedBy = $this->app->user->account;
|
||||
$task->openedDate = $now;
|
||||
|
||||
foreach($data->field as $field)
|
||||
if(isset($data->field))
|
||||
{
|
||||
$task->$field = $story->$field;
|
||||
|
||||
if($field == 'assignedTo') $task->assignedDate = $now;
|
||||
if($field == 'spec')
|
||||
foreach($data->field as $field)
|
||||
{
|
||||
unset($task->$field);
|
||||
$task->desc = $story->$field;
|
||||
}
|
||||
$task->$field = $story->$field;
|
||||
|
||||
if($field == 'assignedTo') $task->assignedDate = $now;
|
||||
if($field == 'spec')
|
||||
{
|
||||
unset($task->$field);
|
||||
$task->desc = $story->$field;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$this->dao->insert(TABLE_TASK)->data($task)
|
||||
@@ -3032,7 +3028,7 @@ class storyModel extends model
|
||||
public function printCell($col, $story, $users, $branches, $storyStages, $modulePairs = array(), $storyTasks = array(), $storyBugs = array(), $storyCases = array(), $mode = 'datatable', $storyType = 'story')
|
||||
{
|
||||
/* Check the product is closed. */
|
||||
$changeAllowed = common::checkObjectChangeAllowed('story', $story);
|
||||
$canBeChanged = common::checkObjectChangeAllowed('story', $story);
|
||||
|
||||
$canBatchEdit = common::hasPriv('story', 'batchEdit');
|
||||
$canBatchClose = common::hasPriv('story', 'batchClose');
|
||||
@@ -3229,7 +3225,7 @@ class storyModel extends model
|
||||
break;
|
||||
case 'actions':
|
||||
$vars = "story={$story->id}";
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
common::printIcon('story', 'change', $vars, $story, 'list', 'fork');
|
||||
common::printIcon('story', 'review', $vars, $story, 'list', 'glasses');
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
</div>
|
||||
<?php if(!isonlybody()):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'): ?>
|
||||
<?php if(!empty($this->config->CRProduct) or $product->status != 'closed'): ?>
|
||||
<?php common::printLink('story', 'create', "productID={$story->product}&branch={$story->branch}&moduleID={$story->module}", "<i class='icon icon-plus'></i>" . $lang->story->create, '', "class='btn btn-primary'"); ?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
+12
-12
@@ -111,26 +111,26 @@ class svnModel extends model
|
||||
*
|
||||
* @param object $repo
|
||||
* @param array $commentGroup
|
||||
* @param bool $isPrintLog
|
||||
* @param bool $printLog
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function updateCommit($repo, $commentGroup, $isPrintLog = true)
|
||||
public function updateCommit($repo, $commentGroup, $printLog = true)
|
||||
{
|
||||
/* Load mudule and print log. */
|
||||
$this->loadModel('repo');
|
||||
if($isPrintLog) $this->printLog("begin repo {$repo->name}");
|
||||
if($printLog) $this->printLog("begin repo {$repo->name}");
|
||||
|
||||
if(!$this->setRepo($repo)) return false;
|
||||
|
||||
/* Print log and get lastInDB. */
|
||||
if($isPrintLog) $this->printLog("get this repo logs.");
|
||||
if($printLog) $this->printLog("get this repo logs.");
|
||||
$lastInDB = $this->repo->getLatestCommit($repo->id);
|
||||
|
||||
/* Ignore unsynced repo. */
|
||||
if(empty($lastInDB))
|
||||
{
|
||||
if($isPrintLog) $this->printLog("Please init repo {$repo->name}");
|
||||
if($printLog) $this->printLog("Please init repo {$repo->name}");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -141,18 +141,18 @@ class svnModel extends model
|
||||
$objects = array();
|
||||
if(!empty($logs))
|
||||
{
|
||||
if($isPrintLog) $this->printLog("get " . count($logs) . " logs");
|
||||
if($isPrintLog) $this->printLog('begin parsing logs');
|
||||
if($printLog) $this->printLog("get " . count($logs) . " logs");
|
||||
if($printLog) $this->printLog('begin parsing logs');
|
||||
|
||||
foreach($logs as $log)
|
||||
{
|
||||
if($isPrintLog) $this->printLog("parsing log {$log->revision}");
|
||||
if($isPrintLog) $this->printLog("comment is\n----------\n" . trim($log->msg) . "\n----------");
|
||||
if($printLog) $this->printLog("parsing log {$log->revision}");
|
||||
if($printLog) $this->printLog("comment is\n----------\n" . trim($log->msg) . "\n----------");
|
||||
|
||||
$objects = $this->repo->parseComment($log->msg);
|
||||
if($objects)
|
||||
{
|
||||
if($isPrintLog) $this->printLog('extract' .
|
||||
if($printLog) $this->printLog('extract' .
|
||||
' story:' . join(' ', $objects['stories']) .
|
||||
' task:' . join(' ', $objects['tasks']) .
|
||||
' bug:' . join(',', $objects['bugs']));
|
||||
@@ -160,7 +160,7 @@ class svnModel extends model
|
||||
}
|
||||
else
|
||||
{
|
||||
if($isPrintLog) $this->printLog('no objects found' . "\n");
|
||||
if($printLog) $this->printLog('no objects found' . "\n");
|
||||
}
|
||||
|
||||
/* Create compile by comment. */
|
||||
@@ -178,7 +178,7 @@ class svnModel extends model
|
||||
$this->repo->updateCommitCount($repo->id, $lastInDB->commit + count($logs));
|
||||
$this->dao->update(TABLE_REPO)->set('lastSync')->eq(helper::now())->where('id')->eq($repo->id)->exec();
|
||||
|
||||
if($isPrintLog) $this->printLog("\n\nrepo #" . $repo->id . ': ' . $repo->path . " finished");
|
||||
if($printLog) $this->printLog("\n\nrepo #" . $repo->id . ': ' . $repo->path . " finished");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -738,16 +738,12 @@ class task extends control
|
||||
die(js::locate($this->createLink('task', 'view', "taskID=$taskID"), 'parent'));
|
||||
}
|
||||
|
||||
$users = $this->loadModel('user')->getPairs('noletter');
|
||||
$members = $this->loadModel('project')->getTeamMemberPairs($task->project, 'nodeleted');
|
||||
$assignedTo = in_array(zget($this->app->user->account, $users), $members) === TRUE ? $this->app->user->account : '';
|
||||
|
||||
$this->view->title = $this->view->project->name . $this->lang->colon .$this->lang->task->start;
|
||||
$this->view->position[] = $this->lang->task->start;
|
||||
|
||||
$this->view->users = $users;
|
||||
$this->view->members = $members;
|
||||
$this->view->assignedTo = $task->assignedTo == '' ? $assignedTo : $task->assignedTo;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->members = $this->loadModel('project')->getTeamMemberPairs($task->project, 'nodeleted');
|
||||
$this->view->assignedTo = $task->assignedTo == '' ? $this->app->user->account : $task->assignedTo;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,10 @@ function checkLeft()
|
||||
alert(noticeTaskStart);
|
||||
result = false;
|
||||
}
|
||||
else result = confirm(confirmFinish);
|
||||
else
|
||||
{
|
||||
result = confirm(confirmFinish);
|
||||
}
|
||||
if(!result) setTimeout(function() {$.enableForm()}, 50);
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -109,8 +109,6 @@ class testcase extends control
|
||||
$actionURL = $this->createLink('testcase', 'browse', "productID=$productID&branch=$branch&browseType=bySearch&queryID=myQueryID");
|
||||
$this->config->testcase->search['onMenuBar'] = 'yes';
|
||||
|
||||
$libs = $this->loadModel('caselib')->getLibraries();
|
||||
$this->config->testcase->search['params']['lib']['values'] = $libs;
|
||||
$this->testcase->buildSearchForm($productID, $this->products, $queryID, $actionURL);
|
||||
|
||||
$showModule = !empty($this->config->datatable->testcaseBrowse->showModule) ? $this->config->datatable->testcaseBrowse->showModule : '';
|
||||
@@ -140,7 +138,6 @@ class testcase extends control
|
||||
$this->view->suiteList = $this->loadModel('testsuite')->getSuites($productID);
|
||||
$this->view->suiteID = $suiteID;
|
||||
$this->view->setModule = true;
|
||||
$this->view->libs = $libs;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -1379,6 +1379,8 @@ class testcaseModel extends model
|
||||
{
|
||||
$this->config->testcase->search['params']['product']['values'] = array($productID => $products[$productID], 'all' => $this->lang->testcase->allProduct);
|
||||
$this->config->testcase->search['params']['module']['values'] = $this->loadModel('tree')->getOptionMenu($productID, $viewType = 'case');
|
||||
$this->config->testcase->search['params']['lib']['values'] = $this->loadModel('caselib')->getLibraries();
|
||||
|
||||
if($this->session->currentProductType == 'normal')
|
||||
{
|
||||
unset($this->config->testcase->search['fields']['branch']);
|
||||
@@ -1409,7 +1411,7 @@ class testcaseModel extends model
|
||||
public function printCell($col, $case, $users, $branches, $modulePairs = array(), $browseType = '', $mode = 'datatable')
|
||||
{
|
||||
/* Check the product is closed. */
|
||||
$changeAllowed = common::checkObjectChangeAllowed('case', $case);
|
||||
$canBeChanged = common::checkObjectChangeAllowed('case', $case);
|
||||
|
||||
$canBatchRun = common::hasPriv('testtask', 'batchRun');
|
||||
$canBatchEdit = common::hasPriv('testcase', 'batchEdit');
|
||||
@@ -1450,7 +1452,7 @@ class testcaseModel extends model
|
||||
case 'id':
|
||||
if($canBatchAction)
|
||||
{
|
||||
$disabled = $changeAllowed ? '' : 'disabled';
|
||||
$disabled = $canBeChanged ? '' : 'disabled';
|
||||
echo html::checkbox('caseIDList', array($case->id => ''), '', $disabled) . html::a(helper::createLink('testcase', 'view', "caseID=$case->id"), sprintf('%03d', $case->id));
|
||||
}
|
||||
else
|
||||
@@ -1547,7 +1549,7 @@ class testcaseModel extends model
|
||||
echo $case->stepNumber;
|
||||
break;
|
||||
case 'actions':
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
if($case->needconfirm or $browseType == 'needconfirm')
|
||||
{
|
||||
|
||||
@@ -47,7 +47,7 @@ js::set('suiteID', $suiteID);
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->testcase->noCase;?></span>
|
||||
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('testcase', 'create')):?>
|
||||
<?php if((!empty($this->config->CRProduct) or $product->status != 'closed') and common::hasPriv('testcase', 'create')):?>
|
||||
<?php $initModule = isset($moduleID) ? (int)$moduleID : 0;?>
|
||||
<?php echo html::a($this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule"), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
|
||||
echo "<div id='bysuiteTab' class='btn-group'>";
|
||||
echo html::a('javascript:;', $currentLable . " <span class='caret'></span>", '', "class='btn btn-link' data-toggle='dropdown'");
|
||||
if(empty($this->config->global->closedProductStatus) or $product->status != 'closed')
|
||||
if(!empty($this->config->CRProduct) or $product->status != 'closed')
|
||||
{
|
||||
echo "<ul class='dropdown-menu' style='max-height:240px; overflow-y:auto'>";
|
||||
|
||||
@@ -105,7 +105,7 @@
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
|
||||
<?php if(!empty($this->config->CRProduct) or $product->status != 'closed'):?>
|
||||
<div class='btn-group'>
|
||||
<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown' id='importAction'><i class='icon icon-import muted'></i> <?php echo $lang->import ?><span class='caret'></span></button>
|
||||
<ul class='dropdown-menu' id='importActionMenu'>
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->testcase->noCase;?></span>
|
||||
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('testcase', 'create')):?>
|
||||
<?php if((!empty($this->config->CRProduct) or $product->status != 'closed') and common::hasPriv('testcase', 'create')):?>
|
||||
<?php echo html::a($this->createLink('testcase', 'create', "productID=$productID&branch=$branch&moduleID=$initModule"), "<i class='icon icon-plus'></i> " . $lang->testcase->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
|
||||
@@ -58,9 +58,9 @@ class testreport extends control
|
||||
$name = $extra ? $task->name : $object->name;
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = true;
|
||||
if($objectType == 'product' and !empty($this->config->global->closedProductStatus) and $object->status == 'closed') $changeAllowed = false;
|
||||
if($objectType == 'project' and !empty($this->config->global->closedProjectStatus) and $object->status == 'closed') $changeAllowed = false;
|
||||
$canBeChanged = true;
|
||||
if($objectType == 'product' and empty($this->config->CRProduct) and $object->status == 'closed') $canBeChanged = false;
|
||||
if($objectType == 'project' and empty($this->config->CRProject) and $object->status == 'closed') $canBeChanged = false;
|
||||
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
@@ -105,16 +105,16 @@ class testreport extends control
|
||||
$this->view->position[] = html::a(inlink('browse', "objectID=$objectID&objectType=$objectType&extra=$extra"), $extra ? $task->name : $object->name);
|
||||
$this->view->position[] = $this->lang->testreport->browse;
|
||||
|
||||
$this->view->reports = $reports;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->objectType = $objectType;
|
||||
$this->view->extra = $extra;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted');
|
||||
$this->view->tasks = $tasks;
|
||||
$this->view->projects = $projects;
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
$this->view->reports = $reports;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->objectID = $objectID;
|
||||
$this->view->objectType = $objectType;
|
||||
$this->view->extra = $extra;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->users = $this->user->getPairs('noletter|noclosed|nodeleted');
|
||||
$this->view->tasks = $tasks;
|
||||
$this->view->projects = $projects;
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class='pull-right btn-toolbar'>
|
||||
<?php if($objectType == 'product' and $changeAllowed) common::printLink('testreport', 'create', "objectID=0&objectType=testtask&productID=$objectID", "<i class='icon icon-plus'></i>" . $lang->testreport->create, '', "class='btn btn-primary'");?>
|
||||
<?php if($objectType == 'product' and $canBeChanged) common::printLink('testreport', 'create', "objectID=0&objectType=testtask&productID=$objectID", "<i class='icon icon-plus'></i>" . $lang->testreport->create, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
|
||||
@@ -152,16 +152,16 @@ class testsuite extends control
|
||||
$this->view->position[] = $this->lang->testsuite->common;
|
||||
$this->view->position[] = $this->lang->testsuite->view;
|
||||
|
||||
$this->view->productID = $productID;
|
||||
$this->view->suite = $suite;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
|
||||
$this->view->actions = $this->loadModel('action')->getList('testsuite', $suiteID);
|
||||
$this->view->cases = $this->testsuite->getLinkedCases($suiteID, $sort, $pager);
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->modules = $this->loadModel('tree')->getOptionMenu($suite->product, 'case');
|
||||
$this->view->branches = $this->loadModel('branch')->getPairs($suite->product, 'noempty');
|
||||
$this->view->changeAllowed = common::checkObjectChangeAllowed('testsuite', $suite);
|
||||
$this->view->productID = $productID;
|
||||
$this->view->suite = $suite;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|noletter');
|
||||
$this->view->actions = $this->loadModel('action')->getList('testsuite', $suiteID);
|
||||
$this->view->cases = $this->testsuite->getLinkedCases($suiteID, $sort, $pager);
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->modules = $this->loadModel('tree')->getOptionMenu($suite->product, 'case');
|
||||
$this->view->branches = $this->loadModel('branch')->getPairs($suite->product, 'noempty');
|
||||
$this->view->canBeChanged = common::checkObjectChangeAllowed('testsuite', $suite);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<span class='label label-light label-badge'><?php echo $pager->recTotal;?></span>
|
||||
</a>
|
||||
</div>
|
||||
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
|
||||
<?php if(!empty($this->config->CRProduct) or $product->status != 'closed'):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('testsuite', 'create', "product=$productID", "<i class='icon icon-plus'></i> " . $lang->testsuite->create, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->testsuite->noTestsuite;?></span>
|
||||
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('testsuite', 'create')):?>
|
||||
<?php if((!empty($this->config->CRProduct) or $product->status != 'closed') and common::hasPriv('testsuite', 'create')):?>
|
||||
<?php echo html::a($this->createLink('testsuite', 'create', "product=$productID"), "<i class='icon icon-plus'></i> " . $lang->testsuite->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php
|
||||
if(!$suite->deleted and $changeAllowed)
|
||||
if(!$suite->deleted and $canBeChanged)
|
||||
{
|
||||
echo $this->buildOperateMenu($suite, 'view');
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<div class='panel'>
|
||||
<?php $canBatchEdit = common::hasPriv('testcase', 'batchEdit');?>
|
||||
<?php $canBatchUnlink = common::hasPriv('testsuite', 'batchUnlinkCases');?>
|
||||
<?php $hasCheckbox = ($changeAllowed and $canBatchEdit and $canBatchUnlink);?>
|
||||
<?php $hasCheckbox = ($canBeChanged and $canBatchEdit and $canBatchUnlink);?>
|
||||
<?php $vars = "suiteID=$suite->id&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
|
||||
<table class='table has-sort-head' id='caseList'>
|
||||
<thead>
|
||||
@@ -97,7 +97,7 @@
|
||||
<td><?php echo $case->stepNumber;?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
if(common::hasPriv('testsuite', 'unlinkCase', $suite))
|
||||
{
|
||||
@@ -115,7 +115,7 @@
|
||||
<?php endif;?>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php if($cases and $changeAllowed):?>
|
||||
<?php if($cases and $canBeChanged):?>
|
||||
<?php if($hasCheckbox):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<?php endif;?>
|
||||
|
||||
+30
-30
@@ -402,7 +402,7 @@ class testtask extends control
|
||||
setcookie('preTaskID', $taskID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = common::checkObjectChangeAllowed('testtask', $task);
|
||||
$canBeChanged = common::checkObjectChangeAllowed('testtask', $task);
|
||||
|
||||
if($this->cookie->preTaskID != $taskID)
|
||||
{
|
||||
@@ -460,24 +460,24 @@ class testtask extends control
|
||||
$this->view->position[] = $this->lang->testtask->common;
|
||||
$this->view->position[] = $this->lang->testtask->cases;
|
||||
|
||||
$this->view->productID = $productID;
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->task = $task;
|
||||
$this->view->runs = $runs;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|qafirst');
|
||||
$this->view->assignedToList = $assignedToList;
|
||||
$this->view->moduleTree = $this->loadModel('tree')->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createTestTaskLink'), $extra = $taskID);
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->param = $param;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->taskID = $taskID;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all;
|
||||
$this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden';
|
||||
$this->view->pager = $pager;
|
||||
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
|
||||
$this->view->setModule = false;
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->task = $task;
|
||||
$this->view->runs = $runs;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noclosed|qafirst');
|
||||
$this->view->assignedToList= $assignedToList;
|
||||
$this->view->moduleTree = $this->loadModel('tree')->getTreeMenu($productID, $viewType = 'case', $startModuleID = 0, array('treeModel', 'createTestTaskLink'), $extra = $taskID);
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->param = $param;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->taskID = $taskID;
|
||||
$this->view->moduleID = $moduleID;
|
||||
$this->view->moduleName = $moduleID ? $this->tree->getById($moduleID)->name : $this->lang->tree->all;
|
||||
$this->view->treeClass = $browseType == 'bymodule' ? '' : 'hidden';
|
||||
$this->view->pager = $pager;
|
||||
$this->view->branches = $this->loadModel('branch')->getPairs($productID);
|
||||
$this->view->setModule = false;
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -553,7 +553,7 @@ class testtask extends control
|
||||
$this->testtask->setMenu($this->products, $productID, $task->branch, $taskID);
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = common::checkObjectChangeAllowed('testtask', $task);
|
||||
$canBeChanged = common::checkObjectChangeAllowed('testtask', $task);
|
||||
|
||||
$runs = $this->testtask->getRuns($taskID, 0, $groupBy);
|
||||
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'testcase', false);
|
||||
@@ -589,16 +589,16 @@ class testtask extends control
|
||||
$this->view->position[] = $this->lang->testtask->common;
|
||||
$this->view->position[] = $this->lang->testtask->cases;
|
||||
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->productID = $productID;
|
||||
$this->view->task = $task;
|
||||
$this->view->taskID = $taskID;
|
||||
$this->view->browseType = 'group';
|
||||
$this->view->groupBy = $groupBy;
|
||||
$this->view->groupByList = $groupByList;
|
||||
$this->view->cases = $groupCases;
|
||||
$this->view->account = 'all';
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->productID = $productID;
|
||||
$this->view->task = $task;
|
||||
$this->view->taskID = $taskID;
|
||||
$this->view->browseType = 'group';
|
||||
$this->view->groupBy = $groupBy;
|
||||
$this->view->groupByList = $groupByList;
|
||||
$this->view->cases = $groupCases;
|
||||
$this->view->account = 'all';
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ $status = $this->session->testTaskVersionStatus;
|
||||
<div class='datepicker-wrapper datepicker-date'><?php echo html::input('date', $endTime, "class='form-control form-date' onchange='changeDate(\"$beginTime\", this.value, \"$condition\")'");?></div>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
|
||||
<?php if(!empty($this->config->CRProduct) or $product->status != 'closed'):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('testtask', 'create', "product=$productID", "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
@@ -58,7 +58,7 @@ $status = $this->session->testTaskVersionStatus;
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->testtask->noTesttask;?></span>
|
||||
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('testtask', 'create')):?>
|
||||
<?php if((!empty($this->config->CRProduct) or $product->status != 'closed') and common::hasPriv('testtask', 'create')):?>
|
||||
<?php echo html::a($this->createLink('testtask', 'create', "product=$productID"), "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
<?php echo html::a(inlink('browseUnits', "productID=$productID&browseType=$key&orderBy=$orderBy"), "<span class='text'>$label</span>", '', "id='{$key}Tab' class='btn btn-link'");?>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
|
||||
<?php if(!empty($this->config->CRProduct) or $product->status != 'closed'):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('testtask', 'importUnitResult', "product=$productID", "<i class='icon icon-import'></i> " . $lang->testtask->importUnitResult, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
$canBatchAssign = common::hasPriv('testtask', 'batchAssign');
|
||||
$canBatchRun = common::hasPriv('testtask', 'batchRun');
|
||||
|
||||
$canBatchAction = ($changeAllowed and ($canBatchEdit or $canBatchUnlink or $canBatchAssign or $canBatchRun));
|
||||
$canBatchAction = ($canBeChanged and ($canBatchEdit or $canBatchUnlink or $canBatchAssign or $canBatchRun));
|
||||
|
||||
if($useDatatable) include '../../common/view/datatable.html.php';
|
||||
if(!$useDatatable) include '../../common/view/tablesorter.html.php';
|
||||
@@ -141,7 +141,7 @@
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->testcase->noCase;?></span> <?php if($changeAllowed) common::printLink('testtask', 'linkCase', "taskID={$taskID}", "<i class='icon icon-plus'></i> " . $lang->testtask->linkCase, '', "class='btn btn-info'");?></p>
|
||||
<p><span class="text-muted"><?php echo $lang->testcase->noCase;?></span> <?php if($canBeChanged) common::printLink('testtask', 'linkCase', "taskID={$taskID}", "<i class='icon icon-plus'></i> " . $lang->testtask->linkCase, '', "class='btn btn-info'");?></p>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</form>
|
||||
|
||||
@@ -87,10 +87,10 @@
|
||||
<th><?php echo $lang->testtask->mailto;?></th>
|
||||
<td colspan='2'>
|
||||
<div id='mailtoGroup' class='input-group'>
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, '', "multiple class='form-control chosen'");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
<?php
|
||||
echo html::select('mailto[]', $users, '', "multiple class='form-control chosen'");
|
||||
echo $this->fetch('my', 'buildContactLists');
|
||||
?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
<td><?php echo (common::hasPriv('testtask', 'results') and $run->results) ? html::a($this->createLink('testtask', 'results', "runID={$run->id}&caseID={$run->case}"), $run->results, '', "class='iframe'") : $run->results;?></td>
|
||||
<td><?php echo $run->stepNumber;?></td>
|
||||
<td class='c-actions'>
|
||||
<?php if($changeAllowed):?>
|
||||
<?php if($canBeChanged):?>
|
||||
<?php common::printIcon('testtask', 'runCase', "runID=$run->id&caseID=$run->case&version=$run->caseVersion", '', 'list', 'play', '', 'runCase iframe', false, "data-width='95%'");?>
|
||||
<?php common::printIcon('testcase', 'edit', "caseID=$run->case", '', 'list');?>
|
||||
<?php
|
||||
|
||||
@@ -141,7 +141,7 @@
|
||||
<table class='table table-data'>
|
||||
<tr>
|
||||
<th class='thWidth'><?php echo $lang->todo->beginAndEnd?></th>
|
||||
<td><?php echo $todo->config->begin . " ~ " . $todo->config->end;?></td>
|
||||
<td class='w-160px'><?php echo $todo->config->begin . " ~ " . $todo->config->end;?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th class='thWidth text-top'><?php echo $lang->todo->cycleConfig?></th>
|
||||
|
||||
@@ -45,7 +45,7 @@ class tree extends control
|
||||
$this->view->root = $product;
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = (empty($this->config->global->closedProductStatus) or $product->status != 'closed') ? true : false;
|
||||
$canBeChanged = (!empty($this->config->CRProduct) or $product->status != 'closed') ? true : false;
|
||||
}
|
||||
elseif(strpos($viewType, 'doc') !== false)
|
||||
{
|
||||
@@ -195,7 +195,7 @@ class tree extends control
|
||||
$this->view->parentModules = $parentModules;
|
||||
$this->view->branch = $branch;
|
||||
$this->view->tree = $this->tree->getProductStructure($rootID, $viewType);
|
||||
$this->view->changeAllowed = isset($changeAllowed) ? $changeAllowed : true;
|
||||
$this->view->canBeChanged = isset($canBeChanged) ? $canBeChanged : true;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -219,7 +219,7 @@ class tree extends control
|
||||
$this->view->products = $products;
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = (empty($this->config->global->closedProjectStatus) or $project->status != 'closed') ? true : false;
|
||||
$canBeChanged = (!empty($this->config->CRProject) or $project->status != 'closed') ? true : false;
|
||||
|
||||
/* Set menu. */
|
||||
$this->lang->set('menugroup.tree', 'project');
|
||||
@@ -250,7 +250,7 @@ class tree extends control
|
||||
$this->view->parentModules = $parentModules;
|
||||
$this->view->currentModuleID = $currentModuleID;
|
||||
$this->view->tree = $this->tree->getTaskStructure($rootID, $productID);
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
$this->view->canBeChanged = $canBeChanged;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ li.tree-item-story > .tree-actions .tree-action[data-type=delete]{display:none;}
|
||||
<?php $manageChild = 'manage' . ucfirst($viewType) . 'Child';?>
|
||||
<?php if(strpos($viewType, 'trainskill') === false and strpos($viewType, 'trainpost') === false) echo strpos($viewType, 'doc') !== false ? $lang->doc->manageType : $lang->tree->$manageChild;?>
|
||||
</div>
|
||||
<?php if($viewType == 'story' and $allProduct and $changeAllowed):?>
|
||||
<?php if($viewType == 'story' and $allProduct and $canBeChanged):?>
|
||||
<div class="panel-actions btn-toolbar"><?php echo html::a('javascript:toggleCopy()', $lang->tree->syncFromProduct, '', "class='btn btn-sm btn-primary'")?></div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
@@ -159,7 +159,7 @@ li.tree-item-story > .tree-actions .tree-action[data-type=delete]{display:none;}
|
||||
<td></td>
|
||||
<?php endif;?>
|
||||
<td colspan="2" class="form-actions">
|
||||
<?php if($changeAllowed) echo html::submitButton();?>
|
||||
<?php if($canBeChanged) echo html::submitButton();?>
|
||||
<?php echo html::a($backLink, $lang->goback, '', "class='btn btn-wide'");?>
|
||||
<?php echo html::hidden('parentModuleID', $currentModuleID);?>
|
||||
<?php echo html::hidden('maxOrder', $maxOrder);?>
|
||||
@@ -265,10 +265,10 @@ $(function()
|
||||
}
|
||||
};
|
||||
|
||||
if(<?php echo (common::hasPriv('tree', 'updateorder') and $changeAllowed) ? 'false' : 'true' ?>) options.actions["sort"] = false;
|
||||
if(<?php echo (common::hasPriv('tree', 'edit') and $changeAllowed) ? 'false' : 'true' ?>) options.actions["edit"] = false;
|
||||
if(<?php echo (common::hasPriv('tree', 'delete') and $changeAllowed) ? 'false' : 'true' ?>) options.actions["delete"] = false;
|
||||
if(<?php echo $changeAllowed ? 'false' : 'true' ?>) options.actions["subModules"] = false;
|
||||
if(<?php echo (common::hasPriv('tree', 'updateorder') and $canBeChanged) ? 'false' : 'true' ?>) options.actions["sort"] = false;
|
||||
if(<?php echo (common::hasPriv('tree', 'edit') and $canBeChanged) ? 'false' : 'true' ?>) options.actions["edit"] = false;
|
||||
if(<?php echo (common::hasPriv('tree', 'delete') and $canBeChanged) ? 'false' : 'true' ?>) options.actions["delete"] = false;
|
||||
if(<?php echo $canBeChanged ? 'false' : 'true' ?>) options.actions["subModules"] = false;
|
||||
|
||||
var $tree = $('#modulesTree').tree(options);
|
||||
|
||||
|
||||
@@ -112,7 +112,7 @@ li.story-item > .tree-actions .tree-action[data-type=delete]{display:none;}
|
||||
<td></td>
|
||||
<td colspan='2' class="form-actions">
|
||||
<?php
|
||||
if($changeAllowed) echo html::submitButton();
|
||||
if($canBeChanged) echo html::submitButton();
|
||||
echo html::a($backLink, $lang->goback, '', "class='btn btn-wide'");
|
||||
echo html::hidden('parentModuleID', $currentModuleID);
|
||||
echo html::hidden('maxOrder', $maxOrder);
|
||||
@@ -216,10 +216,10 @@ $(function()
|
||||
}
|
||||
};
|
||||
|
||||
if(<?php echo (common::hasPriv('tree', 'updateorder') and $changeAllowed) ? 'false' : 'true' ?>) options.actions["sort"] = false;
|
||||
if(<?php echo (common::hasPriv('tree', 'edit') and $changeAllowed) ? 'false' : 'true' ?>) options.actions["edit"] = false;
|
||||
if(<?php echo (common::hasPriv('tree', 'delete') and $changeAllowed) ? 'false' : 'true' ?>) options.actions["delete"] = false;
|
||||
if(<?php echo $changeAllowed ? 'false' : 'true' ?>) options.actions["subModules"] = false;
|
||||
if(<?php echo (common::hasPriv('tree', 'updateorder') and $canBeChanged) ? 'false' : 'true' ?>) options.actions["sort"] = false;
|
||||
if(<?php echo (common::hasPriv('tree', 'edit') and $canBeChanged) ? 'false' : 'true' ?>) options.actions["edit"] = false;
|
||||
if(<?php echo (common::hasPriv('tree', 'delete') and $canBeChanged) ? 'false' : 'true' ?>) options.actions["delete"] = false;
|
||||
if(<?php echo $canBeChanged ? 'false' : 'true' ?>) options.actions["subModules"] = false;
|
||||
|
||||
var $tree = $('#modulesTree').tree(options);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user