* Fix product menu.

This commit is contained in:
Yagami
2020-09-21 16:45:06 +08:00
parent 566d03a358
commit 3cb892fc4e
7 changed files with 30 additions and 44 deletions

View File

@@ -9,26 +9,6 @@ class program extends control
$this->programs = $this->program->getPairs();
}
/**
* Program index view.
*
* @param int $programID
* @access public
* @return void
*/
public function index($programID = 0)
{
$this->lang->navGroup->program = 'project';
if(!$programID) $programID = $this->session->PRJ;
$this->session->set('program', $programID);
$this->view->title = $this->lang->program->common . $this->lang->colon . $this->lang->program->index;
$this->view->position[] = $this->lang->program->index;
$this->view->program = $this->program->getPGMByID($programID);
$this->display();
}
/**
* Program home page.
*
@@ -908,6 +888,26 @@ class program extends control
die($link);
}
/**
* Project index view.
*
* @param int $programID
* @access public
* @return void
*/
public function index($projectID = 0)
{
$this->lang->navGroup->program = 'project';
if(!$projectID) $projectID = $this->session->PRJ;
$this->session->set('PRJ', $projectID);
$this->view->title = $this->lang->program->common . $this->lang->colon . $this->lang->program->PRJIndex;
$this->view->position[] = $this->lang->program->PRJIndex;
$this->view->project = $this->program->getPRJByID($projectID);
$this->display();
}
/**
* Projects list.
*

View File

@@ -1,6 +1,6 @@
<?php
/* Actions. */
$lang->program->index = '仪表盘';
$lang->program->PRJIndex = '仪表盘';
$lang->program->PRJCreate = '创建项目';
$lang->program->PRJCreateGuide = '选择项目模板';
$lang->program->PRJEdit = '编辑项目';

View File

@@ -10,5 +10,5 @@
*/
?>
<?php include '../../common/view/header.html.php';?>
<?php echo $this->fetch('block', 'dashboard', "module=program&type={$program->model}");?>
<?php echo $this->fetch('block', 'dashboard', "module=program&type={$project->model}");?>
<?php include '../../common/view/footer.html.php';?>

View File

@@ -69,7 +69,7 @@ js::set('browseType', $browseType);
<td><?php printf('%03d', $project->id);?></td>
<td class='text-left' title="<?php echo $project->code;?>"><?php echo $project->code;?></td>
<td class='text-left' title='<?php echo $project->name?>'>
<?php echo html::a($this->createLink('project', 'index', 'locate=no'), $project->name);?>
<?php echo html::a($this->createLink('program', 'index', "projectID=$project->id", '', '', $project->id), $project->name);?>
</td>
<td><?php echo zget($lang->program->statusList, $project->status);?></td>
<td><?php echo $project->begin;?></td>