Merge branch 'master' of github.com:easysoft/zentaopms

This commit is contained in:
z
2020-08-18 14:11:53 +08:00
47 changed files with 261 additions and 126 deletions
+2 -1
View File
@@ -496,7 +496,8 @@ function notice()
if(typeof(branch) == 'undefined') branch = 0;
var link = createLink('release', 'create', 'productID=' + $('#product').val() + '&branch=' + branch);
if(typeof(flow) != 'undefined' && flow == 'onlyTest') link = createLink('build', 'create','projectID=' + $('#product').val());
html += '<a href="' + link + '" target="_blank" style="padding-right:5px">' + createBuild + '</a> ';
link += config.requestType == 'GET' ? '&onlybody=yes' : '?onlybody=yes';
html += '<a href="' + link + '" data-toggle="modal" data-type="iframe" style="padding-right:5px">' + createBuild + '</a> ';
html += '<a href="javascript:loadProductBuilds(' + $('#product').val() + ')">' + refresh + '</a>';
}
else
+1 -1
View File
@@ -2494,7 +2494,7 @@ class bugModel extends model
$canBatchResolve = common::hasPriv('bug', 'batchResolve');
$canBatchAssignTo = common::hasPriv('bug', 'batchAssignTo');
$canBatchAction = $canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo;
$canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo);
$canView = common::hasPriv('bug', 'view');
+25 -12
View File
@@ -206,6 +206,17 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
$setting = $this->datatable->getSetting('bug');
$widths = $this->datatable->setFixedFieldWidth($setting);
$columns = 0;
$canBatchEdit = common::hasPriv('bug', 'batchEdit');
$canBatchConfirm = common::hasPriv('bug', 'batchConfirm');
$canBatchClose = common::hasPriv('bug', 'batchClose');
$canBatchActivate = common::hasPriv('bug', 'batchActivate');
$canBatchChangeBranch = common::hasPriv('bug', 'batchChangeBranch');
$canBatchChangeModule = common::hasPriv('bug', 'batchChangeModule');
$canBatchResolve = common::hasPriv('bug', 'batchResolve');
$canBatchAssignTo = common::hasPriv('bug', 'batchAssignTo');
$canBatchAction = ($canBatchEdit or $canBatchConfirm or $canBatchClose or $canBatchActivate or $canBatchChangeBranch or $canBatchChangeModule or $canBatchResolve or $canBatchAssignTo);
?>
<?php if(!$useDatatable) echo '<div class="table-responsive">';?>
<table class='table has-sort-head<?php if($useDatatable) echo ' datatable';?>' id='bugList' data-fixed-left-width='<?php echo $widths['leftWidth']?>' data-fixed-right-width='<?php echo $widths['rightWidth']?>'>
@@ -219,7 +230,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
if(common::checkNotCN() and $value->id == 'severity') $value->name = $lang->bug->severity;
if(common::checkNotCN() and $value->id == 'pri') $value->name = $lang->bug->pri;
if(common::checkNotCN() and $value->id == 'confirmed') $value->name = $lang->bug->confirmed;
$this->datatable->printHead($value, $orderBy, $vars);
$this->datatable->printHead($value, $orderBy, $vars, $canBatchAction);
$columns ++;
}
}
@@ -236,33 +247,35 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
</table>
<?php if(!$useDatatable) echo '</div>';?>
<div class='table-footer'>
<?php if($canBatchAction):?>
<div class="checkbox-primary check-all"><label><?php echo $lang->selectAll?></label></div>
<?php endif;?>
<div class="table-actions btn-toolbar">
<div class='btn-group dropup'>
<?php
$actionLink = $this->createLink('bug', 'batchEdit', "productID=$productID&branch=$branch");
$misc = common::hasPriv('bug', 'batchEdit') ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'";
$misc = $canBatchEdit ? "onclick=\"setFormAction('$actionLink')\"" : "disabled='disabled'";
echo html::commonButton($lang->edit, $misc);
?>
<button type='button' class='btn dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>
<ul class='dropdown-menu'>
<?php
$class = common::hasPriv('bug', 'batchConfirm') ? '' : "class='disabled'";
$class = $canBatchConfirm ? '' : "class='disabled'";
$actionLink = $this->createLink('bug', 'batchConfirm');
$misc = common::hasPriv('bug', 'batchConfirm') ? "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"" : '';
$misc = $canBatchConfirm ? "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"" : '';
echo "<li $class>" . html::a('javascript:;', $lang->bug->confirmBug, '', $misc) . "</li>";
$class = common::hasPriv('bug', 'batchClose') ? '' : "class='disabled'";
$class = $canBatchClose ? '' : "class='disabled'";
$actionLink = $this->createLink('bug', 'batchClose');
$misc = common::hasPriv('bug', 'batchClose') ? "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"" : '';
$misc = $canBatchClose ? "onclick=\"setFormAction('$actionLink', 'hiddenwin')\"" : '';
echo "<li $class>" . html::a('javascript:;', $lang->bug->close, '', $misc) . "</li>";
$class = common::hasPriv('bug', 'batchActivate') ? '' : "class='disabled'";
$class = $canBatchActivate ? '' : "class='disabled'";
$actionLink = $this->createLink('bug', 'batchActivate', "productID=$productID&branch=$branch");
$misc = common::hasPriv('bug', 'batchActivate') ? "onclick=\"setFormAction('$actionLink')\"" : '';
$misc = $canBatchActivate ? "onclick=\"setFormAction('$actionLink')\"" : '';
echo "<li $class>" . html::a('javascript:;', $lang->bug->activate, '', $misc) . "</li>";
$misc = common::hasPriv('bug', 'batchResolve') ? "id='resolveItem'" : '';
$misc = $canBatchResolve ? "id='resolveItem'" : '';
if($misc)
{
echo "<li class='dropdown-submenu'>" . html::a('javascript:;', $lang->bug->resolve, '', $misc);
@@ -302,7 +315,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
?>
</ul>
</div>
<?php if(common::hasPriv('bug', 'batchChangeBranch') and $this->session->currentProductType != 'normal'):?>
<?php if($canBatchChangeBranch and $this->session->currentProductType != 'normal'):?>
<div class="btn-group dropup">
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->product->branchName[$this->session->currentProductType];?> <span class="caret"></span></button>
<?php $withSearch = count($branches) > 8;?>
@@ -330,7 +343,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
</div>
</div>
<?php endif;?>
<?php if(common::hasPriv('bug', 'batchChangeModule')):?>
<?php if($canBatchChangeModule):?>
<div class="btn-group dropup">
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->bug->moduleAB;?> <span class="caret"></span></button>
<?php $withSearch = count($modules) > 8;?>
@@ -358,7 +371,7 @@ $currentBrowseType = isset($lang->bug->mySelects[$browseType]) && in_array($brow
</div>
</div>
<?php endif;?>
<?php if(common::hasPriv('bug', 'batchAssignTo')):?>
<?php if($canBatchAssignTo):?>
<div class="btn-group dropup">
<button data-toggle="dropdown" type="button" class="btn"><?php echo $lang->bug->assignedTo;?> <span class="caret"></span></button>
<?php $withSearch = count($memberPairs) > 10;?>