* Finish task#7654.
This commit is contained in:
@@ -1607,9 +1607,10 @@ class block extends control
|
||||
{
|
||||
$this->session->set('releaseList', $this->app->getURI(true));
|
||||
$this->session->set('productPlanList', $this->app->getURI(true));
|
||||
|
||||
$products = $this->loadModel('product')->getPairs();
|
||||
|
||||
ksort($products);
|
||||
$this->view->roadmaps = $this->product->getRoadmap(key($products), 0, 6);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1680,27 +1681,12 @@ class block extends control
|
||||
*/
|
||||
public function printScrumdynamicBlock()
|
||||
{
|
||||
$projects = $this->loadModel('project')->getPairs();
|
||||
$products = $this->loadModel('product')->getPairs();
|
||||
$productID = array();
|
||||
foreach($products as $id => $name) $productID[] = ',' . $id . ',';
|
||||
|
||||
if(empty($projects) && empty($products))
|
||||
{
|
||||
$actions = array();
|
||||
}
|
||||
else
|
||||
{
|
||||
$actions = $this->dao->select('*')->from(TABLE_ACTION)
|
||||
->beginIF($projects && $products)->where('project')->in(array_keys($projects))->orWhere('product')->in($productID)->fi()
|
||||
->beginIF($projects && empty($products))->where('project')->in(array_keys($projects))->fi()
|
||||
->beginIF(empty($projects) && $products)->where('product')->in($productID)->fi()
|
||||
->orderBy('id_desc')
|
||||
->limit(30)
|
||||
->fetchAll();
|
||||
}
|
||||
/* Load pager. */
|
||||
$this->app->loadClass('pager', $static = true);
|
||||
$pager = new pager(0, 30, 1);
|
||||
|
||||
$this->view->actions = empty($actions) ? array() : $this->loadModel('action')->transformActions($actions);
|
||||
$this->view->actions = $this->loadModel('action')->getDynamic('all', 'today', 'date_desc', $pager);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,6 +57,8 @@ $lang->block->scrum = 'Scrum+';
|
||||
$lang->block->allProject = '所有' . $lang->projectCommon;
|
||||
$lang->block->doingProject = '进行中的' . $lang->projectCommon;
|
||||
$lang->block->finishProject = '累积' . $lang->projectCommon;
|
||||
$lang->block->estimatedHours = '预计工时';
|
||||
$lang->block->consumedHours = '已消耗';
|
||||
|
||||
$lang->block->params = new stdclass();
|
||||
$lang->block->params->name = '参数名称';
|
||||
|
||||
+77
-5
@@ -865,15 +865,15 @@ class blockModel extends model
|
||||
return json_encode($params);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Get scrum project list params.
|
||||
*▫
|
||||
*
|
||||
* @param string $module
|
||||
* @access public
|
||||
* @return void
|
||||
* @return string
|
||||
*/
|
||||
public function getScrumListParams($module = '')
|
||||
{
|
||||
public function getScrumListParams($module = '')
|
||||
{
|
||||
$params = new stdclass();
|
||||
$params->type['name'] = $this->lang->block->type;
|
||||
$params->type['options'] = $this->lang->block->typeList->scrum;
|
||||
@@ -885,4 +885,76 @@ class blockModel extends model
|
||||
|
||||
return json_encode($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get scrum overall list params.
|
||||
*
|
||||
* @param string $module
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getScrumoverallParams($module = '')
|
||||
{
|
||||
$params->num['name'] = $this->lang->block->num;
|
||||
$params->num['control'] = 'input';
|
||||
|
||||
return json_encode($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get scrum roadmap list params.
|
||||
*
|
||||
* @param string $module
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getScrumroadmapParams($module = '')
|
||||
{
|
||||
$params->num['name'] = $this->lang->block->num;
|
||||
$params->num['control'] = 'input';
|
||||
|
||||
return json_encode($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get scrum product list params.
|
||||
*
|
||||
* @param string $module
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getScrumproductParams($module = '')
|
||||
{
|
||||
$params->num['name'] = $this->lang->block->num;
|
||||
$params->num['control'] = 'input';
|
||||
|
||||
return json_encode($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get scrum project list params.
|
||||
*
|
||||
* @param string $module
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getScrumprojectParams($module = '')
|
||||
{
|
||||
$params->num['name'] = $this->lang->block->num;
|
||||
$params->num['control'] = 'input';
|
||||
|
||||
return json_encode($params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the total estimated man hours required.
|
||||
*
|
||||
* @param array $storyID
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getStorysEstimateHours($storyID)
|
||||
{
|
||||
return $this->dao->select('count(estimate) as estimate')->from(TABLE_STORY)->where('id')->in($storyID)->fetch('estimate');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,44 +10,37 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<style>
|
||||
.release-line>li:nth-child(even)>a{height:92px;}
|
||||
.release-line>li:nth-child(odd){padding-top: 87px;}
|
||||
</style>
|
||||
<div class="panel-body">
|
||||
<div class="release-path">
|
||||
<ul class="release-line">
|
||||
<li>
|
||||
<a href="/index.php?m=release&f=view&releaseID=2&pgm=7">
|
||||
<span class="title" title="发布二">渠成一期V1.1.2</span>
|
||||
<span class="date">2020/08/01-09/01</span>
|
||||
<span class="date">总消耗 120h</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/index.php?m=release&f=view&releaseID=2&pgm=7">
|
||||
<span class="title" title="发布二">渠成一期V1.1.2</span>
|
||||
<span class="date">2020/08/01-09/01</span>
|
||||
<span class="date">总消耗 120h</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/index.php?m=release&f=view&releaseID=2&pgm=7">
|
||||
<span class="title" title="发布二">渠成一期V1.1.2</span>
|
||||
<span class="date">2020/08/01-09/01</span>
|
||||
<span class="date">总消耗 120h</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/index.php?m=release&f=view&releaseID=2&pgm=7">
|
||||
<span class="title" title="发布二">渠成一期V1.1.2</span>
|
||||
<span class="date">2020/08/01-09/01</span>
|
||||
<span class="date">总消耗 120h</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="/index.php?m=release&f=view&releaseID=2&pgm=7">
|
||||
<span class="title" title="发布二">渠成一期V1.1.2</span>
|
||||
<span class="date">2020/08/01-09/01</span>
|
||||
<span class="date">总消耗 120h</span>
|
||||
</a>
|
||||
</li>
|
||||
<?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>
|
||||
</div>
|
||||
|
||||
@@ -259,7 +259,7 @@ class issue extends control
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function resolve($issue)
|
||||
public function resolve($issue)
|
||||
{
|
||||
if($_POST)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user