Merge branch 'sprint/tianshujie_fixbug' into 'master'
Sprint/tianshujie fixbug See merge request easycorp/zentaopms!2550
This commit is contained in:
@@ -38,12 +38,12 @@ class personnelModel extends model
|
||||
}
|
||||
|
||||
/* Determine who can be accessed based on access control. */
|
||||
$program = $this->loadModel('program')->getByID($programID);
|
||||
$program = $this->loadModel('program')->getByID($programID);
|
||||
$personnelList = array();
|
||||
$personnelList = $this->dao->select('t2.id,t2.dept,t2.account,t2.role,t2.realname,t2.gender')->from(TABLE_USERVIEW)->alias('t1')
|
||||
->leftJoin(TABLE_USER)->alias('t2')->on('t1.account=t2.account')
|
||||
->where('t2.deleted')->eq(0)
|
||||
->beginIF($program->acl != 'open')->andWhere("CONCAT(',', t1.programs, ',')")->like("%,$programID,%")
|
||||
->beginIF($program->acl != 'open')->andWhere("CONCAT(',', t1.programs, ',')")->like("%,$programID,%")->fi()
|
||||
->beginIF($deptID > 0)->andWhere('t2.dept')->eq($deptID)->fi()
|
||||
->beginIF($browseType == 'bysearch')->andWhere($accessibleQuery)->fi()
|
||||
->fetchAll('id');
|
||||
|
||||
@@ -12,3 +12,4 @@
|
||||
#budget {border-right: 0px;}
|
||||
#budgetUnit {border-left: 0px;}
|
||||
#projectName {display: inline-block; width: 32%;}
|
||||
#productsBox a {border-radius: 2px !important;}
|
||||
|
||||
@@ -309,3 +309,18 @@ function setBudgetTipsAndAclList(programID)
|
||||
$('.aclBox').html($('#PGMAcl').html());
|
||||
}
|
||||
}
|
||||
|
||||
$(document).on('change', "#plansBox select[name^='plans']", function()
|
||||
{
|
||||
var $plan = $(this);
|
||||
$("#plansBox select[name^='plans']").each(function()
|
||||
{
|
||||
if($plan.val() != 0 && $plan.val() == $(this).val() && $plan.closest('div').attr('id') != $(this).closest('div').attr('id'))
|
||||
{
|
||||
bootbox.alert(errorSamePlans);
|
||||
$plan.val(0);
|
||||
$plan.trigger("chosen:updated");
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
@@ -44,6 +44,7 @@ $lang->project->manageProducts = 'Manage Products';
|
||||
$lang->project->copyTitle = 'Please select an project to copy';
|
||||
$lang->project->errorSameProducts = 'Project cannot be associated with multiple identical products.';
|
||||
$lang->project->errorSameBranches = 'Project cannot be associated with multiple identical branches.';
|
||||
$lang->project->errorSamePlans = 'Project cannot be associated with multiple identical plans.';
|
||||
$lang->project->errorNoProducts = 'At least one product is associated';
|
||||
$lang->project->copyNoProject = 'There are no items available to copy.';
|
||||
$lang->project->searchByName = 'Enter the project name to retrieve';
|
||||
|
||||
@@ -44,6 +44,7 @@ $lang->project->manageProducts = '关联产品';
|
||||
$lang->project->copyTitle = '请选择要复制的项目';
|
||||
$lang->project->errorSameProducts = '项目不能关联多个相同的产品。';
|
||||
$lang->project->errorSameBranches = '项目不能关联多个相同的分支。';
|
||||
$lang->project->errorSamePlans = '项目不能关联多个相同的计划。';
|
||||
$lang->project->errorNoProducts = '最少关联一个产品';
|
||||
$lang->project->copyNoProject = '没有可用的项目来复制';
|
||||
$lang->project->searchByName = '输入项目名称进行检索';
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
<?php js::set('weekend', $config->execution->weekend);?>
|
||||
<?php js::set('errorSameProducts', $lang->project->errorSameProducts);?>
|
||||
<?php js::set('errorSameBranches', $lang->project->errorSameBranches);?>
|
||||
<?php js::set('errorSamePlans', $lang->project->errorSamePlans);?>
|
||||
<?php js::set('longTime', $lang->project->longTime);?>
|
||||
<?php js::set('multiBranchProducts', $multiBranchProducts);?>
|
||||
<?php js::set('selectedProductID', $productID);?>
|
||||
@@ -118,7 +119,9 @@
|
||||
<div class='col-sm-4 <?php if($programID) echo 'required';?>' style="padding-right: 6px;">
|
||||
<div class='input-group'>
|
||||
<?php echo html::select("products[$i]", $allProducts, '', "class='form-control chosen' onchange='loadBranches(this)'");?>
|
||||
<?php if(common::hasPriv('product', 'create')):?>
|
||||
<span class='input-group-addon'><?php echo html::checkBox('newProduct', $lang->project->addProduct, '', "onchange=addNewProduct(this);");?></span>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
<?php js::set('weekend', $config->execution->weekend);?>
|
||||
<?php js::set('errorSameProducts', $lang->project->errorSameProducts);?>
|
||||
<?php js::set('errorSameBranches', $lang->project->errorSameBranches);?>
|
||||
<?php js::set('errorSamePlans', $lang->project->errorSamePlans);?>
|
||||
<?php js::set('oldParent', $project->parent);?>
|
||||
<?php js::set('projectID', $project->id);?>
|
||||
<?php js::set('longTime', $lang->project->longTime);?>
|
||||
|
||||
@@ -119,7 +119,7 @@ class projectrelease extends control
|
||||
$this->commonAction($projectID);
|
||||
|
||||
/* Get the builds that can select. */
|
||||
$builds = $this->build->getBuildPairs(array_keys($this->products), 0, 'notrunk,withbranch', $projectID, 'project');
|
||||
$builds = $this->build->getBuildPairs(array_keys($this->products), 'all', 'notrunk,withbranch', $projectID, 'project');
|
||||
$releasedBuilds = $this->projectrelease->getReleasedBuilds($projectID);
|
||||
foreach($releasedBuilds as $build) unset($builds[$build]);
|
||||
unset($builds['trunk']);
|
||||
|
||||
Reference in New Issue
Block a user