Merge branch 'zentaopms_239_task_#74859' into 'zentaopms_239'
* Finish task #74859. See merge request easycorp/zentaopms!6049
This commit is contained in:
@@ -226,7 +226,7 @@ class router extends baseRouter
|
||||
|
||||
/* User preference init. */
|
||||
$config->URSR = $URSR;
|
||||
$config->URAndSR = ($URAndSR and strpos(",{$config->disabledFeatures},", ',productURStory,') === false);
|
||||
$config->URAndSR = ($URAndSR and strpos(",{$config->disabledFeatures},", ',productUR,') === false);
|
||||
$config->programLink = 'program-browse';
|
||||
$config->productLink = 'product-all';
|
||||
$config->projectLink = 'project-browse';
|
||||
|
||||
@@ -22,7 +22,8 @@ $config->custom->requiredModules[35] = 'execution';
|
||||
$config->custom->requiredModules[40] = 'task';
|
||||
$config->custom->requiredModules[45] = 'build';
|
||||
|
||||
$config->custom->features = array('waterfall', 'productURStory', 'scrumOpportunity', 'scrumMeeting', 'scrumAuditplan', 'scrumProcess', 'scrumIssue', 'scrumRisk', 'assetlib');
|
||||
$config->custom->allFeatures = array('program', 'productRR', 'productUR', 'productLine', 'projectScrum', 'projectWaterfall', 'projectKanban', 'execution', 'vision');
|
||||
$config->custom->features = array('waterfall', 'productUR');
|
||||
|
||||
$config->custom->requiredModules[50] = 'bug';
|
||||
$config->custom->requiredModules[55] = 'testcase';
|
||||
|
||||
@@ -644,14 +644,48 @@ class custom extends control
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'top'));
|
||||
}
|
||||
|
||||
$disabledFeatures = array('program', 'productLine');
|
||||
foreach($this->config->custom->features as $feature)
|
||||
{
|
||||
$function = 'has' . ucfirst($feature) . 'Data';
|
||||
if(!$this->custom->$function())
|
||||
{
|
||||
if(strpos($feature, 'scrum') !== false)
|
||||
{
|
||||
$disabledFeatures['scrum'][] = $feature;
|
||||
}
|
||||
else
|
||||
{
|
||||
$disabledFeatures[] = $feature;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$enabledScrumFeatures = array();
|
||||
$disabledScrumFeatures = array();
|
||||
foreach($this->config->custom->scrumFeatures as $scrumFeature)
|
||||
{
|
||||
if(in_array('scrum' . ucfirst($scrumFeature), $disabledFeatures['scrum']))
|
||||
{
|
||||
$disabledScrumFeatures[] = $this->lang->custom->scrum->features[$scrumFeature];
|
||||
}
|
||||
else
|
||||
{
|
||||
$enabledScrumFeatures[] = $this->lang->custom->scrum->features[$scrumFeature];
|
||||
}
|
||||
}
|
||||
|
||||
$this->app->loadLang('upgrade');
|
||||
|
||||
$this->view->title = $this->lang->custom->mode;
|
||||
$this->view->position[] = $this->lang->custom->common;
|
||||
$this->view->position[] = $this->view->title;
|
||||
$this->view->mode = $mode;
|
||||
$this->view->programs = $this->loadModel('program')->getTopPairs('', 'noclosed', true);
|
||||
$this->view->programID = isset($this->config->global->defaultProgram) ? $this->config->global->defaultProgram : 0;
|
||||
$this->view->title = $this->lang->custom->mode;
|
||||
$this->view->position[] = $this->lang->custom->common;
|
||||
$this->view->position[] = $this->view->title;
|
||||
$this->view->mode = $mode;
|
||||
$this->view->programs = $this->loadModel('program')->getTopPairs('', 'noclosed', true);
|
||||
$this->view->programID = isset($this->config->global->defaultProgram) ? $this->config->global->defaultProgram : 0;
|
||||
$this->view->disabledFeatures = $disabledFeatures;
|
||||
$this->view->enabledScrumFeatures = implode($this->lang->comma, $enabledScrumFeatures);
|
||||
$this->view->disabledScrumFeatures = implode($this->lang->comma, $disabledScrumFeatures);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -916,7 +916,7 @@ class customModel extends model
|
||||
* @access public
|
||||
* @return int
|
||||
*/
|
||||
public function hasProductURStoryData()
|
||||
public function hasProductURData()
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_STORY)->where('type')->eq('requirement')->andWhere('deleted')->eq('0')->count();
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
<div class="checkbox"> <?php echo html::radio('sprintConcept', $lang->custom->sprintConceptList, zget($this->config->custom, 'sprintConcept', '0'))?> </div>
|
||||
</div>
|
||||
</li>
|
||||
<?php if(strpos(",{$this->config->disabledFeatures},", ',productURStory,') === false):?>
|
||||
<?php if(strpos(",{$this->config->disabledFeatures},", ',productUR,') === false):?>
|
||||
<li>
|
||||
<div class="form-group">
|
||||
<label><?php echo $lang->custom->conceptQuestions['URAndSR']?></label>
|
||||
|
||||
@@ -44,72 +44,33 @@
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td><?php echo $this->lang->upgrade->program;?></td>
|
||||
<td class="text-center"><i class="icon text-red text-red icon-close"></i></td>
|
||||
<td class="text-center"><i class="icon text-success text-success icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $this->lang->upgrade->productRR;?></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $this->lang->upgrade->productUR;?></td>
|
||||
<td class="text-center"><i class="icon text-red icon-close"></i></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $this->lang->upgrade->productLine;?></td>
|
||||
<td class="text-center"><i class="icon text-red icon-close"></i></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $this->lang->upgrade->projectScrum;?></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
</tr>
|
||||
<?php if($config->edition == 'max'):?>
|
||||
<tr>
|
||||
<td><?php echo $this->lang->upgrade->scrumDetail;?></td>
|
||||
<td class="text-center"><i class="icon text-red icon-close"></i></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
<?php foreach($config->custom->allFeatures as $feature):?>
|
||||
<?php if($feature == 'scrumDetail'):?>
|
||||
<?php if($disabledScrumFeatures):?>
|
||||
<tr class='text-center'>
|
||||
<td class='text-left'><?php echo sprintf($this->lang->custom->scrum->common, $disabledScrumFeatures);?></td>
|
||||
<td><i class="icon text-red icon-close"></i></td>
|
||||
<td><i class="icon text-success icon-check"></i></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<td><?php echo $this->lang->upgrade->projectWaterfall;?></td>
|
||||
<td class="text-center"><i class="icon text-red icon-close"></i></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $this->lang->upgrade->projectKanban;?></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><?php echo $this->lang->upgrade->execution;?></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
</tr>
|
||||
<?php if($config->edition == 'max'):?>
|
||||
<tr>
|
||||
<td><?php echo $this->lang->upgrade->assetlib;?></td>
|
||||
<td class="text-center"><i class="icon text-red icon-close"></i></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
<?php if($enabledScrumFeatures):?>
|
||||
<tr class='text-center'>
|
||||
<td class='text-left'><?php echo sprintf($this->lang->custom->scrum->common, $enabledScrumFeatures);?></td>
|
||||
<td><i class="icon text-success icon-check"></i></td>
|
||||
<td><i class="icon text-success icon-check"></i></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<?php if($config->edition == 'biz' or $config->edition == 'max'):?>
|
||||
<tr>
|
||||
<td><?php echo $this->lang->upgrade->oa;?></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
<?php else:?>
|
||||
<tr class="text-center">
|
||||
<td class='text-left'><?php echo $this->lang->upgrade->$feature;?></td>
|
||||
<td>
|
||||
<?php $class = in_array($feature, $disabledFeatures) ? 'text-red icon-close' : 'text-success icon-check';?>
|
||||
<i class="icon <?php echo $class;?>"></i>
|
||||
</td>
|
||||
<td><i class="icon text-success text-success icon-check"></i></td>
|
||||
</tr>
|
||||
<?php endif;?>
|
||||
<tr>
|
||||
<td><?php echo $this->lang->upgrade->vision;?></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
<td class="text-center"><i class="icon text-success icon-check"></i></td>
|
||||
</tr>
|
||||
<?php endforeach;?>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
|
||||
@@ -123,7 +123,7 @@
|
||||
<td colspan='4'><?php echo $this->lang->upgrade->remarkDesc;?></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
<?php echo html::hidden('mode','')?>
|
||||
<?php echo html::hidden('mode', '');?>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user