diff --git a/module/program/control.php b/module/program/control.php index 6943b64753..4a85657c52 100644 --- a/module/program/control.php +++ b/module/program/control.php @@ -214,7 +214,7 @@ class program extends control public function close($programID) { $this->loadModel('action'); - $program = $this->program->getByID($programID); + $program = $this->project->getByID($programID, 'program'); if(!empty($_POST)) { @@ -269,12 +269,12 @@ class program extends control die(js::reload('parent.parent')); } - $this->view->title = $this->lang->project->start; - $this->view->position[] = $this->lang->project->start; - $this->view->program = $this->program->getByID($programID); + $this->view->title = $this->lang->program->start; + $this->view->position[] = $this->lang->program->start; + $this->view->project = $this->project->getByID($programID, 'program'); $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->actions = $this->action->getList('program', $programID); - $this->display(); + $this->display('project', 'start'); } /** @@ -287,7 +287,7 @@ class program extends control public function activate($programID = 0) { $this->loadModel('action'); - $program = $this->program->getByID($programID); + $program = $this->project->getByID($programID, 'program'); if(!empty($_POST)) { @@ -308,12 +308,12 @@ class program extends control $this->view->title = $this->lang->program->activate; $this->view->position[] = $this->lang->program->activate; - $this->view->program = $program; + $this->view->project = $program; $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->actions = $this->action->getList('program', $programID); $this->view->newBegin = $newBegin; $this->view->newEnd = $newEnd; - $this->display(); + $this->display('project', 'activate'); } /** @@ -341,11 +341,11 @@ class program extends control die(js::reload('parent.parent')); } - $this->view->title = $this->lang->project->suspend; - $this->view->position[] = $this->lang->project->suspend; + $this->view->title = $this->lang->program->suspend; + $this->view->position[] = $this->lang->program->suspend; $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->actions = $this->action->getList('program', $programID); - $this->view->project = $this->program->getByID($programID); + $this->view->project = $this->project->getByID($programID, 'program'); $this->display('project', 'suspend'); } diff --git a/module/program/lang/de.php b/module/program/lang/de.php index c71e6b8c6f..f1b009b6e2 100644 --- a/module/program/lang/de.php +++ b/module/program/lang/de.php @@ -52,6 +52,7 @@ $lang->program->beginGreateChild = "Child earliest begin: %s, parent begi $lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date."; $lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed'; $lang->program->confirmDelete = "Do you want to delete it?"; +$lang->program->readjustTime = 'Change the program begin&end date.'; $lang->program->stakeholderTypeList['inside'] = 'Inside'; $lang->program->stakeholderTypeList['outside'] = 'Outside'; diff --git a/module/program/lang/en.php b/module/program/lang/en.php index 522435301a..e998aaad9c 100644 --- a/module/program/lang/en.php +++ b/module/program/lang/en.php @@ -52,6 +52,7 @@ $lang->program->beginGreateChild = "Child earliest begin: %s, parent begi $lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date."; $lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed'; $lang->program->confirmDelete = "Do you want to delete it?"; +$lang->program->readjustTime = 'Change the program begin&end date.'; $lang->program->stakeholderTypeList['inside'] = 'Inside'; $lang->program->stakeholderTypeList['outside'] = 'Outside'; diff --git a/module/program/lang/fr.php b/module/program/lang/fr.php index c71e6b8c6f..f1b009b6e2 100644 --- a/module/program/lang/fr.php +++ b/module/program/lang/fr.php @@ -52,6 +52,7 @@ $lang->program->beginGreateChild = "Child earliest begin: %s, parent begi $lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date."; $lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed'; $lang->program->confirmDelete = "Do you want to delete it?"; +$lang->program->readjustTime = 'Change the program begin&end date.'; $lang->program->stakeholderTypeList['inside'] = 'Inside'; $lang->program->stakeholderTypeList['outside'] = 'Outside'; diff --git a/module/program/lang/vi.php b/module/program/lang/vi.php index 522435301a..e998aaad9c 100644 --- a/module/program/lang/vi.php +++ b/module/program/lang/vi.php @@ -52,6 +52,7 @@ $lang->program->beginGreateChild = "Child earliest begin: %s, parent begi $lang->program->endLetterChild = "Child latest end: %s, parent end date > = child latest end date."; $lang->program->closeErrorMessage = 'There are subprograms or projects that are not closed'; $lang->program->confirmDelete = "Do you want to delete it?"; +$lang->program->readjustTime = 'Change the program begin&end date.'; $lang->program->stakeholderTypeList['inside'] = 'Inside'; $lang->program->stakeholderTypeList['outside'] = 'Outside'; diff --git a/module/program/lang/zh-cn.php b/module/program/lang/zh-cn.php index fd7e8be46b..a16bf7e215 100644 --- a/module/program/lang/zh-cn.php +++ b/module/program/lang/zh-cn.php @@ -52,6 +52,7 @@ $lang->program->beginGreateChild = "子项目集的最小开始日期:% $lang->program->endLetterChild = "子项目的最大完成日期:%s,父项目的完成日期不能小于子项目的最大完成日期"; $lang->program->closeErrorMessage = '存在子项目集或项目为未关闭状态'; $lang->program->confirmDelete = "您确定要删除吗?"; +$lang->program->readjustTime = '重新调整项目集起止时间'; $lang->program->stakeholderTypeList['inside'] = '内部'; $lang->program->stakeholderTypeList['outside'] = '外部'; diff --git a/module/program/model.php b/module/program/model.php index 5391cd8202..56ca1751f8 100644 --- a/module/program/model.php +++ b/module/program/model.php @@ -521,7 +521,7 @@ class programModel extends model public function hasUnfinished($program) { $unfinished = $this->dao->select("count(IF(id != {$program->id}, true, null)) as count")->from(TABLE_PROJECT) - ->where('type')->in('program,project') + ->where('type')->in('program, project') ->andWhere('path')->like($program->path . '%') ->andWhere('status')->ne('closed') ->andWhere('deleted')->eq('0') diff --git a/module/program/view/activate.html.php b/module/program/view/activate.html.php deleted file mode 100644 index 492f9c4b1e..0000000000 --- a/module/program/view/activate.html.php +++ /dev/null @@ -1,77 +0,0 @@ - - * @package program - * @version $Id: activate.html.php 935 2013-01-16 07:49:24Z wwccss@gmail.com $ - * @link http://www.zentao.net - */ -?> - - - - -
-
-

- id;?> - name'>" . $program->name . '') : html::a($this->createLink('program', 'view', 'program=' . $program->id), $program->name, '_blank');?> - - arrow . $lang->project->activate;?> - -

-
-
- - - - - - - - - - - printExtendFields($program, 'table', 'columns=5');?> - - - - - - - -
program->dateRange;?> -
begin . ' ~ ' . $program->end;?>
-
-
- - ~ - -
-
-
-
-
-
-
-
-
program->status;?>
comment;?>
goback, $this->session->taskList, 'self', '', 'btn btn-wide'); ?>
-
-
-
-
- - diff --git a/module/program/view/start.html.php b/module/program/view/start.html.php deleted file mode 100644 index 4290dee056..0000000000 --- a/module/program/view/start.html.php +++ /dev/null @@ -1,50 +0,0 @@ - - * @package program - * @version $Id: prjstart.html.php 4769 2013-05-05 07:24:21Z wwccss $ - * @link http://www.zentao.net - */ -?> - - -
-
-

- id;?> - name'>" . $program->name . '') : html::a($this->createLink('project', 'view', 'project=' . $program->id), $program->name, '_blank');?> - - arrow . $lang->program->start;?> - -

-
-
- - - - - - - - - - - - - - - -
project->realBegan;?>
comment;?>
- program->start);?> -
-
-
-
- -
-
- diff --git a/module/project/view/activate.html.php b/module/project/view/activate.html.php index 13d3b7a022..082fe99d56 100644 --- a/module/project/view/activate.html.php +++ b/module/project/view/activate.html.php @@ -20,7 +20,7 @@ id;?> name'>" . $project->name . '') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?> - arrow . $lang->project->activate;?> + arrow . $lang->{$project->type}->activate;?> @@ -41,7 +41,7 @@
-
+
@@ -59,7 +59,7 @@ - goback, $this->session->taskList, 'self', '', 'btn btn-wide'); ?> + {$project->type}->activate) . html::linkButton($lang->goback, $this->session->taskList, 'self', '', 'btn btn-wide'); ?> diff --git a/module/project/view/close.html.php b/module/project/view/close.html.php index 4264552105..9cdb9c957e 100644 --- a/module/project/view/close.html.php +++ b/module/project/view/close.html.php @@ -18,7 +18,7 @@ id;?> name'>" . $project->name . '') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?> - arrow . $lang->project->close;?> + arrow . $lang->{$project->type}->close;?>
@@ -35,7 +35,7 @@ - goback, $this->session->projectList, 'self', '', 'btn btn-wide'); ?> + {$project->type}->close) . html::linkButton($lang->goback, $this->session->projectList, 'self', '', 'btn btn-wide'); ?> diff --git a/module/project/view/start.html.php b/module/project/view/start.html.php index 2170db29da..60b775c4d0 100644 --- a/module/project/view/start.html.php +++ b/module/project/view/start.html.php @@ -18,7 +18,7 @@ id;?> name'>" . $project->name . '') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?> - arrow . $lang->project->start;?> + arrow . $lang->{$project->type}->start;?>
@@ -36,7 +36,7 @@ - project->start);?> + {$project->type}->start);?> diff --git a/module/project/view/suspend.html.php b/module/project/view/suspend.html.php index 2e686dcbf4..fefae82bd5 100644 --- a/module/project/view/suspend.html.php +++ b/module/project/view/suspend.html.php @@ -18,7 +18,7 @@ id;?> name'>" . $project->name . '') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?> - arrow . $lang->project->suspend;?> + arrow . $lang->{$project->type}->suspend;?> @@ -34,7 +34,7 @@ - goback, $this->session->taskList, 'self', '', 'btn btn-wide'); ?> + {$project->type}->suspend) . html::linkButton($lang->goback, $this->session->taskList, 'self', '', 'btn btn-wide'); ?>