Merge branch '15.0.beta3' of https://gitlab.zcorp.cc/easycorp/zentaopms into 15.0.beta3

This commit is contained in:
wangyidong
2021-04-02 16:46:08 +08:00
13 changed files with 72 additions and 44 deletions
+1 -1
View File
@@ -47,7 +47,7 @@ $maxConsumed = 0;
</div>
<style>
.block-projectteam .panel-body {margin-top: -10px}
.chart-titles {top: 30px; width: 110px; padding-right: 10px; position: relative; z-index: 1}
.chart-titles {top: 30px; width: 150px; padding-right: 10px; position: relative; z-index: 1}
.chart-rows {position: relative; z-index: 0}
.chart-title {width: 100px; line-height: 20px; padding: 5px 0; height: 30px}
.chart-title > span {background: #fff}
@@ -40,7 +40,7 @@
<div class='col'>
<div class='panel-content'>
<div class='panel-heading not-move-handler'>
<?php if($config->systemMode == 'new'):?>
<?php if(isset($config->maxVersion)):?>
<?php if($project->model === 'waterfall'): ?>
<span class='project-type-label label label-warning label-outline'><?php echo $lang->project->waterfall; ?></span>
<?php else: ?>
+3 -2
View File
@@ -215,8 +215,9 @@ class build extends control
->beginIF($type == 'story')->orderBy($orderBy)->fi()
->page($storyPager)
->fetchAll('id');
$stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in($build->stories)->andWhere('branch')->eq($build->branch)->fetchPairs('story', 'stage');
foreach($stages as $storyID => $stage)$stories[$storyID]->stage = $stage;
$stages = $this->dao->select('*')->from(TABLE_STORYSTAGE)->where('story')->in($build->stories)->andWhere('branch')->eq($build->branch)->fetchPairs('story', 'stage');
foreach($stages as $storyID => $stage) $stories[$storyID]->stage = $stage;
/* Set menu. */
if($this->app->openApp == 'project')
+1 -2
View File
@@ -920,8 +920,7 @@ class doc extends control
$actionURL = $this->createLink('doc', 'browse', "lib=0&browseType=bySearch&queryID=myQueryID");
$this->doc->buildSearchForm(0, array(), 0, $actionURL, 'objectLibs');
$this->lang->TRActions = common::hasPriv('doc', 'createLib') ? html::a(helper::createLink('doc', 'createLib', "type=$type&objectID=$objectID"), "<i class='icon icon-plus'></i> " . $this->lang->doc->createLib, '', "class='btn btn-secondary iframe' data-width='70%'") : '';
$this->lang->TRActions .= common::hasPriv('doc', 'create') ? $this->doc->buildCreateButton4Doc($type, $objectID, $libID) : '';
$this->lang->TRActions = common::hasPriv('doc', 'create') ? $this->doc->buildCreateButton4Doc($type, $objectID, $libID) : '';
$moduleTree = $this->doc->getTreeMenu($type, $objectID, $libID, 0, $docID);
+7
View File
@@ -8,3 +8,10 @@
.main-col .block-files .panel-heading .panel-title {height: 35px; line-height: 30px;}
.side-col .action a {margin: 0 auto 3px; display: block; max-width: 200px;}
.side-col .tips {padding: 0 10px;}
.main-col .detail-title {display: flex;}
.main-col .detail-title .title {margin-right: 10px;}
.main-col .detail-title .info {flex: 1 1 0;}
.main-col .detail-title .actions i {font-size: 15px; color: #8c8c8c; margin-left: 2px;}
#sidebar {width: 250px;}
#sidebar>.cell {width: 220px;}
#sidebar>.sidebar-toggle {left: 5px; right: auto;}
+8 -2
View File
@@ -1683,6 +1683,12 @@ class docModel extends model
$html .= "<li>";
$html .= html::a(helper::createLink('doc', 'create', "type=$type&objectID=$objectID&libID=$libID&moduleID=0&type=$typeKey"), $typeName, '', "class='$class' data-app='{$this->app->openApp}'");
$html .= "</li>";
}
if(common::hasPriv('doc', 'createLib'))
{
$html .= '<li class="divider"></li>';
$html .= '<li>' . html::a(helper::createLink('doc', 'createLib', "type=$type&objectID=$objectID"), $this->lang->doc->createLib, '', "class='iframe' data-width='70%'") . '</li>';
}
$html .= "</ul></div>";
@@ -1928,7 +1934,7 @@ EOF;
foreach($moduleDocs[0] as $doc)
{
if(!$docID) $docID = $doc->id;
$treeMenu[0] .= '<li>' . html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$rootID&docID={$doc->id}"), $doc->title) . '</li>';
$treeMenu[0] .= '<li' . ($doc->id == $docID ? ' class="active"' : '') . '>' . html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$rootID&docID={$doc->id}"), $doc->title) . '</li>';
}
}
@@ -1960,7 +1966,7 @@ EOF;
foreach($moduleDocs[$module->id] as $doc)
{
if(!$docID) $docID = $doc->id;
$treeMenu[$module->id] .= '<li>' . html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$libID&docID={$doc->id}"), $doc->title) . '</li>';
$treeMenu[$module->id] .= '<li' . ($doc->id == $docID ? ' class="active"' : '') . '>' . html::a(inlink('objectLibs', "type=$type&objectID=$objectID&libID=$libID&docID={$doc->id}"), $doc->title) . '</li>';
}
}
+21 -3
View File
@@ -1,9 +1,27 @@
<?php js::set('confirmDelete', $lang->doc->confirmDelete);?>
<div id="mainContent" class="main-row">
<div class="main-col col-8">
<div class="cell">
<div class="detail no-padding">
<div class="detail-title no-margin no-padding">
<?php echo $doc->title;?>
<div class="title"><?php echo $doc->title;?></div>
<div class="info">
<div class="version"></div>
<div class="user"></div>
<div class="time"></div>
</div>
<div class="actions">
<?php
if(common::hasPriv('doc', 'edit')) echo html::a(inlink('edit', "docID=$doc->id"), '<i class="icon-edit"></i>', '', "title='{$lang->doc->edit}'");
if(common::hasPriv('doc', 'delete'))
{
$deleteURL = $this->createLink('doc', 'delete', "docID=$doc->id&confirm=yes");
echo html::a("javascript:ajaxDelete(\"$deleteURL\", \"docList\", confirmDelete)", '<i class="icon-trash"></i>', '', "title='{$lang->doc->delete}'");
}
?>
<?php $star = strpos($doc->collector, ',' . $this->app->user->account . ',') !== false ? 'icon-star text-yellow' : 'icon-star-empty';?>
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $lang->doc->collect;?>" class='ajaxCollect'><i class='icon <?php echo $star;?>'></i></a>
</div>
</div>
<div class="detail-content article-content no-margin no-padding">
<?php
@@ -40,7 +58,6 @@
echo $doc->content ? $doc->content : '空';
}
?>
<?php foreach($doc->files as $file):?>
<?php if(in_array($file->extension, $config->file->imageExtensions)):?>
<div class='file-image'>
@@ -67,7 +84,8 @@
<?php include '../../common/view/action.html.php';?>
</div>
</div>
<div class="side-col col-4">
<div class="side-col col-4" id="sidebar">
<div class="sidebar-toggle"><i class="icon icon-angle-right"></i></div>
<?php if(!empty($doc->digest)):?>
<div class="cell">
<details class="detail" open>
+17 -14
View File
@@ -676,7 +676,9 @@ class execution extends control
$this->loadModel('user');
$this->app->loadLang('testcase');
$type = strtolower($type);
$type = strtolower($type);
$param = $param;
$productID = 0;
setcookie('storyPreExecutionID', $executionID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
if($this->cookie->storyPreExecutionID != $executionID)
{
@@ -687,20 +689,21 @@ class execution extends control
}
if($type == 'bymodule')
{
$_COOKIE['storyModuleParam'] = (int)$param;
$_COOKIE['storyModuleParam'] = $param;
$_COOKIE['storyProductParam'] = 0;
$_COOKIE['storyBranchParam'] = 0;
setcookie('storyModuleParam', (int)$param, 0, $this->config->webRoot, '', false, true);
setcookie('storyModuleParam', $param, 0, $this->config->webRoot, '', false, true);
setcookie('storyProductParam', 0, 0, $this->config->webRoot, '', false, true);
setcookie('storyBranchParam', 0, 0, $this->config->webRoot, '', false, true);
}
elseif($type == 'byproduct')
{
$productID = $param;
$_COOKIE['storyModuleParam'] = 0;
$_COOKIE['storyProductParam'] = (int)$param;
$_COOKIE['storyProductParam'] = $param;
$_COOKIE['storyBranchParam'] = 0;
setcookie('storyModuleParam', 0, 0, $this->config->webRoot, '', false, true);
setcookie('storyProductParam', (int)$param, 0, $this->config->webRoot, '', false, true);
setcookie('storyProductParam', $param, 0, $this->config->webRoot, '', false, true);
setcookie('storyBranchParam', 0, 0, $this->config->webRoot, '', false, true);
}
elseif($type == 'bybranch')
@@ -727,7 +730,7 @@ class execution extends control
/* Append id for secend sort. */
$sort = $this->loadModel('common')->appendOrder($orderBy);
$queryID = ($type == 'bysearch') ? (int)$param : 0;
$queryID = ($type == 'bysearch') ? $param : 0;
$execution = $this->commonAction($executionID);
$executionID = $execution->id;
@@ -738,10 +741,10 @@ class execution extends control
$stories = $this->story->getExecutionStories($executionID, 0, 0, $sort, $type, $param, 'story', '', $pager);
$this->loadModel('common')->saveQueryCondition($this->dao->get(), 'story', false);
$users = $this->user->getPairs('noletter');
$users = $this->user->getPairs('noletter');
/* Build the search form. */
$modules = array();
$modules = array();
$executionModules = $this->loadModel('tree')->getTaskTreeModules($executionID, true);
$products = $this->execution->getProducts($executionID);
foreach($products as $product)
@@ -772,23 +775,23 @@ class execution extends control
$allPlans = array('' => '');
if(!empty($plans))
{
foreach($plans as $productID => $plan) $allPlans += $plan;
foreach($plans as $plan) $allPlans += $plan;
}
if($this->cookie->storyModuleParam) $this->view->module = $this->loadModel('tree')->getById($this->cookie->storyModuleParam);
if($this->cookie->storyProductParam) $this->view->product = $this->loadModel('product')->getById($this->cookie->storyProductParam);
if($this->cookie->storyBranchParam)
{
$productID = 0;
$branchID = $this->cookie->storyBranchParam;
$branchID = $this->cookie->storyBranchParam;
if(strpos($branchID, ',') !== false) list($productID, $branchID) = explode(',', $branchID);
$this->view->branch = $this->loadModel('branch')->getById($branchID, $productID);
}
/* Get execution's product. */
$productID = 0;
$productPairs = $this->loadModel('product')->getProductPairsByProject($executionID);
if($productPairs) $productID = key($productPairs);
if(empty($productID)) $productID = key($productPairs);
$modulePairs = $this->tree->getModulePairs($type == 'byproduct' ? $param : 0, 'story', true);
/* Assign. */
$this->view->title = $title;
@@ -802,7 +805,7 @@ class execution extends control
$this->view->type = $this->session->executionStoryBrowseType;
$this->view->param = $param;
$this->view->moduleTree = $this->loadModel('tree')->getProjectStoryTreeMenu($executionID, $startModuleID = 0, array('treeModel', 'createStoryLink'));
$this->view->modulePairs = $this->tree->getModulePairs($productID, 'story', true);
$this->view->modulePairs = $modulePairs;
$this->view->tabID = 'story';
$this->view->storyTasks = $storyTasks;
$this->view->storyBugs = $storyBugs;
+8 -9
View File
@@ -52,7 +52,7 @@
</div>
<div class="btn-toolbar pull-right">
<?php
common::printLink('story', 'export', "productID=$productID&orderBy=id_desc&executionID=$execution->id", "<i class='icon icon-export muted'></i> " . $lang->story->export, '', "class='btn btn-link export' data-app='execution'");
common::printLink('story', 'export', "productID=$productID&orderBy=id_desc&executionID=$execution->id", "<i class='icon icon-export muted'></i> " . $lang->story->export, '', "class='btn btn-link export iframe' data-app='execution'");
if(common::canModify('execution', $execution))
{
@@ -120,14 +120,13 @@
<thead>
<tr>
<?php
$totalEstimate = 0;
$canBatchEdit = common::hasPriv('story', 'batchEdit');
$canBatchClose = common::hasPriv('story', 'batchClose');
$canBatchChangeStage = common::hasPriv('story', 'batchChangeStage');
$canBatchUnlink = common::hasPriv('execution', 'batchUnlinkStory');
$canBatchToTask = common::hasPriv('story', 'batchToTask');
$canBatchAction = ($canBeChanged and ($canBatchEdit or $canBatchClose or $canBatchChangeStage or $canBatchUnlink or $canBatchToTask));
$totalEstimate = 0;
$canBatchEdit = common::hasPriv('story', 'batchEdit');
$canBatchClose = common::hasPriv('story', 'batchClose');
$canBatchChangeStage = common::hasPriv('story', 'batchChangeStage');
$canBatchUnlink = common::hasPriv('execution', 'batchUnlinkStory');
$canBatchToTask = common::hasPriv('story', 'batchToTask');
$canBatchAction = ($canBeChanged and ($canBatchEdit or $canBatchClose or $canBatchChangeStage or $canBatchUnlink or $canBatchToTask));
?>
<?php $vars = "executionID={$execution->id}&orderBy=%s&type=$type&param=$param&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}"; ?>
<th class='c-id {sorter:false}'>
+1 -1
View File
@@ -173,5 +173,5 @@
</form>
<?php endif;?>
</div>
<?php js::set('listName', 'todoList')?>
<?php js::set('listName', 'todoList');?>
<?php include '../../common/view/footer.html.php';?>
+1 -1
View File
@@ -143,7 +143,7 @@ $projectIDParam = $isProjectStory ? "projectID=$projectID&" : '';
<div class='btn-group dropdown'>
<?php $buttonType = $from == 'project' ? 'btn-secondary' : 'btn-primary';?>
<?php $extraParam = $from == 'project' ? '' : "&bugID=0&planID=0&todoID=0&extra=&type=$storyType";?>
<?php echo html::a($this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID=0$extraParam"), "<i class='icon icon-plus'></i> {$lang->story->create}", '', "class='btn $buttonType' data-app='$openApp'");?>
<?php echo html::a($this->createLink('story', 'create', "product=$productID&branch=$branch&moduleID=$moduleID&storyID=0&projectID={$this->session->project}$extraParam"), "<i class='icon icon-plus'></i> {$lang->story->create}", '', "class='btn $buttonType' data-app='$openApp'");?>
<?php if(!empty($productID)): ?>
<button type='button' class="btn <?php echo $buttonType?> dropdown-toggle" data-toggle='dropdown'><span class='caret'></span></button>
<ul class='dropdown-menu pull-right'>
+2 -7
View File
@@ -196,9 +196,6 @@ class story extends control
$moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch);
if(empty($moduleOptionMenu)) die(js::locate(helper::createLink('tree', 'browse', "productID=$productID&view=story")));
/* Set menu. */
$this->product->setMenu($product->id, $branch);
/* Init vars. */
$source = '';
$sourceNote = '';
@@ -864,6 +861,8 @@ class story extends control
/* Set the menu. */
$from = $this->app->openApp;
$this->product->setMenu($story->product, $story->branch);
if($from == 'execution')
{
$this->execution->setMenu($param);
@@ -872,10 +871,6 @@ class story extends control
{
$this->loadModel('project')->setMenu($param);
}
elseif($from == 'product')
{
$this->product->setMenu($story->product, $story->branch);
}
elseif($from == 'qa')
{
$products = $this->product->getProductPairsByProject(0, 'noclosed');
+1 -1
View File
@@ -5,7 +5,7 @@ $(function()
if(typeof(rawModule) == 'undefined') rawModule = 'product';
if(typeof(app) == 'undefined') app = '';
if(typeof(execution) != 'undefined') rawModule = 'projectstory';
if(['project', 'projectstory'].indexOf(rawModule) === -1)
if(['project', 'projectstory'].indexOf(rawModule) === -1 && app != 'qa')
{
$('#navbar .nav li').removeClass('active');
$("#navbar .nav li[data-id=" + storyType + ']').addClass('active');