Merge branch '20.x' of github.com:easysoft/zentaopms into 20.x
This commit is contained in:
@@ -1118,7 +1118,7 @@ class block extends control
|
||||
$productID = isset($this->session->product) ? 0 : $this->session->product;
|
||||
if($productID && !array_key_exists($productID, $products)) $productID = 0;
|
||||
|
||||
$this->view->plans = $this->loadModel('programplan')->getDataForGantt($this->session->program, $productID);
|
||||
$this->view->plans = $this->loadModel('programplan')->getDataForGantt($this->session->program, $productID, 0, 'task');
|
||||
$this->view->products = $products;
|
||||
$this->view->productID = $productID;
|
||||
}
|
||||
|
||||
@@ -262,7 +262,7 @@ function reloadRoadmap(productID)
|
||||
{
|
||||
$("#roadMap").html('');
|
||||
$("#roadMap").html(data);
|
||||
$("#createPlanLink").attr('href',createLink('productplan', 'create', 'id=' + productID) );
|
||||
$('#productID').chosen();
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -483,7 +483,6 @@ $lang->block->modules['program']->moreLinkList->cmmiestimate = 'workestimation|
|
||||
$lang->block->modules['program']->moreLinkList->cmmiissue = 'issue|browse|';
|
||||
$lang->block->modules['program']->moreLinkList->cmmirisk = 'risk|browse|';
|
||||
$lang->block->modules['program']->moreLinkList->scrumlist = 'project|all|';
|
||||
$lang->block->modules['program']->moreLinkList->scrumroadmap = 'product|all|';
|
||||
$lang->block->modules['program']->moreLinkList->scrumtest = 'testtask|browse|';
|
||||
$lang->block->modules['program']->moreLinkList->scrumproduct = 'product|all|';
|
||||
$lang->block->modules['program']->moreLinkList->scrumproject = 'project|all|';
|
||||
|
||||
@@ -10,21 +10,27 @@
|
||||
* @link http://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php if($sync === 1):?>
|
||||
<?php echo $sync ? '<div id="roadMap">' : '';?>
|
||||
<style>
|
||||
.release-line>li:nth-child(even)>a{height:92px;}
|
||||
.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}
|
||||
#dashboard .panel-move-handler{right: 30px}
|
||||
#productList{width:32%; position: absolute; top: 6px; left: 96px;}
|
||||
#createPlan{position: absolute; top: 3px; right:0px;}
|
||||
#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, '', '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 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>
|
||||
<div class="panel-body conatiner-fluid" id="roadMap">
|
||||
<div class="panel-body conatiner-fluid">
|
||||
<?php if(empty($roadmaps)):?>
|
||||
<div class='empty-tip'><?php echo $lang->block->emptyTip;?></div>
|
||||
<?php else:?>
|
||||
@@ -37,41 +43,11 @@
|
||||
<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 . " ($plan->buildName)";?>"><?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;?>
|
||||
</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>
|
||||
<?php
|
||||
$plan->begin = date('Y/m/d', strtotime($plan->begin));
|
||||
$plan->end = '-' . date('m/d', strtotime($plan->end));
|
||||
?>
|
||||
<span class="date" title="<?php echo $plan->begin . $plan->end;?>"><?php echo $plan->begin . $plan->end;?></span>
|
||||
<span class="date"><?php echo $lang->block->estimatedHours;?> <?php echo $plan->hour;?> h</span>
|
||||
</a>
|
||||
</li>
|
||||
@@ -79,6 +55,9 @@
|
||||
<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>
|
||||
<?php
|
||||
$plan->date = date('Y/m/d', strtotime($plan->date));
|
||||
?>
|
||||
<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>
|
||||
@@ -91,4 +70,5 @@
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php echo $sync ? '</div>' : '';?>
|
||||
|
||||
@@ -49,6 +49,7 @@ class design extends control
|
||||
|
||||
$this->view->designs = $designs;
|
||||
$this->view->type = $type;
|
||||
$this->view->param = $param;
|
||||
$this->view->recTotal = $recTotal;
|
||||
$this->view->recPerPage = $recPerPage;
|
||||
$this->view->pageID = $pageID;
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#mainContent {min-height: 350px;}
|
||||
.searchBox{min-height: 45px;}
|
||||
.searchBox .srearch-date{float: left; width: 20%}
|
||||
.searchBox h4{float:left;display: inline-block}
|
||||
|
||||
@@ -21,8 +21,8 @@
|
||||
<tr>
|
||||
<th class='w-50px'> <?php echo $lang->design->id;?></th>
|
||||
<th class='w-200px'><?php echo $lang->design->story;?></th>
|
||||
<th class='w-200px'><?php echo $lang->design->type;?></th>
|
||||
<th><?php echo $lang->design->name;?></th>
|
||||
<th class='w-200px required'><?php echo $lang->design->type;?></th>
|
||||
<th class='required'><?php echo $lang->design->name;?></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
<?php else:?>
|
||||
<form id='designFrom' method='post' class="main-table">
|
||||
<table class='table has-sort-head table-fixrd' id="designTable">
|
||||
<?php $vars = "productID=$productID&type=$type&orderBy=%s&recTotal=$pager->recTotal&recPerPage=$pager->recPerPage&pageID=$pager->pageID";?>
|
||||
<?php $vars = "productID=$productID&type=$type¶m=$param&orderBy=%s&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}";?>
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="text-left w-60px"> <?php common::printOrderLink('id', $orderBy, $vars, $lang->idAB);?></th>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<td></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if(isset($activityID) && $activityID):?>
|
||||
<?php if(isset($owner) && $owner):?>
|
||||
<tr>
|
||||
<th><?php echo $lang->issue->activity;?></th>
|
||||
<td><?php echo html::select('activity', $activity, $activityID, 'class="form-control chosen"');?></td>
|
||||
|
||||
@@ -152,7 +152,7 @@ class programplan extends control
|
||||
$custom = empty($data->stageCustom) ? '' : implode(',', $data->stageCustom);
|
||||
$setting->setItem("$owner.$module.$section.$object", $custom);
|
||||
|
||||
$respone = array();
|
||||
$response = array();
|
||||
$response['result'] = 'success';
|
||||
$response['message'] = '';
|
||||
$this->send($response);
|
||||
|
||||
@@ -99,7 +99,17 @@ class programplanModel extends model
|
||||
return $pairs;
|
||||
}
|
||||
|
||||
public function getDataForGantt($programID, $productID, $baselineID = 0)
|
||||
/**
|
||||
* Get gantt data
|
||||
*
|
||||
* @param int $programID
|
||||
* @param int $productID
|
||||
* @param int $baselineID
|
||||
* @param string $selectCustom
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function getDataForGantt($programID, $productID, $baselineID = 0, $selectCustom = '')
|
||||
{
|
||||
$this->loadModel('stage');
|
||||
|
||||
@@ -161,7 +171,8 @@ class programplanModel extends model
|
||||
$section = 'browse';
|
||||
$object = 'stageCustom';
|
||||
$setting = $this->loadModel('setting');
|
||||
$selectCustom = $setting->getItem("owner={$owner}&module={$module}§ion={$section}&key={$object}");
|
||||
|
||||
if(empty($selectCustom)) $selectCustom = $setting->getItem("owner={$owner}&module={$module}§ion={$section}&key={$object}");
|
||||
|
||||
$tasks = array();
|
||||
if(strpos($selectCustom, 'task') !== false)
|
||||
|
||||
@@ -27,13 +27,13 @@ form {display: block; margin-top: 0em; margin-block-end: 1em;}
|
||||
<script>
|
||||
var scriptLoadedMap = {};
|
||||
var loadingPrefixText = '<?php echo $lang->programplan->exporting;?>';
|
||||
function getRemoteScript(url, sucessCallback, errorCallback)
|
||||
function getRemoteScript(url, successCallback, errorCallback)
|
||||
{
|
||||
if(scriptLoadedMap[url]) return sucessCallback && sucessCallback();
|
||||
if(scriptLoadedMap[url]) return successCallback && successCallback();
|
||||
$.getScript(url, function()
|
||||
{
|
||||
scriptLoadedMap[url] = true;
|
||||
if(sucessCallback) sucessCallback();
|
||||
if(successCallback) successCallback();
|
||||
}).fail(function()
|
||||
{
|
||||
if(errorCallback) errorCallback('Cannot load "' + url + '".');
|
||||
@@ -45,7 +45,7 @@ function updateProgress(progress)
|
||||
if(progress < 1) progressText += Math.floor(progress * 100) + '%';
|
||||
$('#mainContent').attr('data-loading', progressText);
|
||||
}
|
||||
function drawGanttToCanvas(exportType, sucessCallback, errorCallback)
|
||||
function drawGanttToCanvas(exportType, successCallback, errorCallback)
|
||||
{
|
||||
updateProgress(0);
|
||||
exportType = exportType || 'image';
|
||||
@@ -118,7 +118,7 @@ function drawGanttToCanvas(exportType, sucessCallback, errorCallback)
|
||||
});
|
||||
pdf.addImage(canvas, 0, 0, pdf.internal.pageSize.getWidth(), pdf.internal.pageSize.getHeight());
|
||||
pdf.save('gantt-export-<?php echo $programID;?>.pdf');
|
||||
if(sucessCallback) sucessCallback(pdf);
|
||||
if(successCallback) successCallback(pdf);
|
||||
afterFinish();
|
||||
}, function(error)
|
||||
{
|
||||
@@ -133,7 +133,7 @@ function drawGanttToCanvas(exportType, sucessCallback, errorCallback)
|
||||
updateProgress(0.95);
|
||||
var imageUrl = URL.createObjectURL(blob);
|
||||
$('#ganttDownload').attr({href: imageUrl})[0].click();
|
||||
if(sucessCallback) sucessCallback(imageUrl);
|
||||
if(successCallback) successCallback(imageUrl);
|
||||
afterFinish(canvas);
|
||||
});
|
||||
}
|
||||
@@ -387,7 +387,7 @@ $(function()
|
||||
|
||||
$(".checkbox-primary").on('click', function()
|
||||
{
|
||||
var stageCustom = new Array();
|
||||
var stageCustom = [];
|
||||
$("input[name='stageCustom[]']:checked").each(function()
|
||||
{
|
||||
var custom = $(this).val();
|
||||
@@ -398,7 +398,7 @@ $(function()
|
||||
$.ajax({
|
||||
url: customUrl,
|
||||
dataType: "json",
|
||||
data: {stageCustom, stageCustom},
|
||||
data: {stageCustom: stageCustom},
|
||||
type: "post",
|
||||
success: function(result)
|
||||
{
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
$lang->repo->common = 'Repo';
|
||||
$lang->repo->browse = 'View';
|
||||
$lang->repo->viewRevision = 'View Revision';
|
||||
$lang->repo->program = 'Program';
|
||||
$lang->repo->create = 'Create';
|
||||
$lang->repo->createAction = 'Create Repo';
|
||||
$lang->repo->maintain = 'Repo List';
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
$lang->repo->common = 'Repo';
|
||||
$lang->repo->browse = 'View';
|
||||
$lang->repo->viewRevision = 'View Revision';
|
||||
$lang->repo->program = 'Program';
|
||||
$lang->repo->create = 'Create';
|
||||
$lang->repo->createAction = 'Create Repo';
|
||||
$lang->repo->maintain = 'Repo List';
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
$lang->repo->common = 'Repo';
|
||||
$lang->repo->browse = 'Xem';
|
||||
$lang->repo->viewRevision = 'Xem Revision';
|
||||
$lang->repo->program = 'Program';
|
||||
$lang->repo->create = 'Tạo';
|
||||
$lang->repo->createAction = 'Tạo Repo';
|
||||
$lang->repo->maintain = 'Repo danh sách';
|
||||
|
||||
Reference in New Issue
Block a user