+ id;?> + name'>" . $project->name . '') : html::a($this->createLink('project', 'view', 'project=' . $project->id), $project->name, '_blank');?> + + arrow . $lang->project->suspend;?> + +
++ +
diff --git a/module/project/control.php b/module/project/control.php index dee710b3e6..5c966bc69d 100644 --- a/module/project/control.php +++ b/module/project/control.php @@ -124,7 +124,7 @@ class project extends control { foreach($projects as $project) { - if($project->parent == $programID) + if($project->parent == $programID) { $orderedProjects[] = $project; unset($projects[$project->id]); @@ -559,6 +559,7 @@ class project extends control $this->view->title = $title; $this->view->position = $position; $this->view->groups = $groups; + $this->view->project = $this->dao->findById($projectID)->from(TABLE_PROJECT)->fetch(); $this->view->projectID = $projectID; $this->view->programID = $programID; $this->view->groupUsers = $groupUsers; @@ -703,7 +704,7 @@ class project extends control $this->view->position[] = $this->lang->group->manageView; $this->view->group = $group; - $this->view->products = $this->dao->select('*')->from(TABLE_PRODUCT)->where('deleted')->eq('0')->andWhere('program')->eq($group->project)->orderBy('order_desc')->fetchPairs('id', 'name'); + $this->view->products = $this->loadModel('product')->getProductPairsByProject($projectID); $this->view->projects = $this->dao->select('*')->from(TABLE_PROJECT)->where('deleted')->eq('0')->andWhere('id')->eq($group->project)->orderBy('order_desc')->fetchPairs('id', 'name'); $this->display(); @@ -774,7 +775,7 @@ class project extends control $project = $this->project->getByID($group->project); foreach($this->lang->resource as $method => $label) { - if(!in_array($method, $this->config->projectPriv->{$project->model})) unset($this->lang->resource->$method); + if(!in_array($method, $this->config->programPriv->{$project->model})) unset($this->lang->resource->$method); } } @@ -798,7 +799,7 @@ class project extends control if(!empty($_POST)) { - $this->project->manageMembers($projectID); + $this->execution->manageMembers($projectID); $link = $this->createLink('project', 'manageMembers', "projectID=$projectID"); $this->send(array('message' => $this->lang->saveSuccess, 'result' => 'success', 'locate' => $link)); } @@ -995,7 +996,7 @@ class project extends control $this->view->position[] = $this->lang->project->suspend; $this->view->users = $this->loadModel('user')->getPairs('noletter'); $this->view->actions = $this->action->getList('project', $projectID); - $this->view->project = $this->project->getPGMByID($projectID); + $this->view->project = $this->project->getByID($projectID); $this->display('project', 'suspend'); } @@ -1287,7 +1288,7 @@ class project extends control $response = array(); $response['result'] = true; - $response['message'] = $this->lang->project->changeProjectTip; + $response['message'] = $this->lang->project->changeProgramTip; $multiLinkedProducts = $this->project->getMultiLinkedProducts($projectID); if($multiLinkedProducts) diff --git a/module/project/js/edit.js b/module/project/js/edit.js index 6058478862..115059a858 100644 --- a/module/project/js/edit.js +++ b/module/project/js/edit.js @@ -2,10 +2,10 @@ $(function() { $('#parent').change(function() { - var projectID = $(this).val(); + var programID = $(this).val(); /* Determine whether the project can change the project set. */ - link = createLink('project', 'ajaxCheckProduct', 'projectID=' + projectID + '&projectID=' + projectID); + link = createLink('project', 'ajaxCheckProduct', 'programID=' + programID + '&projectID=' + projectID); $.getJSON(link, function(data) { var changed = true; @@ -69,13 +69,13 @@ $(function() /** * Set aclList. * - * @param int $projectID + * @param int $programID * @access public * @return void */ -function setAclList(projectID) +function setAclList(programID) { - if(projectID != 0) + if(programID != 0) { $('.aclBox').html($('#programAcl').html()); } diff --git a/module/project/lang/de.php b/module/project/lang/de.php index cff06ea19a..0c16f9862b 100644 --- a/module/project/lang/de.php +++ b/module/project/lang/de.php @@ -203,7 +203,7 @@ $lang->project->confirmDelete = 'Do you want to delete this project?'; $lang->project->cannotChangeToCat = "The project has contents, so you cannot it to a parent project."; $lang->project->cannotCancelCat = "There are child projects of this project. You cannot cancel the parent project mark."; $lang->project->parentBeginEnd = "The begin and end date of the parent project: %s ~ %s"; -$lang->project->parentBudget = "The budget of the parent project: %s"; +$lang->project->parentBudget = "The budget of the parent project: "; $lang->project->beginLetterParent = "The begin date of the parent project: %s. It cannot be < the begin date of its parent project."; $lang->project->endGreaterParent = "The end date of the parent project: %s. It cannot be > the end date of its parent project."; $lang->project->beginGreateChild = "The minimum start date of the project set: %s. The start date of the project cannot be less than the minimum start date of the project set."; diff --git a/module/project/lang/en.php b/module/project/lang/en.php index ce270c19f6..fba4a689c4 100644 --- a/module/project/lang/en.php +++ b/module/project/lang/en.php @@ -203,7 +203,7 @@ $lang->project->confirmDelete = 'Do you want to delete this project?'; $lang->project->cannotChangeToCat = "The project has contents, so you cannot it to a parent project."; $lang->project->cannotCancelCat = "There are child projects of this project. You cannot cancel the parent project mark."; $lang->project->parentBeginEnd = "The begin and end date of the parent project: %s ~ %s"; -$lang->project->parentBudget = "The budget of the parent project: %s"; +$lang->project->parentBudget = "The budget of the parent project: "; $lang->project->beginLetterParent = "The begin date of the parent project: %s. It cannot be < the begin date of its parent project."; $lang->project->endGreaterParent = "The end date of the parent project: %s. It cannot be > the end date of its parent project."; $lang->project->beginGreateChild = "The minimum start date of the project set: %s. The start date of the project cannot be less than the minimum start date of the project set."; diff --git a/module/project/lang/fr.php b/module/project/lang/fr.php index 642b7f087d..33c17a77ce 100644 --- a/module/project/lang/fr.php +++ b/module/project/lang/fr.php @@ -203,7 +203,7 @@ $lang->project->confirmDelete = 'Do you want to delete this project?'; $lang->project->cannotChangeToCat = "The project has contents, so you cannot it to a parent project."; $lang->project->cannotCancelCat = "There are child projects of this project. You cannot cancel the parent project mark."; $lang->project->parentBeginEnd = "The begin and end date of the parent project: %s ~ %s"; -$lang->project->parentBudget = "The budget of the parent project: %s"; +$lang->project->parentBudget = "The budget of the parent project: "; $lang->project->beginLetterParent = "The begin date of the parent project: %s. It cannot be < the begin date of its parent project."; $lang->project->endGreaterParent = "The end date of the parent project: %s. It cannot be > the end date of its parent project."; $lang->project->beginGreateChild = "The minimum start date of the project set: %s. The start date of the project cannot be less than the minimum start date of the project set."; diff --git a/module/project/lang/vi.php b/module/project/lang/vi.php index 079eff4593..9a1ce50855 100644 --- a/module/project/lang/vi.php +++ b/module/project/lang/vi.php @@ -203,7 +203,7 @@ $lang->project->confirmDelete = 'Do you want to delete this project?'; $lang->project->cannotChangeToCat = "The project has contents, so you cannot it to a parent project."; $lang->project->cannotCancelCat = "There are child projects of this project. You cannot cancel the parent project mark."; $lang->project->parentBeginEnd = "The begin and end date of the parent project: %s ~ %s"; -$lang->project->parentBudget = "The budget of the parent project: %s"; +$lang->project->parentBudget = "The budget of the parent project: "; $lang->project->beginLetterParent = "The begin date of the parent project: %s. It cannot be < the begin date of its parent project."; $lang->project->endGreaterParent = "The end date of the parent project: %s. It cannot be > the end date of its parent project."; $lang->project->beginGreateChild = "The minimum start date of the project set: %s. The start date of the project cannot be less than the minimum start date of the project set."; diff --git a/module/project/lang/zh-cn.php b/module/project/lang/zh-cn.php index cc7a533eb8..3dbb61e22a 100644 --- a/module/project/lang/zh-cn.php +++ b/module/project/lang/zh-cn.php @@ -204,7 +204,7 @@ $lang->project->confirmDelete = "您确定删除项目[%s]吗?"; $lang->project->cannotChangeToCat = "该项目已经有实际的内容,无法修改为父项目"; $lang->project->cannotCancelCat = "该项目下已经有子项目,无法取消父项目标记"; $lang->project->parentBeginEnd = "父项目起止时间:%s ~ %s"; -$lang->project->parentBudget = "父项目预算:%s"; +$lang->project->parentBudget = "父项目预算:"; $lang->project->beginLetterParent = "父项目的开始日期:%s,开始日期不能小于父项目的开始日期"; $lang->project->endGreaterParent = "父项目的完成日期:%s,完成日期不能大于父项目的完成日期"; $lang->project->beginGreateChild = "项目集的最小开始日期:%s,项目的开始日期不能小于项目集的最小开始日期"; diff --git a/module/project/model.php b/module/project/model.php index fc751a9c99..a71ce6b110 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -104,7 +104,7 @@ class projectModel extends model public function getBudgetUnitList() { $budgetUnitList = array(); - foreach(explode(',', $this->config->project->unitList) as $unit) $budgetUnitList[$unit] = zget($this->lang->project->unitList, $unit, ''); + foreach(explode(',', $this->config->program->unitList) as $unit) $budgetUnitList[$unit] = zget($this->lang->project->unitList, $unit, ''); return $budgetUnitList; } @@ -662,7 +662,7 @@ class projectModel extends model ->setDefault('lastEditedDate', helper::now()) ->add('type', 'project') ->join('whitelist', ',') - ->stripTags($this->config->project->editor->prjcreate['id'], $this->config->allowedTags) + ->stripTags($this->config->project->editor->create['id'], $this->config->allowedTags) ->remove('products,branch,plans,delta,newProduct,productName,future') ->get(); @@ -735,7 +735,7 @@ class projectModel extends model if(isset($this->lang->project->$field)) $this->lang->project->$field = $this->lang->project->$field; } - $project = $this->loadModel('file')->processImgURL($project, $this->config->project->editor->prjcreate['id'], $this->post->uid); + $project = $this->loadModel('file')->processImgURL($project, $this->config->project->editor->create['id'], $this->post->uid); $this->dao->insert(TABLE_PROJECT)->data($project) ->autoCheck() ->batchcheck($requiredFields, 'notempty') diff --git a/module/project/view/edit.html.php b/module/project/view/edit.html.php index 75879560f7..0c40643818 100644 --- a/module/project/view/edit.html.php +++ b/module/project/view/edit.html.php @@ -171,7 +171,7 @@