Merge branch 'zentaopms_239' of https://gitlab.zcorp.cc/easycorp/zentaopms into zentaopms_239
This commit is contained in:
+28
-11
@@ -1753,16 +1753,21 @@ class block extends control
|
||||
*/
|
||||
public function printAssignToMeBlock($longBlock = true)
|
||||
{
|
||||
$hasWaterfall = strpos(",{$this->config->disabledFeatures},", ',waterfall,') === false;
|
||||
$hasIssue = strpos(",{$this->config->disabledFeatures},", ',scrumIssue,') === false or $hasWaterfall;
|
||||
$hasRisk = strpos(",{$this->config->disabledFeatures},", ',scrumRisk,') === false or $hasWaterfall;
|
||||
$hasMeeting = strpos(",{$this->config->disabledFeatures},", ',scrumMeeting,') === false or $hasWaterfall;
|
||||
|
||||
$hasViewPriv = array();
|
||||
if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true;
|
||||
if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true;
|
||||
if(common::hasPriv('bug', 'view') and $this->config->vision != 'lite') $hasViewPriv['bug'] = true;
|
||||
if($this->config->URAndSR and common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['requirement'] = true;
|
||||
if(common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['story'] = true;
|
||||
if(common::hasPriv('risk', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['risk'] = true;
|
||||
if(common::hasPriv('issue', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['issue'] = true;
|
||||
if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite') $hasViewPriv['meeting'] = true;
|
||||
if(common::hasPriv('feedback', 'view') and in_array($this->config->edition, array('max', 'biz'))) $hasViewPriv['feedback'] = true;
|
||||
if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true;
|
||||
if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true;
|
||||
if(common::hasPriv('bug', 'view') and $this->config->vision != 'lite') $hasViewPriv['bug'] = true;
|
||||
if($this->config->URAndSR and common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['requirement'] = true;
|
||||
if(common::hasPriv('story', 'view') and $this->config->vision != 'lite') $hasViewPriv['story'] = true;
|
||||
if(common::hasPriv('risk', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite' && $hasRisk) $hasViewPriv['risk'] = true;
|
||||
if(common::hasPriv('issue', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite' && $hasIssue) $hasViewPriv['issue'] = true;
|
||||
if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max' and $this->config->vision != 'lite' && $hasMeeting) $hasViewPriv['meeting'] = true;
|
||||
if(common::hasPriv('feedback', 'view') and in_array($this->config->edition, array('max', 'biz'))) $hasViewPriv['feedback'] = true;
|
||||
|
||||
$params = $this->get->param;
|
||||
$params = json_decode(base64_decode($params));
|
||||
@@ -1771,8 +1776,20 @@ class block extends control
|
||||
$objectCountList = array('todo' => 'todoCount', 'task' => 'taskCount', 'bug' => 'bugCount', 'story' => 'storyCount', 'requirement' => 'requirementCount');
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
$objectList += array('risk' => 'risks', 'issue' => 'issues', 'feedback' => 'feedbacks');
|
||||
$objectCountList += array('risk' => 'riskCount', 'issue' => 'issueCount', 'feedback' => 'feedbackCount');
|
||||
if($hasRisk)
|
||||
{
|
||||
$objectList += array('risk' => 'risks');
|
||||
$objectCountList += array('risk' => 'riskCount');
|
||||
}
|
||||
|
||||
if($hasIssue)
|
||||
{
|
||||
$objectList += array('issue' => 'issues');
|
||||
$objectCountList += array('issue' => 'issueCount');
|
||||
}
|
||||
|
||||
$objectList += array('feedback' => 'feedbacks');
|
||||
$objectCountList += array('feedback' => 'feedbackCount');
|
||||
}
|
||||
|
||||
if($this->config->edition == 'biz')
|
||||
|
||||
+23
-9
@@ -774,6 +774,11 @@ class blockModel extends model
|
||||
*/
|
||||
public function getAssignToMeParams()
|
||||
{
|
||||
$hasWaterfall = strpos(",{$this->config->disabledFeatures},", ',waterfall,') === false;
|
||||
$hasIssue = strpos(",{$this->config->disabledFeatures},", ',scrumIssue,') === false or $hasWaterfall;
|
||||
$hasRisk = strpos(",{$this->config->disabledFeatures},", ',scrumRisk,') === false or $hasWaterfall;
|
||||
$hasMeeting = strpos(",{$this->config->disabledFeatures},", ',scrumMeeting,') === false or $hasWaterfall;
|
||||
|
||||
$params = new stdclass();
|
||||
$params->todoCount['name'] = $this->lang->block->todoCount;
|
||||
$params->todoCount['default'] = 20;
|
||||
@@ -789,17 +794,26 @@ class blockModel extends model
|
||||
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
$params->riskCount['name'] = $this->lang->block->riskCount;
|
||||
$params->riskCount['default'] = 20;
|
||||
$params->riskCount['control'] = 'input';
|
||||
if($hasRisk)
|
||||
{
|
||||
$params->riskCount['name'] = $this->lang->block->riskCount;
|
||||
$params->riskCount['default'] = 20;
|
||||
$params->riskCount['control'] = 'input';
|
||||
}
|
||||
|
||||
$params->issueCount['name'] = $this->lang->block->issueCount;
|
||||
$params->issueCount['default'] = 20;
|
||||
$params->issueCount['control'] = 'input';
|
||||
if($hasIssue)
|
||||
{
|
||||
$params->issueCount['name'] = $this->lang->block->issueCount;
|
||||
$params->issueCount['default'] = 20;
|
||||
$params->issueCount['control'] = 'input';
|
||||
}
|
||||
|
||||
$params->meetingCount['name'] = $this->lang->block->meetingCount;
|
||||
$params->meetingCount['default'] = 20;
|
||||
$params->meetingCount['control'] = 'input';
|
||||
if($hasMeeting)
|
||||
{
|
||||
$params->meetingCount['name'] = $this->lang->block->meetingCount;
|
||||
$params->meetingCount['default'] = 20;
|
||||
$params->meetingCount['control'] = 'input';
|
||||
}
|
||||
|
||||
$params->feedbackCount['name'] = $this->lang->block->feedbackCount;
|
||||
$params->feedbackCount['default'] = 20;
|
||||
|
||||
@@ -1199,16 +1199,16 @@ class kanban extends control
|
||||
$selectedProductID = empty($selectedProductID) ? key($productPairs) : $selectedProductID;
|
||||
|
||||
/* Waterfall project has no plan. */
|
||||
$waterfallProducts = $this->dao->select('t1.product')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
$excludeProducts = $this->dao->select('t1.product')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->where('t2.type')->eq('project')
|
||||
->andWhere('t2.model')->eq('waterfall')
|
||||
->andWhere('t2.model')->ne('scrum')
|
||||
->andWhere('t2.hasProduct')->eq('0')
|
||||
->fetchPairs();
|
||||
|
||||
foreach($productPairs as $id => $name)
|
||||
{
|
||||
if(isset($waterfallProducts[$id])) unset($productPairs[$id]);
|
||||
if(isset($excludeProducts[$id])) unset($productPairs[$id]);
|
||||
}
|
||||
|
||||
$this->view->products = $productPairs;
|
||||
|
||||
@@ -2636,7 +2636,7 @@ class projectModel extends model
|
||||
|
||||
common::setMenuVars('project', $objectID);
|
||||
|
||||
$this->setNomultipleMenu($objectID);
|
||||
$this->setNoMultipleMenu($objectID);
|
||||
return $objectID;
|
||||
}
|
||||
|
||||
|
||||
@@ -554,7 +554,7 @@ class story extends control
|
||||
}
|
||||
|
||||
/* Project or execution linked stories. */
|
||||
if($executionID and $storyType == 'story')
|
||||
if($executionID)
|
||||
{
|
||||
$products = array();
|
||||
foreach($mails as $story) $products[$story->storyID] = $productID;
|
||||
|
||||
@@ -7,7 +7,7 @@ $(function()
|
||||
if(typeof(execution) != 'undefined') rawModule = 'projectstory';
|
||||
if(['project', 'projectstory'].indexOf(rawModule) === -1 && app != 'qa')
|
||||
{
|
||||
if(app != 'my') $('#navbar .nav li[data-id!=story]').removeClass('active');
|
||||
if(app != 'my') $('#navbar .nav li[data-id!=' + storyType + ']').removeClass('active');
|
||||
$("#navbar .nav li[data-id=" + storyType + ']').addClass('active');
|
||||
$('#subNavbar li[data-id="' + storyType + '"]').addClass('active');
|
||||
if($('#navbar .nav>li[data-id=story] .dropdown-menu').length) $('#navbar .nav>li[data-id=story]>a').html($('.active [data-id=' + storyType + ']').text() + '<span class="caret"></span>');
|
||||
|
||||
@@ -300,7 +300,7 @@ class storyModel extends model
|
||||
}
|
||||
|
||||
/* Project or execution linked story. */
|
||||
if($executionID != 0 and $story->type == 'story')
|
||||
if($executionID != 0)
|
||||
{
|
||||
$this->linkStory($executionID, $this->post->product, $storyID);
|
||||
if($this->config->systemMode == 'new' and $executionID != $this->session->project) $this->linkStory($this->session->project, $this->post->product, $storyID);
|
||||
@@ -4932,7 +4932,7 @@ class storyModel extends model
|
||||
echo $story->version;
|
||||
break;
|
||||
case 'actions':
|
||||
if($tab == 'execution' || !$this->session->multiple)
|
||||
if($tab == 'execution' || ($tab == 'project' && isset($_SESSION['multiple']) && empty($_SESSION['multiple'])))
|
||||
{
|
||||
$menuType = 'execution';
|
||||
}
|
||||
|
||||
@@ -146,7 +146,7 @@
|
||||
<td><?php echo common::hasPriv('caselib', 'browse') ? html::a($this->createLink('caselib', 'browse', "libID=$case->lib"), $libName) : $libName;?></td>
|
||||
</tr>
|
||||
<?php else:?>
|
||||
<tr class='<?php if(!$product->shadow) echo 'hide';?>'>
|
||||
<tr class='<?php if($product->shadow) echo 'hide';?>'>
|
||||
<th class='thWidth'><?php echo $lang->testcase->product;?></th>
|
||||
<td><?php echo (common::hasPriv('product', 'browse') and $productName) ? html::a($this->createLink('product', 'browse', "productID=$case->product"), $productName) : $productName;?></td>
|
||||
</tr>
|
||||
@@ -158,7 +158,7 @@
|
||||
<?php endif;?>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<th><?php echo $lang->testcase->module;?></th>
|
||||
<th class='thWidth'><?php echo $lang->testcase->module;?></th>
|
||||
<td>
|
||||
<?php
|
||||
if(empty($modulePath))
|
||||
|
||||
Reference in New Issue
Block a user