* Rename var name.

This commit is contained in:
Yagami
2020-09-30 17:18:24 +08:00
parent 4f306b3b17
commit 4209766be3
12 changed files with 38 additions and 42 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ $config->program->editor->prjstart = array('id' => 'comment', 'tools' => 'sim
$config->program->editor->prjactivate = array('id' => 'comment', 'tools' => 'simpleTools');
$config->program->list = new stdclass();
$config->program->list->exportFields = 'id,name,code,template,category,status,begin,end,budget,PM,end,desc';
$config->program->list->exportFields = 'id,name,code,template,product,status,begin,end,budget,PM,end,desc';
$config->program->PGMCreate = new stdclass();
$config->program->PGMEdit = new stdclass();
+8 -8
View File
@@ -133,7 +133,7 @@ class program extends control
/**
* Create a project.
*
* @param string $template
* @param string $parentProgramID
* @access public
* @return void
*/
@@ -676,8 +676,8 @@ class program extends control
{
$program->PM = zget($users, $program->PM);
$program->status = $this->processStatus('project', $program);
$program->template = zget($programLang->templateList, $program->template);
$program->product = zget($programLang->categoryList, $program->product);
$program->model = zget($programLang->modelList, $program->model);
$program->product = zget($programLang->productList, $program->product);
$program->budget = $program->budget . zget($programLang->unitList, $program->budgetUnit);
if($this->post->exportType == 'selected')
@@ -869,14 +869,14 @@ class program extends control
/**
* Create a project.
*
* @param string $template
* @param string $model
* @param int $programID
* @param string $from PRJ|PGM
* @param int $copyProjectID
* @access public
* @return void
*/
public function PRJCreate($template = 'waterfall', $programID = 0, $from = 'PRJ', $copyProjectID = '')
public function PRJCreate($model = 'waterfall', $programID = 0, $from = 'PRJ', $copyProjectID = '')
{
if($from == 'PRJ')
{
@@ -917,7 +917,7 @@ class program extends control
$acl = $copyProgram->acl;
$privway = $copyProgram->privway;
$whitelist = $copyProgram->whitelist;
if(empty($template)) $template = $copyProgram->template;
if(empty($model)) $model = $copyProgram->model;
}
$this->view->title = $this->lang->program->PRJCreate;
@@ -925,9 +925,9 @@ class program extends control
$this->view->groups = $this->loadModel('group')->getPairs();
$this->view->pmUsers = $this->loadModel('user')->getPairs('noclosed|nodeleted|pmfirst');
$this->view->programs = array('' => '') + $this->program->getPRJPairsByTemplate($template, $programID);
$this->view->programs = array('' => '') + $this->program->getPRJPairsByTemplate($model, $programID);
$this->view->programID = $programID;
$this->view->template = $template;
$this->view->model = $model;
$this->view->name = $name;
$this->view->code = $code;
$this->view->team = $team;
+2 -2
View File
@@ -79,8 +79,8 @@ $lang->program->unitList[''] = '';
$lang->program->unitList['yuan'] = 'Yuan';
$lang->program->unitList['dollar'] = 'Dollars';
$lang->program->templateList['scrum'] = "Scrum";
$lang->program->templateList['waterfall'] = "CMMI";
$lang->program->modelList['scrum'] = "Scrum";
$lang->program->modelList['waterfall'] = "CMMI";
$lang->program->PRJCategoryList['single'] = "Single product";
$lang->program->PRJCategoryList['multiple'] = "Multiple products";
+2 -2
View File
@@ -79,8 +79,8 @@ $lang->program->unitList[''] = '';
$lang->program->unitList['yuan'] = '元';
$lang->program->unitList['dollar'] = 'Dollars';
$lang->program->templateList['scrum'] = "Scrum";
$lang->program->templateList['waterfall'] = "瀑布";
$lang->program->modelList['scrum'] = "Scrum";
$lang->program->modelList['waterfall'] = "瀑布";
$lang->program->PRJCategoryList['single'] = "单产品项目";
$lang->program->PRJCategoryList['multiple'] = "多产品项目";
+3 -3
View File
@@ -292,7 +292,7 @@ class programModel extends model
if(!empty($groupPriv))
{
$newProgram = $groupPriv->program . ",$programID";
$this->dao->update(TABLE_USERGROUP)->set('program')->eq($newProgram)->where('account')->eq($groupPriv->account)->andWhere('`group`')->eq($groupPriv->group)->exec();
$this->dao->update(TABLE_USERGROUP)->set('PRJ')->eq($newProgram)->where('account')->eq($groupPriv->account)->andWhere('`group`')->eq($groupPriv->group)->exec();
}
else
{
@@ -866,7 +866,7 @@ class programModel extends model
}
/**
* Get project pairs by template.
* Get project pairs by model.
*
* @param string $model
* @param int $programID
@@ -1228,7 +1228,7 @@ class programModel extends model
echo html::a(helper::createLink('program', 'index', "projectID=$project->id"), $project->name);
break;
case 'PRJModel':
echo zget($this->lang->program->templateList, $project->model);
echo zget($this->lang->program->modelList, $project->model);
break;
case 'PRJPM':
echo zget($users, $project->PM);
+2 -2
View File
@@ -4,7 +4,7 @@
<div class='panel' data-url='<?php echo $this->createLink('program', 'index', "programID=$program->id", '', '', $program->id);?>'>
<div class='panel-heading'>
<strong class='program-name' title='<?php echo $program->name;?>'><?php echo $program->name;?></strong>
<?php if($program->template === 'waterfall'): ?>
<?php if($program->model === 'waterfall'): ?>
<span class='program-type-label label label-warning label-outline'><?php echo $lang->program->waterfall; ?></span>
<?php else: ?>
<span class='program-type-label label label-info label-outline'><?php echo $lang->program->scrum; ?></span>
@@ -31,7 +31,7 @@
<span><i class='icon icon-clock'></i> <?php printf($lang->program->hoursUnit, $program->estimate); ?></span>
<span><i class='icon icon-cost'></i> <?php echo $program->budget . '' . zget($lang->program->unitList, $program->budgetUnit);?></span>
</div>
<?php if($program->template === 'waterfall'): ?>
<?php if($program->model === 'waterfall'): ?>
<div class='program-detail program-stages'>
<p class='text-muted'><?php echo $lang->program->ongoingStage; ?></p>
<?php
+6 -6
View File
@@ -13,7 +13,7 @@
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::import($jsRoot . 'misc/date.js');?>
<?php js::set('template', $template);?>
<?php js::set('model', $model);?>
<?php js::set('programID', $programID);?>
<?php js::set('from', $from);?>
<?php js::set('weekend', $config->project->weekend);?>
@@ -29,7 +29,7 @@
<table class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->program->PRJTemplate;?></th>
<td><?php echo zget($lang->program->templateList, $template, '');?></td><td></td><td>
<td><?php echo zget($lang->program->modelList, $model, '');?></td><td></td><td>
</td>
</tr>
<tr>
@@ -44,13 +44,13 @@
<th><?php echo $lang->program->PRJCode;?></th>
<td><?php echo html::input('code', $code, "class='form-control' required");?></td><td></td><td></td>
</tr>
<?php if($template == 'scrum'):?>
<?php if($model == 'scrum'):?>
<tr>
<th><?php echo $lang->program->PRJCategory;?></th>
<td><?php echo html::select('lifetime', $lang->program->PRJLifeTimeList, '', "class='form-control'");?></td><td></td><td></td>
</tr>
<?php endif;?>
<?php if($template == 'waterfall'):?>
<?php if($model == 'waterfall'):?>
<tr>
<th><?php echo $lang->program->PRJCategory;?></th>
<td><?php echo html::select('product', $lang->program->PRJCategoryList, '', "class='form-control'");?></td><td></td><td></td>
@@ -88,7 +88,7 @@
</td>
<td class='muted'></td>
</tr>
<?php if($template == 'scrum'):?>
<?php if($model == 'scrum'):?>
<tr>
<th><?php echo $lang->project->days;?></th>
<td>
@@ -126,7 +126,7 @@
<tr>
<td colspan='4' class='text-center form-actions'>
<?php
echo html::hidden('model', $template);
echo html::hidden('model', $model);
echo html::submitButton();
echo html::backButton();
?>
+1 -1
View File
@@ -23,7 +23,7 @@
<table class='table table-form'>
<tr>
<th class='w-120px'><?php echo $lang->program->PRJTemplate;?></th>
<td><?php echo zget($lang->program->templateList, $project->model, '');?></td><td></td><td>
<td><?php echo zget($lang->program->modelList, $project->model, '');?></td><td></td><td>
</td>
</tr>
<tr>