Merge branch '20.x' of github.com:easysoft/zentaopms into 20.x
This commit is contained in:
@@ -1611,20 +1611,29 @@ class block extends control
|
||||
/**
|
||||
* Print srcum road map block.
|
||||
*
|
||||
* @param int $productID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function printScrumroadmapBlock()
|
||||
public function printScrumroadmapBlock($productID = 0)
|
||||
{
|
||||
$this->session->set('releaseList', $this->app->getURI(true));
|
||||
$this->session->set('productPlanList', $this->app->getURI(true));
|
||||
$products = $this->loadModel('product')->getPairs();
|
||||
|
||||
ksort($products);
|
||||
$productID = key($products);
|
||||
$this->view->roadmaps = $this->product->getRoadmap($productID, 0, 6);
|
||||
$products = $this->loadModel('product')->getPairs();
|
||||
if(!is_numeric($productID)) $productID = key($products);
|
||||
|
||||
$this->view->roadmaps = $this->product->getRoadmap($productID, 0, 6);
|
||||
|
||||
$this->view->productID = $productID;
|
||||
$this->view->products = $products;
|
||||
$this->view->products = $products;
|
||||
$this->view->sync = 1;
|
||||
|
||||
if($_POST)
|
||||
{
|
||||
$this->view->sync = 0;
|
||||
$this->display('block', 'scrumroadmapblock');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -248,3 +248,21 @@ $(function()
|
||||
refreshBlock($(this).closest('.panel'));
|
||||
});
|
||||
});
|
||||
|
||||
function reloadRoadmap(productID)
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
url: createLink('block', 'printScrumroadmapBlock', 'id=' + productID),
|
||||
dataType: "html",
|
||||
async: false,
|
||||
data: {id: productID},
|
||||
type: 'post',
|
||||
success: function(data)
|
||||
{
|
||||
$("#roadMap").html('');
|
||||
$("#roadMap").html(data);
|
||||
$("#createPlanLink").attr('href',createLink('productplan', 'create', 'id=' + productID) );
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -334,7 +334,6 @@ $lang->block->modules['scrum']['index']->availableBlocks->scrumlist = $lang-
|
||||
$lang->block->modules['scrum']['index']->availableBlocks->scrumproject = $lang->projectCommon . '总览';
|
||||
$lang->block->modules['scrum']['index']->availableBlocks->scrumproduct = $lang->productCommon . '总览';
|
||||
$lang->block->modules['scrum']['index']->availableBlocks->scrumtest = '待测版本';
|
||||
$lang->block->modules['scrum']['index']->availableBlocks->scrumroadmap = $lang->productCommon . '路线图';
|
||||
|
||||
$lang->block->modules['cmmi']['index'] = new stdclass();
|
||||
$lang->block->modules['cmmi']['index']->availableBlocks = new stdclass();
|
||||
|
||||
@@ -10,20 +10,24 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php if($sync === 1):?>
|
||||
<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:78px}
|
||||
#productList{width:28%; position: absolute; top: 6px; left: 96px;}
|
||||
#productList{width:32%; position: absolute; top: 6px; left: 96px;}
|
||||
#createPlan{position: absolute; top: 3px; right:0px;}
|
||||
#createPlan a{padding: 0 5px;line-height: 24px;margin: 3px;color: #3C4353;}
|
||||
</style>
|
||||
<div class="panel-move-handler">
|
||||
<div id="productList"><?php echo html::select('productID', $products, '', 'class="form-control chosen"');?></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="createPlan"');?></div>
|
||||
<div id="productList"><?php echo html::select('productID', $products, '', '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>
|
||||
</div>
|
||||
<div class="panel-body conatiner-fluid">
|
||||
<div class="panel-body conatiner-fluid" id="roadMap">
|
||||
<?php if(empty($roadmaps)):?>
|
||||
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
|
||||
<?php else:?>
|
||||
<div class="release-path">
|
||||
<ul class="release-line">
|
||||
<?php foreach($roadmaps as $year => $mapBranches):?>
|
||||
@@ -52,4 +56,39 @@
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php if(empty($roadmaps)):?>
|
||||
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
|
||||
<?php else:?>
|
||||
<div class="release-path">
|
||||
<ul class="release-line">
|
||||
<?php foreach($roadmaps as $year => $mapBranches):?>
|
||||
<?php foreach($mapBranches as $plans):?>
|
||||
<?php foreach($plans as $plan):?>
|
||||
<?php if(isset($plan->begin)):?>
|
||||
<li <?php if(date('Y-m-d') < $plan->begin) echo 'class="active"';?>>
|
||||
<a href="<?php echo $this->createLink('productplan', 'view', "planID={$plan->id}");?>">
|
||||
<span class="title" title="<?php echo $plan->title;?>"><?php echo $plan->title;?></span>
|
||||
<span class="date" title="<?php echo $plan->begin;?>"><?php echo $plan->begin;?></span>
|
||||
<span class="date"><?php echo $lang->block->estimatedHours;?> <?php echo $plan->hour;?> h</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php else:?>
|
||||
<li>
|
||||
<a href="<?php echo $this->createLink('release', 'view', "releaseID={$plan->id}");?>">
|
||||
<span class="title" title="<?php echo $plan->name;?>"><?php echo $plan->name . "($plan->buildName)";?></span>
|
||||
<span class="date" title="<?php echo $plan->date;?>"><?php echo $plan->date;?></span>
|
||||
<?php $estimate = empty($plan->stories) ? 0 : $this->block->getStorysEstimateHours(explode(',', $plan->stories));?>
|
||||
<span class="date"><?php echo $lang->block->consumedHours;?> <?php echo empty($estimate) ? 0 : $estimate;?> h</span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endif;?>
|
||||
<?php endforeach;?>
|
||||
<?php endforeach;?>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
|
||||
Reference in New Issue
Block a user