Merge branch 'master' of http://gitlab.zcorp.cc/easycorp/zentaopms
This commit is contained in:
@@ -2210,7 +2210,7 @@ class execution extends control
|
||||
$position[] = html::a($browseExecutionLink, $execution->name);
|
||||
$position[] = $this->lang->execution->manageProducts;
|
||||
|
||||
$allProducts = $this->product->getProductPairsByProject($execution->project);
|
||||
$allProducts = $this->config->systemMode == 'classic' ? $this->product->getPairs('noclosed') : $this->product->getProductPairsByProject($execution->project);
|
||||
$linkedProducts = $this->execution->getProducts($execution->id);
|
||||
$linkedBranches = array();
|
||||
|
||||
|
||||
@@ -340,6 +340,12 @@ class executionModel extends model
|
||||
|
||||
$sprint = $this->loadModel('file')->processImgURL($sprint, $this->config->execution->editor->create['id'], $this->post->uid);
|
||||
|
||||
/* Redefines the language entries for the fields in the project table. */
|
||||
foreach(explode(',', $this->config->execution->create->requiredFields) as $field)
|
||||
{
|
||||
if(isset($this->lang->execution->$field)) $this->lang->project->$field = $this->lang->execution->$field;
|
||||
}
|
||||
|
||||
/* Replace required language. */
|
||||
if($this->app->openApp == 'project')
|
||||
{
|
||||
@@ -484,7 +490,7 @@ class executionModel extends model
|
||||
}
|
||||
|
||||
/* Redefines the language entries for the fields in the project table. */
|
||||
foreach(explode(',', $this->config->execution->create->requiredFields) as $field)
|
||||
foreach(explode(',', $this->config->execution->edit->requiredFields) as $field)
|
||||
{
|
||||
if(isset($this->lang->execution->$field)) $this->lang->project->$field = $this->lang->execution->$field;
|
||||
}
|
||||
@@ -1740,12 +1746,12 @@ class executionModel extends model
|
||||
{
|
||||
$this->loadModel('user');
|
||||
$products = isset($_POST['products']) ? $_POST['products'] : $products;
|
||||
$oldProdcuts = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)->where('project')->eq((int)$executionID)->fetchGroup('product', 'branch');
|
||||
$oldProducts = $this->dao->select('*')->from(TABLE_PROJECTPRODUCT)->where('project')->eq((int)$executionID)->fetchGroup('product', 'branch');
|
||||
$this->dao->delete()->from(TABLE_PROJECTPRODUCT)->where('project')->eq((int)$executionID)->exec();
|
||||
$members = array_keys($this->getTeamMembers($executionID));
|
||||
if(empty($products))
|
||||
{
|
||||
$this->user->updateUserView(array_keys($oldProdcuts), 'product', $members);
|
||||
$this->user->updateUserView(array_keys($oldProducts), 'product', $members);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1760,10 +1766,10 @@ class executionModel extends model
|
||||
|
||||
$oldPlan = 0;
|
||||
$branch = isset($branches[$i]) ? $branches[$i] : 0;
|
||||
if(isset($oldProdcuts[$productID][$branch]))
|
||||
if(isset($oldProducts[$productID][$branch]))
|
||||
{
|
||||
$oldProdcuts= $oldProdcuts[$productID][$branch];
|
||||
$oldPlan = $oldProdcuts>plan;
|
||||
$oldProduct = $oldProducts[$productID][$branch];
|
||||
$oldPlan = $oldProduct->plan;
|
||||
}
|
||||
|
||||
$data = new stdclass();
|
||||
@@ -1775,7 +1781,7 @@ class executionModel extends model
|
||||
$existedProducts[$productID] = true;
|
||||
}
|
||||
|
||||
$oldProductKeys = array_keys($oldProdcuts);
|
||||
$oldProductKeys = array_keys($oldProducts);
|
||||
$needUpdate = array_merge(array_diff($oldProductKeys, $products), array_diff($products, $oldProductKeys));
|
||||
if($needUpdate) $this->user->updateUserView($needUpdate, 'product', $members);
|
||||
}
|
||||
|
||||
@@ -3,9 +3,10 @@
|
||||
<?php js::set('extra', $extra);?>
|
||||
<style>
|
||||
#navTabs {position: sticky; top: 0; background: #fff; z-index: 950;}
|
||||
#navTabs>li>span {display: inline-block; margin-left: -6px;}
|
||||
#navTabs>li>a {padding: 8px 10px; display: inline-block}
|
||||
#navTabs>li.active>a, .nav-tabs>li.active>span {font-weight: 700; color: #0c64eb;}
|
||||
#navTabs>li {padding: 0px 10px; display: inline-block}
|
||||
#navTabs>li>span {display: inline-block;}
|
||||
#navTabs>li>a {padding: 8px 0px; display: inline-block}
|
||||
#navTabs>li.active>a {font-weight: 700; color: #0c64eb;}
|
||||
#navTabs>li.active>a:before {position: absolute; right: 0; bottom: -1px; left: 0; display: block; height: 2px; content: ' '; background: #0c64eb; }
|
||||
#navTabs>li.active>a, .nav-tabs>li.active>a:focus, .nav-tabs>li.active>a:hover {border: none;}
|
||||
|
||||
@@ -111,8 +112,8 @@ foreach($executions as $projectID => $projectExecutions)
|
||||
<?php $tabActive = ($myExecutions and ($tabActive == 'closed' or $tabActive == 'myExecution')) ? 'myExecution' : 'other';?>
|
||||
<?php if($myExecutions): ?>
|
||||
<ul class="nav nav-tabs" id="navTabs">
|
||||
<li class="<?php if($tabActive == 'myExecution') echo 'active';?>"><?php echo html::a('#myExecution', $lang->execution->involved, '', "data-toggle='tab' class='not-list-item not-clear-menu'");?><span class="text-muted"><?php echo $myExecutions;?></span><li>
|
||||
<li class="<?php if($tabActive == 'other') echo 'active';?>"><?php echo html::a('#other', $lang->project->other, '', "data-toggle='tab' class='not-list-item not-clear-menu'")?><span class="text-muted"><?php echo $others;?></span><li>
|
||||
<li class="<?php if($tabActive == 'myExecution') echo 'active';?>"><?php echo html::a('#myExecution', $lang->execution->involved, '', "data-toggle='tab' class='not-list-item not-clear-menu'");?><span class="label label-light label-badge"><?php echo $myExecutions;?></span><li>
|
||||
<li class="<?php if($tabActive == 'other') echo 'active';?>"><?php echo html::a('#other', $lang->project->other, '', "data-toggle='tab' class='not-list-item not-clear-menu'")?><span class="label label-light label-badge"><?php echo $others;?></span><li>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
<div class="tab-content" id="tabContent">
|
||||
@@ -139,10 +140,10 @@ $(function()
|
||||
$('.nav-tabs li span').hide();
|
||||
$('.nav-tabs li.active').find('span').show();
|
||||
|
||||
$('.nav-tabs>li').click(function()
|
||||
$('.nav-tabs>li a').click(function()
|
||||
{
|
||||
$(this).find('span').show();
|
||||
$(this).siblings('li').find('span').hide();
|
||||
$(this).siblings().show();
|
||||
$(this).parent().siblings('li').find('span').hide();
|
||||
if($(this).attr('class') != 'active') $('#dropMenu').removeClass('show-right-col');
|
||||
$("#dropMenu .search-box").width('auto');
|
||||
})
|
||||
|
||||
@@ -51,7 +51,7 @@
|
||||
<tr>
|
||||
<th class='w-50px'><?php echo $lang->idAB;?></th>
|
||||
<?php if($config->systemMode == 'new' and isset($project) and $project->model == 'scrum'):?>
|
||||
<th class='required' style="width:100%"><?php echo $lang->execution->project;?></th>
|
||||
<th class='w-150px required' style="width:100%"><?php echo $lang->execution->project;?></th>
|
||||
<?php endif;?>
|
||||
<th class='required <?php echo $minWidth?>' style="width:100%"><?php echo $lang->execution->$name;?></th>
|
||||
<th class='w-150px required'><?php echo $lang->execution->$code;?></th>
|
||||
@@ -79,14 +79,14 @@
|
||||
<tr>
|
||||
<td><?php echo sprintf('%03d', $executionID) . html::hidden("executionIDList[$executionID]", $executionID);?></td>
|
||||
<?php if($config->systemMode == 'new' and isset($project) and $project->model == 'scrum'):?>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("projects[$executionID]", $allProjects, $executions[$executionID]->project, "class='form-control chosen'");?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("projects[$executionID]", $allProjects, $executions[$executionID]->project, "class='form-control picker-select'");?></td>
|
||||
<?php endif;?>
|
||||
<td title='<?php echo $executions[$executionID]->name?>'><?php echo html::input("names[$executionID]", $executions[$executionID]->name, "class='form-control'");?></td>
|
||||
<td><?php echo html::input("codes[$executionID]", $executions[$executionID]->code, "class='form-control'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'PM', ' hidden')?>' style='overflow:visible'><?php echo html::select("PMs[$executionID]", $pmUsers, $executions[$executionID]->PM, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'PO', ' hidden')?>' style='overflow:visible'><?php echo html::select("POs[$executionID]", $poUsers, $executions[$executionID]->PO, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'QD', ' hidden')?>' style='overflow:visible'><?php echo html::select("QDs[$executionID]", $qdUsers, $executions[$executionID]->QD, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'RD', ' hidden')?>' style='overflow:visible'><?php echo html::select("RDs[$executionID]", $rdUsers, $executions[$executionID]->RD, "class='form-control chosen'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'PM', ' hidden')?>' style='overflow:visible'><?php echo html::select("PMs[$executionID]", $pmUsers, $executions[$executionID]->PM, "class='form-control picker-select'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'PO', ' hidden')?>' style='overflow:visible'><?php echo html::select("POs[$executionID]", $poUsers, $executions[$executionID]->PO, "class='form-control picker-select'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'QD', ' hidden')?>' style='overflow:visible'><?php echo html::select("QDs[$executionID]", $qdUsers, $executions[$executionID]->QD, "class='form-control picker-select'");?></td>
|
||||
<td class='text-left<?php echo zget($visibleFields, 'RD', ' hidden')?>' style='overflow:visible'><?php echo html::select("RDs[$executionID]", $rdUsers, $executions[$executionID]->RD, "class='form-control picker-select'");?></td>
|
||||
<td class='<?php echo zget($visibleFields, 'type', 'hidden')?>'>
|
||||
<?php
|
||||
if($executions[$executionID]->type == 'stage')
|
||||
@@ -123,7 +123,7 @@
|
||||
<tr>
|
||||
<td colspan='<?php echo count($visibleFields) + 6?>' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::backButton();?>
|
||||
<?php echo html::linkButton($lang->goback, $this->session->executionList, 'self', '', 'btn btn-wide');;?>
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
|
||||
@@ -52,7 +52,7 @@
|
||||
<?php
|
||||
if(common::hasPriv('execution', 'task'))
|
||||
{
|
||||
echo html::a($this->createLink('execution', 'task', "executionID=$execution->id"), $execution->name, '', "title=$execution->name");
|
||||
echo html::a($this->createLink('execution', 'task', "executionID=$execution->id"), $execution->name, '', "title='{$execution->name}'");
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user