* Modify version judgment logic.
This commit is contained in:
@@ -733,7 +733,7 @@ class actionModel extends model
|
||||
{
|
||||
$desc = $this->lang->$objectType->action->changebychild;
|
||||
}
|
||||
elseif(isset($this->config->maxVersion) and strpos($this->config->action->assetType, $action->objectType) !== false and $action->action == 'approved')
|
||||
elseif($this->config->edition != 'open' and strpos($this->config->action->assetType, $action->objectType) !== false and $action->action == 'approved')
|
||||
{
|
||||
$desc = empty($this->lang->action->approve->{$action->extra}) ? '' : $this->lang->action->approve->{$action->extra};
|
||||
}
|
||||
@@ -1232,7 +1232,7 @@ class actionModel extends model
|
||||
if(is_array($objectLabel) and isset($objectLabel[$actionType])) $actionObjectLabel = $objectLabel[$actionType];
|
||||
}
|
||||
|
||||
if(isset($this->config->maxVersion) and $objectType == 'assetlib')
|
||||
if($this->config->edition != 'open' and $objectType == 'assetlib')
|
||||
{
|
||||
$libType = $this->dao->select('type')->from(TABLE_ASSETLIB)->where('id')->eq($objectID)->fetch('type');
|
||||
if(strpos('story,issue,risk,opportunity,practice,component', $libType) !== false) $actionObjectLabel = $this->lang->action->label->{$libType . 'assetlib'};
|
||||
@@ -1265,7 +1265,7 @@ class actionModel extends model
|
||||
$action->objectLabel = $objectLabel;
|
||||
$action->product = trim($action->product, ',');
|
||||
|
||||
if(isset($this->config->maxVersion)
|
||||
if($this->config->edition != 'open'
|
||||
and strpos($this->config->action->assetType, $action->objectType) !== false
|
||||
and empty($action->project) and empty($action->product) and empty($action->execution))
|
||||
{
|
||||
|
||||
@@ -1706,9 +1706,9 @@ class block extends control
|
||||
if(common::hasPriv('todo', 'view')) $hasViewPriv['todo'] = true;
|
||||
if(common::hasPriv('task', 'view')) $hasViewPriv['task'] = true;
|
||||
if(common::hasPriv('bug', 'view')) $hasViewPriv['bug'] = true;
|
||||
if(common::hasPriv('risk', 'view') and isset($this->config->maxVersion)) $hasViewPriv['risk'] = true;
|
||||
if(common::hasPriv('issue', 'view') and isset($this->config->maxVersion)) $hasViewPriv['issue'] = true;
|
||||
if(common::hasPriv('meeting', 'view') and isset($this->config->maxVersion)) $hasViewPriv['meeting'] = true;
|
||||
if(common::hasPriv('risk', 'view') and $this->config->edition == 'max') $hasViewPriv['risk'] = true;
|
||||
if(common::hasPriv('issue', 'view') and $this->config->edition == 'max') $hasViewPriv['issue'] = true;
|
||||
if(common::hasPriv('meeting', 'view') and $this->config->edition == 'max') $hasViewPriv['meeting'] = true;
|
||||
if(common::hasPriv('story', 'view')) $hasViewPriv['story'] = true;
|
||||
|
||||
$params = $this->get->param;
|
||||
@@ -1716,7 +1716,7 @@ class block extends control
|
||||
$count = array();
|
||||
$objectList = array('todo' => 'todos', 'task' => 'tasks', 'bug' => 'bugs', 'story' => 'stories');
|
||||
$objectCountList = array('todo' => 'todoCount', 'task' => 'taskCount', 'bug' => 'bugCount', 'story' => 'storyCount');
|
||||
if(isset($this->config->maxVersion))
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
$objectList += array('risk' => 'risks', 'issue' => 'issues');
|
||||
$objectCountList += array('risk' => 'riskCount', 'issue' => 'issueCount');
|
||||
|
||||
@@ -750,7 +750,7 @@ class blockModel extends model
|
||||
$params->bugCount['default'] = 20;
|
||||
$params->bugCount['control'] = 'input';
|
||||
|
||||
if(isset($this->config->maxVersion))
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
$params->riskCount['name'] = $this->lang->block->riskCount;
|
||||
$params->riskCount['default'] = 20;
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
<div class="tile-title"><?php echo $lang->block->createdCases;?></div>
|
||||
<div class="tile-amount"><?php echo empty($data['createdCases']) ? 0 : html::a($this->createLink('my', 'contribute', 'mode=testcase&type=openedbyme'), (int)$data['createdCases']);?></div>
|
||||
</div>
|
||||
<?php if(isset($config->maxVersion)):?>
|
||||
<?php if($this->config->edition == 'max'):?>
|
||||
<div class="col-xs-4 tile">
|
||||
<div class="tile-title"><?php echo $lang->block->createdRisks;?></div>
|
||||
<div class="tile-amount"><?php echo empty($data['createdRisks']) ? 0 : html::a($this->createLink('my', 'contribute', 'mode=risk'), (int)$data['createdRisks']);?></div>
|
||||
|
||||
@@ -44,7 +44,7 @@
|
||||
<div class='col'>
|
||||
<div class='panel-content'>
|
||||
<div class='panel-heading not-move-handler'>
|
||||
<?php if(isset($config->maxVersion)):?>
|
||||
<?php if($this->config->edition == 'max'):?>
|
||||
<?php if($project->model === 'waterfall'): ?>
|
||||
<span class='project-type-label label label-warning label-outline'><?php echo $lang->project->waterfall; ?></span>
|
||||
<?php else: ?>
|
||||
|
||||
@@ -2113,7 +2113,7 @@ class bug extends control
|
||||
}
|
||||
|
||||
if(!(in_array('platform', $productsType) or in_array('branch', $productsType))) unset($fields['branch']);// If products's type are normal, unset branch field.
|
||||
if(isset($this->config->bizVersion)) list($fields, $bugs) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $bugs);
|
||||
if($this->config->edition != 'open') list($fields, $bugs) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $bugs);
|
||||
|
||||
$this->post->set('fields', $fields);
|
||||
$this->post->set('rows', $bugs);
|
||||
|
||||
@@ -2840,7 +2840,7 @@ class bugModel extends model
|
||||
if(strpos(',type,execution,story,plan,task,openedBuild,', ",{$id},") !== false) $class .= ' text-ellipsis';
|
||||
|
||||
echo "<td class='" . $class . "' $title>";
|
||||
if(isset($this->config->bizVersion)) $this->loadModel('flow')->printFlowCell('bug', $bug, $id);
|
||||
if($this->config->edition != 'open') $this->loadModel('flow')->printFlowCell('bug', $bug, $id);
|
||||
switch($id)
|
||||
{
|
||||
case 'id':
|
||||
|
||||
@@ -527,7 +527,7 @@ class commonModel extends model
|
||||
/* Check whether the creation permission is available, and print create buttons. */
|
||||
foreach($lang->createIcons as $objectType => $objectIcon)
|
||||
{
|
||||
if(!isset($config->proVersion) and $objectType == 'effort') continue;
|
||||
if($this->config->edition == 'open' and $objectType == 'effort') continue;
|
||||
if($config->systemMode == 'classic' and strpos('project|program', $objectType) !== false) continue;
|
||||
if(!empty($_COOKIE['feedbackView']) and strpos('todo|effort', $objectType) === false) continue;
|
||||
|
||||
@@ -1780,7 +1780,7 @@ EOD;
|
||||
* 当主状态改变并且未设置子状态的值时把子状态的值设置为默认值并记录日志。
|
||||
* Change sub status when status is changed and sub status is not set, and record the changes.
|
||||
*/
|
||||
if(isset($config->bizVersion))
|
||||
if($this->config->edition != 'open')
|
||||
{
|
||||
$oldID = zget($old, 'id', '');
|
||||
$oldStatus = zget($old, 'status', '');
|
||||
|
||||
@@ -528,7 +528,7 @@ class custom extends control
|
||||
{
|
||||
$this->custom->setConcept();
|
||||
$this->loadModel('setting')->setItem('system.custom.URAndSR', $this->post->URAndSR);
|
||||
if(!isset($this->config->maxVersion)) $this->loadModel('setting')->setItem('system.custom.hourPoint', $this->post->hourPoint);
|
||||
if($this->config->edition != 'max') $this->loadModel('setting')->setItem('system.custom.hourPoint', $this->post->hourPoint);
|
||||
|
||||
$this->app->loadLang('common');
|
||||
$locate = $this->config->systemMode == 'new' ? inlink('flow') : 'top';
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
<label><?php echo $lang->custom->conceptQuestions['URAndSR']?></label>
|
||||
<div class="checkbox"> <?php echo html::radio('URAndSR', $lang->custom->conceptOptions->URAndSR, zget($this->config->custom, 'URAndSR', '0'));?></div>
|
||||
</div>
|
||||
<?php if(!isset($config->maxVersion)):?>
|
||||
<?php if($this->config->edition != 'max'):?>
|
||||
<div class="form-group">
|
||||
<label id='storypoint'><?php echo $lang->custom->conceptQuestions['storypoint'];?></label>
|
||||
<div class="checkbox"> <?php echo html::radio('hourPoint', $lang->custom->conceptOptions->hourPoint, zget($this->config->custom, 'hourPoint'))?> </div>
|
||||
|
||||
@@ -36,7 +36,7 @@ class datatableModel extends model
|
||||
$this->config->$module->datatable->fieldList[$field]['title'] = $title;
|
||||
}
|
||||
|
||||
if(isset($this->config->bizVersion))
|
||||
if($this->config->edition != 'open')
|
||||
{
|
||||
$fields = $this->loadModel('workflowfield')->getList($module);
|
||||
foreach($fields as $field)
|
||||
|
||||
@@ -78,7 +78,7 @@ class design extends control
|
||||
|
||||
/* Print top and right actions. */
|
||||
$this->lang->TRActions = '<div class="btn-toolbar pull-right">';
|
||||
if(isset($this->config->maxVersion) and common::hasPriv('design', 'submit'))
|
||||
if($this->config->edition == 'max' and common::hasPriv('design', 'submit'))
|
||||
{
|
||||
$this->lang->TRActions .= '<div class="btn-group">';
|
||||
$this->lang->TRActions .= html::a($this->createLink('design', 'submit', "productID=$productID", '', true), "<i class='icon-plus'></i> {$this->lang->design->submit}", '', "class='btn btn-secondary iframe'");
|
||||
|
||||
@@ -1507,7 +1507,7 @@ class docModel extends model
|
||||
}
|
||||
elseif($type == 'project')
|
||||
{
|
||||
if(isset($this->config->maxVersion))
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
$issueIdList = $this->dao->select('id')->from(TABLE_ISSUE)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get();
|
||||
$meetingIdList = $this->dao->select('id')->from(TABLE_MEETING)->where('project')->eq($objectID)->andWhere('deleted')->eq('0')->andWhere('project')->in($this->app->user->view->projects)->get();
|
||||
|
||||
@@ -41,7 +41,7 @@ $sessionString .= session_name() . '=' . session_id();
|
||||
<a data-url="<?php echo $this->createLink('doc', 'collect', "objectID=$doc->id&objectType=doc");?>" title="<?php echo $lang->doc->collect;?>" class='ajaxCollect btn btn-link'><i class='icon <?php echo $star;?>'></i></a>
|
||||
<?php endif;?>
|
||||
|
||||
<?php if(isset($this->config->maxVersion) and $this->app->tab == 'project'):?>
|
||||
<?php if($this->config->edition == 'max' and $this->app->tab == 'project'):?>
|
||||
<?php
|
||||
$canImportToPracticeLib = common::hasPriv('doc', 'importToPracticeLib');
|
||||
$canImportToComponentLib = common::hasPriv('doc', 'importToComponentLib');
|
||||
@@ -199,7 +199,7 @@ $sessionString .= session_name() . '=' . session_id();
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if(isset($this->config->maxVersion)):?>
|
||||
<?php if($this->config->edition == 'max'):?>
|
||||
<div class="modal fade" id="importToPracticeLib">
|
||||
<div class="modal-dialog mw-500px">
|
||||
<div class="modal-content">
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->doc->create;?></h2>
|
||||
</div>
|
||||
<?php if(isset($this->config->bizVersion)):?>
|
||||
<?php if($this->config->edition != 'open'):?>
|
||||
<div class='alert alert-warning strong'>
|
||||
<?php printf($lang->doc->notSetOffice, zget($lang->doc->typeList, $docType), common::hasPriv('custom', 'libreoffice') ? $this->createLink('custom', 'libreoffice') : '###');?>
|
||||
</div>
|
||||
|
||||
@@ -3364,7 +3364,7 @@ class execution extends control
|
||||
if(strpos(",$checkedItem,", ",{$execution->id},") === false) unset($executionStats[$i]);
|
||||
}
|
||||
}
|
||||
if(isset($this->config->bizVersion)) list($fields, $executionStats) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $executionStats);
|
||||
if($this->config->edition != 'open') list($fields, $executionStats) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $executionStats);
|
||||
|
||||
$this->post->set('fields', $fields);
|
||||
$this->post->set('rows', $executionStats);
|
||||
|
||||
@@ -333,7 +333,7 @@ class executionModel extends model
|
||||
if(!empty($sprint->percent)) $this->checkWorkload('create', $sprint->percent);
|
||||
|
||||
/* Set planDuration and realDuration. */
|
||||
if(isset($this->config->maxVersion))
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
$sprint->planDuration = $this->loadModel('programplan')->getDuration($sprint->begin, $sprint->end);
|
||||
if(!empty($sprint->realBegan) and !empty($sprint->realEnd)) $sprint->realDuration = $this->loadModel('programplan')->getDuration($sprint->realBegan, $sprint->realEnd);
|
||||
@@ -484,7 +484,7 @@ class executionModel extends model
|
||||
if(!empty($execution->percent)) $this->checkWorkload('update', $execution->percent, $oldExecution);
|
||||
|
||||
/* Set planDuration and realDuration. */
|
||||
if(isset($this->config->maxVersion))
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
$execution->planDuration = $this->loadModel('programplan')->getDuration($execution->begin, $execution->end);
|
||||
if(!empty($execution->realBegan) and !empty($execution->realEnd)) $execution->realDuration = $this->programplan->getDuration($execution->realBegan, $execution->realEnd);
|
||||
|
||||
@@ -552,7 +552,7 @@ class installModel extends model
|
||||
$this->dao->update(TABLE_STAGE)->set('name')->eq($value)->where('`type`')->eq($key)->exec();
|
||||
}
|
||||
|
||||
if(!empty($this->config->bizVersion))
|
||||
if($this->config->edition != 'open')
|
||||
{
|
||||
/* Update flowdatasource by lang. */
|
||||
foreach($this->lang->install->workflowdatasource as $id => $name)
|
||||
@@ -567,7 +567,7 @@ class installModel extends model
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($this->config->maxVersion))
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
/* Update process by lang. */
|
||||
foreach($this->lang->install->processList as $id => $name)
|
||||
|
||||
@@ -153,7 +153,7 @@ class my extends control
|
||||
$reviewCount = 0;
|
||||
$ncCount = 0;
|
||||
$meetingCount = 0;
|
||||
$isMax = isset($this->config->maxVersion) ? 1 : 0;
|
||||
$isMax = $this->config->edition == 'max' ? 1 : 0;
|
||||
if($isMax)
|
||||
{
|
||||
$this->loadModel('issue');
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
<?php $tab = '';?>
|
||||
<?php if($action->objectType == 'meeting') $tab = $action->project ? "data-app='project'" : "data-app='my'";?>
|
||||
<?php
|
||||
if((isset($config->maxVersion) and strpos($config->action->assetType, $action->objectType) !== false) and empty($action->objectName))
|
||||
if(($this->config->edition == 'max' and strpos($config->action->assetType, $action->objectType) !== false) and empty($action->objectName))
|
||||
{
|
||||
echo '#' . $action->objectID;
|
||||
}
|
||||
|
||||
@@ -130,7 +130,7 @@ class personnelModel extends model
|
||||
$executionPairs = $this->getInvolvedExecutions($projects);
|
||||
$taskInvest = $this->getProjectTaskInvest($projects, $accountPairs);
|
||||
$bugAndStoryInvest = $this->getBugAndStoryInvest($accountPairs, $programID);
|
||||
if(isset($this->config->maxVersion))
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
$issueInvest = $this->getIssueInvest($accountPairs, $projects);
|
||||
$riskInvest = $this->getRiskInvest($accountPairs, $projects);
|
||||
@@ -151,7 +151,7 @@ class personnelModel extends model
|
||||
|
||||
$personnelList[$account] += $taskInvest[$account];
|
||||
$personnelList[$account] += $bugAndStoryInvest[$account];
|
||||
if(isset($this->config->maxVersion))
|
||||
if($this->config->edition == 'max')
|
||||
{
|
||||
$personnelList[$account] += $issueInvest[$account];
|
||||
$personnelList[$account] += $riskInvest[$account];
|
||||
@@ -375,7 +375,7 @@ class personnelModel extends model
|
||||
|
||||
/* The number of hours per person. */
|
||||
$userHours = array();
|
||||
if(isset($this->config->qcVersion) || isset($this->config->proVersion) || isset($this->config->bizVersion))
|
||||
if($this->config->edition != 'open')
|
||||
{
|
||||
$userHours = $this->getUserEffortHours($userTasks);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<th colspan="3"><?php echo $lang->personnel->task;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->bug;?></th>
|
||||
<th <?php echo $config->URAndSR ? "colspan='2'" : "rowspan='2'";?> class="c-story"><?php echo $lang->personnel->createStories;?></th>
|
||||
<?php if(isset($this->config->maxVersion)): ?>
|
||||
<?php if($this->config->edition == 'max'): ?>
|
||||
<th colspan="3"><?php echo $lang->personnel->issue;?></th>
|
||||
<th colspan="3"><?php echo $lang->personnel->risk;?></th>
|
||||
<?php endif;?>
|
||||
@@ -47,7 +47,7 @@
|
||||
<th><?php echo $lang->personnel->UR;?></th>
|
||||
<th><?php echo $lang->personnel->SR;?></th>
|
||||
<?php endif;?>
|
||||
<?php if(isset($this->config->maxVersion)): ?>
|
||||
<?php if($this->config->edition == 'max'): ?>
|
||||
<th><?php echo $lang->personnel->created;?></th>
|
||||
<th><?php echo $lang->personnel->resolved;?></th>
|
||||
<th><?php echo $lang->personnel->wait;?></th>
|
||||
@@ -76,7 +76,7 @@
|
||||
<td><?php echo $personnel['UR'];?></td>
|
||||
<?php endif;?>
|
||||
<td><?php echo $personnel['SR'];?></td>
|
||||
<?php if(isset($this->config->maxVersion)): ?>
|
||||
<?php if($this->config->edition == 'max'): ?>
|
||||
<td><?php echo $personnel['createdIssue'];?></td>
|
||||
<td><?php echo $personnel['resolvedIssue'];?></td>
|
||||
<td><?php echo $personnel['pendingIssue'];?></td>
|
||||
|
||||
@@ -1417,7 +1417,7 @@ class product extends control
|
||||
if(strpos(",$checkedItem,", ",{$product->id},") === false) unset($productStats[$i]);
|
||||
}
|
||||
}
|
||||
if(isset($this->config->bizVersion)) list($fields, $productStats) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $productStats);
|
||||
if($this->config->edition != 'open') list($fields, $productStats) = $this->loadModel('workflowfield')->appendDataFromFlow($fields, $productStats);
|
||||
|
||||
if(isset($rowspan)) $this->post->set('rowspan', $rowspan);
|
||||
$this->post->set('fields', $fields);
|
||||
|
||||
@@ -52,12 +52,12 @@
|
||||
<tr>
|
||||
<th><i class="icon icon-person icon-sm"></i> <?php echo $lang->product->qa;?></th>
|
||||
<td><strong><?php echo zget($users, $product->QD);?></strong></td>
|
||||
<?php if(!isset($config->bizVersion)):?>
|
||||
<?php if($this->config->edition == 'open'):?>
|
||||
<th><i class="icon icon-person icon-sm"></i> <?php echo $lang->product->reviewer;?></th>
|
||||
<td><strong><?php foreach($reviewers as $reviewer) echo zget($users, $reviewer) . " ";?></strong></td>
|
||||
<?php endif;?>
|
||||
</tr>
|
||||
<?php if(isset($config->bizVersion)):?>
|
||||
<?php if($this->config->edition != 'open'):?>
|
||||
<tr>
|
||||
<th><i class="icon icon-person icon-sm"></i> <?php echo $lang->product->reviewer;?></th>
|
||||
<td><strong><?php foreach($reviewers as $reviewer) echo zget($users, $reviewer) . " ";?></strong></td>
|
||||
|
||||
Reference in New Issue
Block a user