Merge branch '12.x' of github.com:easysoft/zentaopms into 12.x
This commit is contained in:
@@ -212,6 +212,9 @@ class build extends control
|
||||
$build = $this->build->getById((int)$buildID, true);
|
||||
if(!$build) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = !common::checkParentObjectClosed('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]);
|
||||
|
||||
@@ -269,6 +272,7 @@ class build extends control
|
||||
$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->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ tbody tr td:first-child input{display:none;}
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php
|
||||
if(!$build->deleted)
|
||||
if(!$build->deleted and $changeAllowed)
|
||||
{
|
||||
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(common::hasPriv('build', 'linkStory')):?>
|
||||
<?php if($changeAllowed 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 = common::hasPriv('build', 'batchUnlinkStory');?>
|
||||
<?php $canBatchUnlink = $changeAllowed 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(common::hasPriv('build', 'unlinkStory'))
|
||||
if($changeAllowed 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(common::hasPriv('build', 'linkBug')):?>
|
||||
<?php if($changeAllowed 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 = common::hasPriv('build', 'batchUnlinkBug');?>
|
||||
<?php $canBatchUnlink = $changeAllowed 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(common::hasPriv('build', 'unlinkBug'))
|
||||
if($changeAllowed 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}'");
|
||||
|
||||
+17
-11
@@ -754,7 +754,12 @@ class doc extends control
|
||||
setcookie('docFilesViewType', $viewType, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
$table = $type == 'product' ? TABLE_PRODUCT : TABLE_PROJECT;
|
||||
$object = $this->dao->select('id,name')->from($table)->where('id')->eq($objectID)->fetch();
|
||||
$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;
|
||||
|
||||
/* According the from, set menus. */
|
||||
if($this->from == 'product')
|
||||
@@ -799,17 +804,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->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->display();
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ var browseType = '<?php echo $browseType;?>';
|
||||
<?php echo html::a('javascript:setBrowseType("bygrid")', "<i class='icon icon-cards-view'></i>", '', "title='{$lang->doc->browseTypeList['grid']}' class='btn btn-icon'");?>
|
||||
<?php echo html::a('javascript:setBrowseType("bylist")', "<i class='icon icon-bars'></i>", '', "title='{$lang->doc->browseTypeList['list']}' class='btn btn-icon text-primary'");?>
|
||||
</div>
|
||||
<?php if($libID):?>
|
||||
<?php if($libID and !common::checkParentObjectClosed('doc', $currentLib)):?>
|
||||
<div class="dropdown">
|
||||
<button class="btn" type="button" data-toggle="dropdown"><i class='icon-cog'></i> <span class="caret"></span></button>
|
||||
<ul class='dropdown-menu'>
|
||||
|
||||
@@ -57,12 +57,14 @@
|
||||
<?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(common::checkParentObjectClosed('doc', $object)):?>
|
||||
<?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;?>
|
||||
<?php common::printLink('doc', 'editLib', "libID=$libID", "<i class='icon icon-edit'></i>", '', "title='{$lang->edit}' class='btn btn-link iframe'")?>
|
||||
<?php if(empty($lib->main)) common::printLink('doc', 'deleteLib', "libID=$libID", "<i class='icon icon-trash'></i>", 'hiddenwin', "title='{$lang->delete}' class='btn btn-link'")?>
|
||||
<?php common::printLink('tree', 'browse', "rootID=$libID&type=doc", "<i class='icon icon-cog'></i>", '', "title='{$lang->doc->manageType}' class='btn btn-link'")?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
|
||||
@@ -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')): ?>
|
||||
<?php if(common::hasPriv('file', 'delete') and $changeAllowed): ?>
|
||||
<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>
|
||||
|
||||
@@ -94,6 +94,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
|
||||
<?php if(!common::checkNotCN()):?>
|
||||
<?php if(common::hasPriv('story', 'batchCreate')) echo html::a($this->createLink('story', 'batchCreate', "productID=$productID&branch=$branch&moduleID=$moduleID"), "<i class='icon icon-plus'></i> {$lang->story->batchCreate}", '', "class='btn btn btn-secondary'");?>
|
||||
<?php
|
||||
@@ -141,6 +142,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent" class="main-row fade">
|
||||
|
||||
@@ -24,7 +24,9 @@
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
|
||||
<?php common::printLink('productplan', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->productplan->create}", '', "class='btn btn-primary'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent">
|
||||
@@ -32,7 +34,7 @@
|
||||
<div class="table-empty-tip">
|
||||
<p>
|
||||
<span class="text-muted"><?php echo $lang->productplan->noPlan;?></span>
|
||||
<?php if(common::hasPriv('productplan', 'create')):?>
|
||||
<?php if((empty($this->config->global->closedProductStatus) or $product->status != 'closed') and common::hasPriv('productplan', 'create')):?>
|
||||
<?php echo html::a($this->createLink('productplan', 'create', "productID=$product->id&branch=$branch"), "<i class='icon icon-plus'></i> " . $lang->productplan->create, '', "class='btn btn-info'");?>
|
||||
<?php endif;?>
|
||||
</p>
|
||||
|
||||
@@ -42,9 +42,9 @@
|
||||
{
|
||||
echo $this->buildOperateMenu($plan, 'view');
|
||||
|
||||
if(common::hasPriv('productplan', 'create') and $plan->parent <= '0') echo html::a($this->createLink('productplan', 'create', "product={$plan->product}&branch={$plan->branch}&parent={$plan->id}"), "<i class='icon-treemap-alt'></i> " . $this->lang->productplan->children , '', "class='btn btn-link' title='{$this->lang->productplan->children}'");
|
||||
if(common::hasPriv('productplan', 'edit')) echo html::a($this->createLink('productplan', 'edit', "planID=$plan->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
|
||||
if(common::hasPriv('productplan', 'delete') and $plan->parent >= 0) echo html::a($this->createLink('productplan', 'delete', "planID=$plan->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
|
||||
if(common::hasPriv('productplan', 'create', $plan) and $plan->parent <= '0') echo html::a($this->createLink('productplan', 'create', "product={$plan->product}&branch={$plan->branch}&parent={$plan->id}"), "<i class='icon-treemap-alt'></i> " . $this->lang->productplan->children , '', "class='btn btn-link' title='{$this->lang->productplan->children}'");
|
||||
if(common::hasPriv('productplan', 'edit', $plan)) echo html::a($this->createLink('productplan', 'edit', "planID=$plan->id"), "<i class='icon-common-edit icon-edit'></i> " . $this->lang->edit, '', "class='btn btn-link' title='{$this->lang->edit}'");
|
||||
if(common::hasPriv('productplan', 'delete', $plan) and $plan->parent >= 0) echo html::a($this->createLink('productplan', 'delete', "planID=$plan->id"), "<i class='icon-common-delete icon-trash'></i> " . $this->lang->delete, '', "class='btn btn-link' title='{$this->lang->delete}' target='hiddenwin'");
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -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):?>
|
||||
<?php if(!$plan->deleted and $plan->parent >= 0 and !common::checkParentObjectClosed('plan', $plan)):?>
|
||||
<div class="btn-group">
|
||||
<div class='drop-down dropdown-hover'>
|
||||
<?php
|
||||
@@ -82,7 +82,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php if(common::hasPriv('productplan', 'linkStory') and $plan->parent >= 0) echo html::a("javascript:showLink($plan->id, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-primary'");?>
|
||||
<?php if(common::hasPriv('productplan', 'linkStory', $plan) and $plan->parent >= 0) echo html::a("javascript:showLink($plan->id, \"story\")", '<i class="icon-link"></i> ' . $lang->productplan->linkStory, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
<?php if(common::hasPriv('productplan', 'linkStory')):?>
|
||||
<div class='linkBox cell hidden'></div>
|
||||
@@ -355,7 +355,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<div id='bugs' class='tab-pane <?php if($type == 'bug') echo 'active';?>'>
|
||||
<?php if(common::hasPriv('productplan', 'linkBug')):?>
|
||||
<?php if(common::hasPriv('productplan', 'linkBug', $plan)):?>
|
||||
<div class='actions'>
|
||||
<?php echo html::a("javascript:showLink($plan->id, \"bug\")", '<i class="icon-bug"></i> ' . $lang->productplan->linkBug, '', "class='btn btn-primary'");?>
|
||||
</div>
|
||||
|
||||
@@ -945,6 +945,7 @@ class project extends control
|
||||
$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;
|
||||
@@ -1047,12 +1048,17 @@ class project extends control
|
||||
$project = $this->commonAction($projectID);
|
||||
$projectID = $project->id;
|
||||
|
||||
/* Determines whether an object is editable. */
|
||||
$changeAllowed = true;
|
||||
if(!empty($this->config->global->closedProjectStatus) and $project->status == 'closed') $changeAllowed = 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->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->changeAllowed = $changeAllowed;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -1923,6 +1929,7 @@ class project extends control
|
||||
$this->view->title = $title;
|
||||
$this->view->position = $position;
|
||||
$this->view->allProducts = $allProducts;
|
||||
$this->view->project = $project;
|
||||
$this->view->linkedProducts = $linkedProducts;
|
||||
$this->view->branchGroups = $this->loadModel('branch')->getByProducts(array_keys($allProducts), '', $linkedBranches);
|
||||
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printLink('bug', 'export', "productID=$productID&orderBy=$orderBy&browseType=&projectID=$project->id", "<i class='icon icon-export muted'> </i>" . $lang->bug->export, '', "class='btn btn-link export'");?>
|
||||
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
|
||||
<?php common::printLink('bug', 'create', "productID=$productID&branch=$branchID&extra=projectID=$project->id", "<i class='icon icon-plus'></i> " . $lang->bug->create, '', "class='btn btn-primary'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent">
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
</div>
|
||||
<a class="btn btn-link querybox-toggle" id="bysearchTab"><i class="icon icon-search muted"></i> <?php echo $lang->project->byQuery;?></a>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
|
||||
<?php common::printLink('build', 'create', "project=$project->id", "<i class='icon icon-plus'></i> " . $lang->build->create, '', "class='btn btn-primary'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent">
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
common::printLink('project', 'computeBurn', 'reload=yes', '<i class="icon icon-refresh"></i> ' . $lang->project->computeBurn, 'hiddenwin', "title='{$lang->project->computeBurn}{$lang->project->burn}' class='btn btn-primary' id='computeBurn'");
|
||||
echo '<div class="space"></div>';
|
||||
echo html::a($this->createLink('project', 'burn', "projectID=$projectID&type=$weekend&interval=$interval"), $lang->project->$weekend, '', "class='btn btn-link'");
|
||||
common::printLink('project', 'fixFirst', "project=$project->id", $lang->project->fixFirst, '', "class='btn btn-link iframe' data-width='700'");
|
||||
if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed') common::printLink('project', 'fixFirst', "project=$project->id", $lang->project->fixFirst, '', "class='btn btn-link iframe' data-width='700'");
|
||||
echo $lang->project->howToUpdateBurn;
|
||||
?>
|
||||
<?php if($interval):?>
|
||||
|
||||
@@ -53,6 +53,7 @@
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-import muted"></i> <span class="text"><?php echo $lang->import;?></span> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
@@ -69,6 +70,7 @@
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
$checkObject = new stdclass();
|
||||
$checkObject->project = $projectID;
|
||||
@@ -207,9 +209,11 @@
|
||||
<td class="c-type"><?php echo zget($lang->task->typeList, $task->type);?></td>
|
||||
<td class='c-date <?php if(isset($task->delay)) echo 'delayed';?>'><?php if(substr($task->deadline, 0, 4) > 0) echo $task->deadline;?></td>
|
||||
<td class="c-actions">
|
||||
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
|
||||
<?php common::printIcon('task', 'assignTo', "projectID=$task->project&taskID=$task->id", $task, 'list', '', '', 'iframe', true);?>
|
||||
<?php common::printIcon('task', 'edit', "taskid=$task->id", '', 'list');?>
|
||||
<?php common::printIcon('task', 'delete', "projectID=$task->project&taskid=$task->id", '', 'list', 'trash', 'hiddenwin');?>
|
||||
<?php endif;?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php $i++;?>
|
||||
|
||||
@@ -57,7 +57,7 @@
|
||||
</div>
|
||||
<div class="detail text-center form-actions">
|
||||
<?php echo html::hidden("post", 'post');?>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed') echo html::submitButton();?>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
@@ -46,37 +46,40 @@
|
||||
<?php
|
||||
common::printLink('story', 'export', "productID=$productID&orderBy=id_desc&projectID=$project->id", "<i class='icon icon-export muted'></i> " . $lang->story->export, '', "class='btn btn-link export'");
|
||||
|
||||
$this->lang->story->create = $this->lang->project->createStory;
|
||||
if($productID and !$this->loadModel('story')->checkForceReview())
|
||||
if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed')
|
||||
{
|
||||
echo "<div class='btn-group dropdown-hover'>";
|
||||
echo "<button type='button' class='btn btn-link'>";
|
||||
echo "<i class='icon-plus'></i> {$lang->story->create} <span class='caret'></span>";
|
||||
echo '</button>';
|
||||
echo "<ul class='dropdown-menu pull-right' id='createActionMenu'>";
|
||||
$storyModuleID = (int)$this->cookie->storyModuleParam;
|
||||
if(common::hasPriv('story', 'create')) echo '<li>' . html::a($this->createLink('story', 'create', "productID=$productID&branch=0&moduleID={$storyModuleID}&story=0&project=$project->id"), $lang->story->create) . '</li>';
|
||||
if(common::hasPriv('story', 'batchCreate')) echo '<li>' . html::a($this->createLink('story', 'batchCreate', "productID=$productID&branch=0&moduleID={$storyModuleID}&story=0&project=$project->id"), $lang->story->batchCreate) . '</li>';
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
}
|
||||
$this->lang->story->create = $this->lang->project->createStory;
|
||||
if($productID and !$this->loadModel('story')->checkForceReview())
|
||||
{
|
||||
echo "<div class='btn-group dropdown-hover'>";
|
||||
echo "<button type='button' class='btn btn-link'>";
|
||||
echo "<i class='icon-plus'></i> {$lang->story->create} <span class='caret'></span>";
|
||||
echo '</button>';
|
||||
echo "<ul class='dropdown-menu pull-right' id='createActionMenu'>";
|
||||
$storyModuleID = (int)$this->cookie->storyModuleParam;
|
||||
if(common::hasPriv('story', 'create')) echo '<li>' . html::a($this->createLink('story', 'create', "productID=$productID&branch=0&moduleID={$storyModuleID}&story=0&project=$project->id"), $lang->story->create) . '</li>';
|
||||
if(common::hasPriv('story', 'batchCreate')) echo '<li>' . html::a($this->createLink('story', 'batchCreate', "productID=$productID&branch=0&moduleID={$storyModuleID}&story=0&project=$project->id"), $lang->story->batchCreate) . '</li>';
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
$wizardParams = helper::safe64Encode("project=$project->id");
|
||||
echo html::a($this->createLink('tutorial', 'wizard', "module=project&method=linkStory¶ms=$wizardParams"), "<i class='icon-link'></i> {$lang->project->linkStory}",'', "class='btn btn-link link-story-btn'");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<div class='btn-group dropdown-hover'>";
|
||||
echo "<button type='button' class='btn btn-primary' id='linkButton'>";
|
||||
echo "<i class='icon-link'></i> {$lang->project->linkStory} <span class='caret'></span>";
|
||||
echo '</button>';
|
||||
echo "<ul class='dropdown-menu pull-right' id='linkActionMenu'>";
|
||||
if(common::hasPriv('project', 'linkStory')) echo '<li>' . html::a(inlink('linkStory', "project=$project->id"), $lang->project->linkStory). "</li>";
|
||||
if(common::hasPriv('project', 'importPlanStories')) echo '<li>' . html::a('#linkStoryByPlan', $lang->project->linkStoryByPlan, '', 'data-toggle="modal"') . "</li>";
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
$wizardParams = helper::safe64Encode("project=$project->id");
|
||||
echo html::a($this->createLink('tutorial', 'wizard', "module=project&method=linkStory¶ms=$wizardParams"), "<i class='icon-link'></i> {$lang->project->linkStory}",'', "class='btn btn-link link-story-btn'");
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "<div class='btn-group dropdown-hover'>";
|
||||
echo "<button type='button' class='btn btn-primary' id='linkButton'>";
|
||||
echo "<i class='icon-link'></i> {$lang->project->linkStory} <span class='caret'></span>";
|
||||
echo '</button>';
|
||||
echo "<ul class='dropdown-menu pull-right' id='linkActionMenu'>";
|
||||
if(common::hasPriv('project', 'linkStory')) echo '<li>' . html::a(inlink('linkStory', "project=$project->id"), $lang->project->linkStory). "</li>";
|
||||
if(common::hasPriv('project', 'importPlanStories')) echo '<li>' . html::a('#linkStoryByPlan', $lang->project->linkStoryByPlan, '', 'data-toggle="modal"') . "</li>";
|
||||
echo '</ul>';
|
||||
echo '</div>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
@@ -118,6 +118,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
|
||||
<div class="btn-group dropdown-hover">
|
||||
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-import muted"></i> <span class="text"><?php echo $lang->import;?></span> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu pull-right" id='importActionMenu'>
|
||||
@@ -134,6 +135,7 @@ js::set('foldAll', $lang->project->treeLevel['root']);
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
$checkObject = new stdclass();
|
||||
$checkObject->project = $projectID;
|
||||
|
||||
@@ -18,14 +18,17 @@
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php
|
||||
if(commonModel::isTutorialMode())
|
||||
if($changeAllowed)
|
||||
{
|
||||
$wizardParams = helper::safe64Encode("projectID=$project->id");
|
||||
echo html::a($this->createLink('tutorial', 'wizard', "module=project&method=manageMembers¶ms=$wizardParams"), "<i class='icon icon-persons'></i> " . $lang->project->manageMembers, '', "class='btn btn-primary manage-team-btn'");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!empty($app->user->admin) or empty($app->user->rights['rights']['my']['limited'])) common::printLink('project', 'manageMembers', "projectID=$project->id", "<i class='icon icon-persons'></i> " . $lang->project->manageMembers, '', "class='btn btn-primary manage-team-btn'");
|
||||
if(commonModel::isTutorialMode())
|
||||
{
|
||||
$wizardParams = helper::safe64Encode("projectID=$project->id");
|
||||
echo html::a($this->createLink('tutorial', 'wizard', "module=project&method=manageMembers¶ms=$wizardParams"), "<i class='icon icon-persons'></i> " . $lang->project->manageMembers, '', "class='btn btn-primary manage-team-btn'");
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!empty($app->user->admin) or empty($app->user->rights['rights']['my']['limited'])) common::printLink('project', 'manageMembers', "projectID=$project->id", "<i class='icon icon-persons'></i> " . $lang->project->manageMembers, '', "class='btn btn-primary manage-team-btn'");
|
||||
}
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
@@ -52,7 +55,9 @@
|
||||
<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):?>
|
||||
<th class='c-actions-1 w-80px text-center'><?php echo $lang->actions;?></th>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@@ -72,6 +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):?>
|
||||
<td class='c-actions text-center'>
|
||||
<?php
|
||||
if (common::hasPriv('project', 'unlinkMember', $member))
|
||||
@@ -81,6 +87,7 @@
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
|
||||
@@ -29,7 +29,9 @@
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php common::printIcon('testreport', 'browse', "objectID=$projectID&objectType=project", '', 'button','flag muted');?>
|
||||
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
|
||||
<?php common::printLink('testtask', 'create', "product=0&project=$projectID", "<i class='icon icon-plus'></i> " . $lang->testtask->create, '', "class='btn btn-primary'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent">
|
||||
|
||||
@@ -32,6 +32,7 @@
|
||||
$link = common::hasPriv('task', 'report', $project) ? $this->createLink('task', 'report', "project=$projectID&browseType=$browseType") : '#';
|
||||
echo html::a($link, "<i class='icon icon-bar-chart muted'></i> <span class='text'>{$lang->task->reportChart}</span>", '', 'class="btn btn-link"');
|
||||
?>
|
||||
<?php if(empty($this->config->global->closedProjectStatus) or $project->status != 'closed'):?>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-link" data-toggle="dropdown"><i class="icon icon-import muted"></i> <span class="text"><?php echo $lang->import ?></span> <span class="caret"></span></button>
|
||||
<ul class="dropdown-menu">
|
||||
@@ -46,6 +47,7 @@
|
||||
?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php
|
||||
$misc = "class='btn btn-link iframe" . (common::hasPriv('task', 'export', $project) ? '' : ' disabled') . "' data-width='700'";
|
||||
$link = common::hasPriv('task', 'export') ? $this->createLink('task', 'export', "project=$projectID&orderBy=$orderBy&type=tree") : '#';
|
||||
|
||||
@@ -22,7 +22,9 @@
|
||||
?>
|
||||
</div>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'):?>
|
||||
<?php common::printLink('release', 'create', "productID=$product->id&branch=$branch", "<i class='icon icon-plus'></i> {$lang->release->create}", '', "class='btn btn-primary'");?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="mainContent" class='main-table'>
|
||||
|
||||
@@ -31,7 +31,9 @@
|
||||
</div>
|
||||
<div class='btn-toolbar pull-right'>
|
||||
<?php
|
||||
if(!$release->deleted)
|
||||
$isClosedProduct = common::checkParentObjectClosed('release', $release);
|
||||
|
||||
if(!$release->deleted and !$isClosedProduct)
|
||||
{
|
||||
echo $this->buildOperateMenu($release, 'view');
|
||||
|
||||
@@ -64,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')):?>
|
||||
<?php if(common::hasPriv('release', 'linkStory') and !$isClosedProduct):?>
|
||||
<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;?>
|
||||
@@ -78,7 +80,7 @@
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='c-id text-left'>
|
||||
<?php if($canBatchUnlink or $canBatchClose):?>
|
||||
<?php if(($canBatchUnlink or $canBatchClose) and !$isClosedProduct):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
@@ -99,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):?>
|
||||
<?php if(($canBatchUnlink or $canBatchClose) and !$isClosedProduct):?>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='storyIdList[]' value='<?php echo $story->id;?>'/>
|
||||
<label></label>
|
||||
@@ -122,7 +124,7 @@
|
||||
<td><?php echo $lang->story->stageList[$story->stage];?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('release', 'unlinkStory'))
|
||||
if(common::hasPriv('release', 'unlinkStory') and !$isClosedProduct)
|
||||
{
|
||||
$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}'");
|
||||
@@ -134,7 +136,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php if($countStories and ($canBatchUnlink or $canBatchClose)):?>
|
||||
<?php if($countStories and ($canBatchUnlink or $canBatchClose) and !$isClosedProduct):?>
|
||||
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
|
||||
<div class="table-actions btn-toolbar">
|
||||
<?php
|
||||
@@ -162,7 +164,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class='tab-pane <?php if($type == 'bug') echo 'active'?>' id='bugs'>
|
||||
<?php if(common::hasPriv('release', 'linkBug')):?>
|
||||
<?php if(common::hasPriv('release', 'linkBug') and !$isClosedProduct):?>
|
||||
<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;?>
|
||||
@@ -173,7 +175,7 @@
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='c-id text-left'>
|
||||
<?php if($canBatchUnlink):?>
|
||||
<?php if($canBatchUnlink and !$isClosedProduct):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
@@ -194,7 +196,7 @@
|
||||
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
|
||||
<tr>
|
||||
<td class='c-id text-left'>
|
||||
<?php if($canBatchUnlink):?>
|
||||
<?php if($canBatchUnlink and !$isClosedProduct):?>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
|
||||
<label></label>
|
||||
@@ -212,7 +214,7 @@
|
||||
<td><?php echo substr($bug->resolvedDate, 5, 11)?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('release', 'unlinkBug'))
|
||||
if(common::hasPriv('release', 'unlinkBug') and !$isClosedProduct)
|
||||
{
|
||||
$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}'");
|
||||
@@ -224,7 +226,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php if($countBugs and $canBatchUnlink):?>
|
||||
<?php if($countBugs and $canBatchUnlink and !$isClosedProduct):?>
|
||||
<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');?>
|
||||
@@ -240,7 +242,7 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class='tab-pane <?php if($type == 'leftBug') echo 'active'?>' id='leftBugs'>
|
||||
<?php if(common::hasPriv('release', 'linkBug')):?>
|
||||
<?php if(common::hasPriv('release', 'linkBug') and !$isClosedProduct):?>
|
||||
<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;?>
|
||||
@@ -251,7 +253,7 @@
|
||||
<thead>
|
||||
<tr class='text-center'>
|
||||
<th class='c-id text-left'>
|
||||
<?php if($canBatchUnlink):?>
|
||||
<?php if($canBatchUnlink and !$isClosedProduct):?>
|
||||
<div class="checkbox-primary check-all" title="<?php echo $lang->selectAll?>">
|
||||
<label></label>
|
||||
</div>
|
||||
@@ -282,7 +284,7 @@
|
||||
<?php $bugLink = $this->createLink('bug', 'view', "bugID=$bug->id", '', true);?>
|
||||
<tr>
|
||||
<td class='c-id text-left'>
|
||||
<?php if($canBatchUnlink):?>
|
||||
<?php if($canBatchUnlink and !$isClosedProduct):?>
|
||||
<div class="checkbox-primary">
|
||||
<input type='checkbox' name='unlinkBugs[]' value='<?php echo $bug->id;?>'/>
|
||||
<label></label>
|
||||
@@ -303,7 +305,7 @@
|
||||
<td><?php echo $bug->openedDate?></td>
|
||||
<td class='c-actions'>
|
||||
<?php
|
||||
if(common::hasPriv('release', 'unlinkBug'))
|
||||
if(common::hasPriv('release', 'unlinkBug') and !$isClosedProduct)
|
||||
{
|
||||
$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}'");
|
||||
@@ -315,7 +317,7 @@
|
||||
</tbody>
|
||||
</table>
|
||||
<div class='table-footer'>
|
||||
<?php if($countLeftBugs and $canBatchUnlink):?>
|
||||
<?php if($countLeftBugs and $canBatchUnlink and !$isClosedProduct):?>
|
||||
<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');?>
|
||||
|
||||
@@ -726,7 +726,7 @@ class story extends control
|
||||
if(!$story) die(js::error($this->lang->notFound) . js::locate('back'));
|
||||
|
||||
$story->files = $this->loadModel('file')->getByObject('story', $storyID);
|
||||
$product = $this->dao->findById($story->product)->from(TABLE_PRODUCT)->fields('name, id, type')->fetch();
|
||||
$product = $this->dao->findById($story->product)->from(TABLE_PRODUCT)->fields('name, id, type, status')->fetch();
|
||||
$plan = $this->dao->findById($story->plan)->from(TABLE_PRODUCTPLAN)->fetch('title');
|
||||
$bugs = $this->dao->select('id,title')->from(TABLE_BUG)->where('story')->eq($storyID)->andWhere('deleted')->eq(0)->fetchAll();
|
||||
$fromBug = $this->dao->select('id,title')->from(TABLE_BUG)->where('toStory')->eq($storyID)->fetch();
|
||||
|
||||
@@ -47,7 +47,9 @@
|
||||
</div>
|
||||
<?php if(!isonlybody()):?>
|
||||
<div class="btn-toolbar pull-right">
|
||||
<?php if(empty($this->config->global->closedProductStatus) or $product->status != 'closed'): ?>
|
||||
<?php common::printLink('story', 'create', "productID={$story->product}&branch={$story->branch}&moduleID={$story->module}", "<i class='icon icon-plus'></i>" . $lang->story->create, '', "class='btn btn-primary'"); ?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
@@ -136,7 +138,7 @@
|
||||
common::printIcon('story', 'close', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true);
|
||||
common::printIcon('story', 'activate', "storyID=$story->id", $story, 'button', '', '', 'iframe showinonlybody', true);
|
||||
|
||||
if($config->global->flow != 'onlyStory' and $story->parent >= 0 and $story->type != 'requirement' and (common::hasPriv('testcase', 'create') or common::hasPriv('testcase', 'batchCreate')))
|
||||
if($config->global->flow != 'onlyStory' and $story->parent >= 0 and $story->type != 'requirement' and (common::hasPriv('testcase', 'create', $story) or common::hasPriv('testcase', 'batchCreate', $story)))
|
||||
{
|
||||
$this->app->loadLang('testcase');
|
||||
echo "<div class='btn-group dropup'>";
|
||||
|
||||
Reference in New Issue
Block a user