Merge branch '12.x' of https://github.com/easysoft/zentaopms into 12.x
This commit is contained in:
@@ -2507,16 +2507,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 +2730,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);
|
||||
|
||||
@@ -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->global->closedProductStatus) 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;?>
|
||||
|
||||
+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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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}'");
|
||||
|
||||
+22
-22
@@ -755,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->global->closedProductStatus) and $object->status == 'closed') $canBeChanged = false;
|
||||
if($type == 'project' and !empty($this->config->global->closedProjectStatus) and $object->status == 'closed') $canBeChanged = false;
|
||||
|
||||
/* According the from, set menus. */
|
||||
if($this->from == 'product')
|
||||
@@ -802,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();
|
||||
}
|
||||
@@ -855,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->global->closedProductStatus) and $object->status == 'closed') $canBeChanged = false;
|
||||
if($type == 'project' and !empty($this->config->global->closedProjectStatus) and $object->status == 'closed') $canBeChanged = false;
|
||||
|
||||
if($from == 'product')
|
||||
{
|
||||
@@ -895,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();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -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->global->closedProductStatus) 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);
|
||||
?>
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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}'");
|
||||
|
||||
+93
-93
@@ -129,8 +129,8 @@ class project extends control
|
||||
setcookie('preProjectID', $projectID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
/* 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;
|
||||
|
||||
if($this->cookie->preProjectID != $projectID)
|
||||
{
|
||||
@@ -201,27 +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->changeAllowed = $changeAllowed;
|
||||
$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();
|
||||
}
|
||||
@@ -702,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);
|
||||
@@ -765,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();
|
||||
}
|
||||
@@ -944,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);
|
||||
@@ -956,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();
|
||||
}
|
||||
@@ -1064,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();
|
||||
}
|
||||
@@ -1592,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();
|
||||
@@ -1619,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();
|
||||
}
|
||||
@@ -1663,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();
|
||||
@@ -1682,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();
|
||||
}
|
||||
@@ -1856,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();
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -121,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}'>
|
||||
@@ -199,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}";
|
||||
|
||||
@@ -220,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>
|
||||
|
||||
@@ -139,16 +139,16 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
<?php if(!common::checkNotCN()):?>
|
||||
<?php
|
||||
$link = $this->createLink('task', 'batchCreate', "project=$projectID" . (isset($moduleID) ? "&storyID=&moduleID=$moduleID" : ''));
|
||||
if($changeAllowed and common::hasPriv('task', 'batchCreate')) 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($changeAllowed and common::hasPriv('task', 'create')) 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($changeAllowed 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'");
|
||||
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'";?>
|
||||
@@ -180,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($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=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>
|
||||
|
||||
@@ -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'));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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 = '编号';
|
||||
|
||||
@@ -3028,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');
|
||||
@@ -3225,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');
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -1411,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');
|
||||
@@ -1452,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
|
||||
@@ -1549,7 +1549,7 @@ class testcaseModel extends model
|
||||
echo $case->stepNumber;
|
||||
break;
|
||||
case 'actions':
|
||||
if($changeAllowed)
|
||||
if($canBeChanged)
|
||||
{
|
||||
if($case->needconfirm or $browseType == 'needconfirm')
|
||||
{
|
||||
|
||||
@@ -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->global->closedProductStatus) and $object->status == 'closed') $canBeChanged = false;
|
||||
if($objectType == 'project' and !empty($this->config->global->closedProjectStatus) 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();
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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->global->closedProductStatus) 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->global->closedProjectStatus) 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