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

This commit is contained in:
holan20180123
2021-04-02 16:55:18 +08:00
13 changed files with 53 additions and 31 deletions
@@ -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: ?>
+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>
+10 -8
View File
@@ -676,8 +676,9 @@ class execution extends control
$this->loadModel('user');
$this->app->loadLang('testcase');
$type = strtolower($type);
$param = (int)$param;
$type = strtolower($type);
$param = $param;
$productID = 0;
setcookie('storyPreExecutionID', $executionID, $this->config->cookieLife, $this->config->webRoot, '', false, true);
if($this->cookie->storyPreExecutionID != $executionID)
{
@@ -697,6 +698,7 @@ class execution extends control
}
elseif($type == 'byproduct')
{
$productID = $param;
$_COOKIE['storyModuleParam'] = 0;
$_COOKIE['storyProductParam'] = $param;
$_COOKIE['storyBranchParam'] = 0;
@@ -773,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;
@@ -803,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(0, 'story', true);
$this->view->modulePairs = $modulePairs;
$this->view->tabID = 'story';
$this->view->storyTasks = $storyTasks;
$this->view->storyBugs = $storyBugs;
+1 -1
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))
{
-8
View File
@@ -93,8 +93,6 @@ $lang->resource->my->story = 'story';
$lang->resource->my->task = 'task';
$lang->resource->my->bug = 'bug';
$lang->resource->my->doc = 'doc';
$lang->resource->my->issue = 'issue';
$lang->resource->my->risk = 'risk';
$lang->resource->my->testtask = 'testtask';
$lang->resource->my->testcase = 'testcase';
$lang->resource->my->execution = 'execution';
@@ -122,8 +120,6 @@ $lang->my->methodOrder[95] = 'testtask';
$lang->my->methodOrder[100] = 'testcase';
$lang->my->methodOrder[105] = 'execution';
$lang->my->methodOrder[110] = 'doc';
$lang->my->methodOrder[115] = 'issue';
$lang->my->methodOrder[120] = 'risk';
/* Todo. */
$lang->resource->todo = new stdclass();
@@ -1199,8 +1195,6 @@ $lang->resource->user->cropAvatar = 'cropAvatar';
$lang->resource->user->profile = 'profile';
$lang->resource->user->batchEdit = 'batchEdit';
$lang->resource->user->unbind = 'unbind';
$lang->resource->user->issue = 'issue';
$lang->resource->user->risk = 'risk';
$lang->resource->user->setPublicTemplate = 'setPublicTemplate';
$lang->user->methodOrder[5] = 'create';
@@ -1213,8 +1207,6 @@ $lang->user->methodOrder[30] = 'todo';
$lang->user->methodOrder[35] = 'task';
$lang->user->methodOrder[40] = 'bug';
$lang->user->methodOrder[45] = 'project';
$lang->user->methodOrder[50] = 'issue';
$lang->user->methodOrder[55] = 'risk';
$lang->user->methodOrder[60] = 'dynamic';
$lang->user->methodOrder[65] = 'cropAvatar';
$lang->user->methodOrder[70] = 'profile';
+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'>
-3
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 = '';
+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');
+1
View File
@@ -640,6 +640,7 @@ class upgradeModel extends model
$this->execSQL($this->getUpgradeFile('15.0'));
$this->adjustWhitelistOfProject();
$this->adjustWhitelistOfProduct();
$this->adjustPriv15_0();
$this->appendExec('15_0');
}