Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
tianshujie98
2020-08-28 08:52:22 +08:00
9 changed files with 24 additions and 54 deletions
-4
View File
@@ -31,9 +31,5 @@ $config->block->shortBlock['program']['cmmiestimate'] = 'cmmiestimate';
$config->block->shortBlock['program']['cmmiprogress'] = 'cmmiprogress';
$config->block->shortBlock['']['contribute'] = 'contribute';
$config->block->showAction['overview'] = array('block' => 'qa', 'module' => 'testcase', 'method' => 'create', 'vars' => '');
$config->block->showAction['scrumlist'] = array('block' => 'program', 'module' => 'project', 'method' => 'create', 'vars' => '');
$config->block->showAction['scrumproduct'] = array('block' => 'program', 'module' => 'product', 'method' => 'create', 'vars' => '');
$config->statistic = new stdclass();
$config->statistic->storyStages = array('wait', 'planned', 'developing', 'testing', 'released');
+7 -16
View File
@@ -239,18 +239,6 @@ class block extends control
$block->moreLink = $this->createLink('company', 'dynamic');
}
$block->actionLink = '';
if(isset($this->config->block->showAction[$block->block]))
{
$action = $this->config->block->showAction[$block->block];
if(common::hasPriv($action['module'], $action['method']))
{
$this->app->loadLang($action['module']);
$block->actionLink = html::a($this->createLink($action['module'], $action['method'], $action['vars']), "<i class='icon icon-sm icon-plus'></i> " . $this->lang->{$action['module']}->create, '', "class='btn btn-mini'");
}
}
if($this->block->isLongBlock($block))
{
$longBlocks[$key] = $block;
@@ -1296,6 +1284,7 @@ class block extends control
{
$this->view->summary = $this->dao->select('count(*) as total, count(if(status="doing", id, null)) as doing, count(if(status="closed", id, null)) as finish')->from(TABLE_PROJECT)
->where('program')->eq($this->session->program)
->where('deleted')->eq('0')
->fetch();
}
@@ -1330,10 +1319,11 @@ class block extends control
* Print srcum road map block.
*
* @param int $productID
* @param int $blockNavID
* @access public
* @return void
*/
public function printScrumroadmapBlock($productID = 0)
public function printScrumroadmapBlock($productID = 0, $blockNavID = '')
{
$this->session->set('releaseList', $this->app->getURI(true));
$this->session->set('productPlanList', $this->app->getURI(true));
@@ -1343,9 +1333,10 @@ class block extends control
$this->view->roadmaps = $this->product->getRoadmap($productID, 0, 6);
$this->view->productID = $productID;
$this->view->products = $products;
$this->view->sync = 1;
$this->view->productID = $productID;
$this->view->products = $products;
$this->view->sync = 1;
$this->view->blockNavID = $blockNavID;
if($_POST)
{
+5 -6
View File
@@ -251,20 +251,19 @@ $(function()
});
});
function reloadRoadmap(productID)
function reloadRoadmap(productID, blockNavID)
{
$.ajax(
{
url: createLink('block', 'printScrumroadmapBlock', 'id=' + productID),
url: createLink('block', 'printScrumroadmapBlock', 'id=' + productID + '&blockNavID=' + blockNavID),
dataType: "html",
async: false,
data: {id: productID},
data: {id: productID, blockNavID: blockNavID},
type: 'post',
success: function(data)
{
$("#roadMap").html('');
$("#roadMap").html(data);
$('#productID').chosen();
$("#roadMap" + blockNavID).html(data);
$("#" + blockNavID).chosen();
}
})
}
-2
View File
@@ -38,7 +38,6 @@ $useGuest = $this->app->user->account == 'guest';
<div class='panel-title'><?php echo $block->title;?></div>
<?php endif;?>
<nav class='panel-actions nav nav-default'>
<?php if(!empty($block->actionLink)) echo '<li>' . $block->actionLink . '</li>';?>
<?php if(!empty($block->moreLink)) echo '<li>' . html::a($block->moreLink, '<i class="icon icon-more"></i>', '', "title='{$lang->more}'") . '</li>'; ?>
<li class='dropdown'>
<a href='javascript:;' data-toggle='dropdown' class='panel-action'><i class='icon icon-ellipsis-v'></i></a>
@@ -74,7 +73,6 @@ $useGuest = $this->app->user->account == 'guest';
<div class='panel-title'><?php echo $block->title;?></div>
<?php endif;?>
<nav class='panel-actions nav nav-default'>
<?php if(!empty($block->actionLink)) echo '<li>' . $block->actionLink . '</li>';?>
<?php if(!empty($block->moreLink)) echo '<li>' . html::a($block->moreLink, '<i class="icon icon-more"></i>', '', "title='{$lang->more}'") . '</li>';?>
<li class='dropdown'>
<a href='javascript:;' data-toggle='dropdown' class='panel-action'><i class='icon icon-ellipsis-v'></i></a>
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
/**
* The project block view file of block module of ZenTaoPMS.
* The project list block view file of block module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
/**
* The project block view file of block module of ZenTaoPMS.
* The scrum overview block view file of block module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
+1 -1
View File
@@ -1,6 +1,6 @@
<?php
/**
* The project block view file of block module of ZenTaoPMS.
* The product overview block view file of block module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
+4 -12
View File
@@ -1,6 +1,6 @@
<?php
/**
* The testtask block view file of block module of ZenTaoPMS.
* The project overview block view file of block module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
* @license ZPL (http://zpl.pub/page/zplv12.html)
@@ -14,15 +14,7 @@
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
<?php else:?>
<style>
.status-bars {
display: table;
width: 60%;
height: 140px;
padding: 5px;
padding-top: 50px;
margin: 0;
overflow: hidden;
}
.status-bars {display: table;width: 60%;height: 140px;padding: 5px;padding-top: 50px;margin: 0;overflow: hidden;}
</style>
<div class="panel-body table-row">
<div class="col-4 text-middle text-center">
@@ -34,11 +26,11 @@
<div class="col-8 text-middle">
<ul class="status-bars all-statistics">
<li>
<span class="bar" style="height: <?php echo empty($summary->doing) ? 0 : round(($summary->doing/$summary->total) * 100);?>%"><span class="value"><?php echo $summary->doing;?></span></span>
<span class="bar" style="height: <?php echo empty($summary->total) ? 0 : round(($summary->doing/$summary->total) * 100);?>%"><span class="value"><?php echo $summary->doing;?></span></span>
<span class="title"><?php echo $lang->block->doingProject;?></span>
</li>
<li>
<span class="bar" style="height: <?php echo empty($summary->finish) ? 0 : round(($summary->finish/$summary->total) * 100);?>%"><span class="value"><?php echo $summary->finish;?></span></span>
<span class="bar" style="height: <?php echo empty($summary->total) ? 0 : round(($summary->finish/$summary->total) * 100);?>%"><span class="value"><?php echo $summary->finish;?></span></span>
<span class="title"><?php echo $lang->block->finishProject;?></span>
</li>
</ul>
+5 -11
View File
@@ -10,25 +10,19 @@
* @link http://www.zentao.net
*/
?>
<?php echo $sync ? '<div id="roadMap">' : '';?>
<?php
$blockNavID = empty($blockNavID) ? uniqid() : $blockNavID;
echo $sync ? '<div id="roadMap' . $blockNavID . '">' : '';
?>
<style>
.release-line>li:nth-child(even)>a{height: 92px;}
.release-line>li:nth-child(odd){padding-top: 87px;}
.release-line>li>a .title {overflow: hidden; width:150%; text-overflow: ellipsis;}
#dashboard .panel-move-handler{right: 30px}
#productList{width:32%; position: absolute; top: 6px; left: 96px;}
#createPlan{position: absolute; top: 6px; right: 50px;}
#createPlan a{padding: 0 5px;line-height: 24px;margin: 3px;color: #3C4353;}
#roadMapMore{position: absolute; top: 0px; right: 0px;}
</style>
<div class="panel-move-handler">
<div id="productList"><?php echo html::select('productID', $products, $productID, 'class="form-control chosen" onchange="reloadRoadmap(this.options[this.options.selectedIndex].value)"');?></div>
<div id="createPlan"><?php echo html::a($this->createLink('productplan', 'create', 'productID=' . $productID), '<i class="icon icon-sm icon-plus"></i>'. $lang->productplan->create, '', 'class="btn btn-mini" id="createPlanLink"');?></div>
<nav class="panel-actions nav nav-default" id="roadMapMore">
<li>
<?php echo html::a($this->createLink('product', 'roadmap', 'productID=' . $productID), '<i class="icon icon-more"></i>', '', 'title="'. $lang->more .'" id="roadMapMoreLink"');?>
</li>
</nav>
<div id="productList"><?php echo html::select('productID', $products, $productID, 'id="' . $blockNavID .'" class="form-control chosen" onchange="reloadRoadmap(this.options[this.options.selectedIndex].value, this.id)"');?></div>
</div>
<div class="panel-body conatiner-fluid">
<?php if(empty($roadmaps)):?>