* complete task #234:Unified way to adjust the view assignment.
This commit is contained in:
@@ -37,7 +37,7 @@ class bug extends control
|
||||
$this->loadModel('task');
|
||||
$this->products = $this->product->getPairs();
|
||||
if(empty($this->products)) $this->locate($this->createLink('product', 'create'));
|
||||
$this->assign('products', $this->products);
|
||||
$this->view->products = $this->products;
|
||||
}
|
||||
|
||||
/* bug首页。*/
|
||||
@@ -150,18 +150,18 @@ class bug extends control
|
||||
$position[] = html::a($this->createLink('bug', 'browse', "productID=$productID"), $this->products[$productID]);
|
||||
$position[] = $this->lang->bug->common;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('productID', $productID);
|
||||
$this->assign('productName', $this->products[$productID]);
|
||||
$this->assign('moduleTree', $this->tree->getTreeMenu($productID, $viewType = 'bug', $rooteModuleID = 0, array('treeModel', 'createBugLink')));
|
||||
$this->assign('browseType', $browseType);
|
||||
$this->assign('bugs', $bugs);
|
||||
$this->assign('users', $users);
|
||||
$this->assign('pager', $pager);
|
||||
$this->assign('param', $param);
|
||||
$this->assign('orderBy', $orderBy);
|
||||
$this->assign('moduleID', $moduleID);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->moduleTree = $this->tree->getTreeMenu($productID, $viewType = 'bug', $rooteModuleID = 0, array('treeModel', 'createBugLink'));
|
||||
$this->view->browseType = $browseType;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->users = $users;
|
||||
$this->view->pager = $pager;
|
||||
$this->view->param = $param;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->moduleID = $moduleID;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -524,8 +524,8 @@ class bug extends control
|
||||
if(strtolower($action->action) == 'opened') $action->comment = $bug->steps;
|
||||
|
||||
/* 赋值,获得邮件内容。*/
|
||||
$this->assign('bug', $bug);
|
||||
$this->assign('action', $action);
|
||||
$this->view->bug = $bug;
|
||||
$this->view->action = $action;
|
||||
$mailContent = $this->parse($this->moduleName, 'sendmail');
|
||||
|
||||
/* 发信。*/
|
||||
|
||||
@@ -49,12 +49,12 @@ class company extends control
|
||||
$header['title'] = $this->lang->company->index . $this->lang->colon . $this->lang->dept->common;
|
||||
$position[] = $this->lang->dept->common;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('users', $this->dept->getUsers($childDeptIds));
|
||||
$this->assign('deptTree', $this->dept->getTreeMenu($rooteDeptID = 0, array('deptModel', 'createMemberLink')));
|
||||
$this->assign('parentDepts', $this->dept->getParents($deptID));
|
||||
$this->assign('deptID', $deptID);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->users = $this->dept->getUsers($childDeptIds);
|
||||
$this->view->deptTree = $this->dept->getTreeMenu($rooteDeptID = 0, array('deptModel', 'createMemberLink'));
|
||||
$this->view->parentDepts = $this->dept->getParents($deptID);
|
||||
$this->view->deptID = $deptID;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -75,8 +75,8 @@ class company extends control
|
||||
$header['title'] = $this->lang->admin->common . $this->lang->colon . $this->lang->company->create;
|
||||
$position[] = html::a($this->createLink('admin', 'browsecompany'), $this->lang->admin->company);
|
||||
$position[] = $this->lang->company->create;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -93,9 +93,9 @@ class company extends control
|
||||
|
||||
$header['title'] = $this->lang->company->common . $this->lang->colon . $this->lang->company->edit;
|
||||
$position[] = $this->lang->company->edit;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('company', $this->company->getById($this->app->company->id));
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->company = $this->company->getById($this->app->company->id);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -38,12 +38,12 @@ class dept extends control
|
||||
$position[] = $this->lang->dept->manage;
|
||||
|
||||
$parentDepts = $this->dept->getParents($deptID);
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('deptID', $deptID);
|
||||
$this->assign('depts', $this->dept->getTreeMenu($rooteDeptID = 0, array('deptmodel', 'createManageLink')));
|
||||
$this->assign('parentDepts',$parentDepts);
|
||||
$this->assign('sons', $this->dept->getSons($deptID));
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->deptID = $deptID;
|
||||
$this->view->depts = $this->dept->getTreeMenu($rooteDeptID = 0, array('deptmodel', 'createManageLink'));
|
||||
$this->view->parentDepts = $parentDepts;
|
||||
$this->view->sons = $this->dept->getSons($deptID);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -57,8 +57,8 @@ class dept extends control
|
||||
|
||||
$product = $this->product->getByID($productID);
|
||||
$header['title'] = $this->lang->product->edit . $this->lang->colon . $product->name;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('product', $product);
|
||||
$this->view->header = $header;
|
||||
$this->view->product = $product;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -43,10 +43,10 @@ class group extends control
|
||||
$groupUsers = array();
|
||||
foreach($groups as $group) $groupUsers[$group->id] = $this->group->getUserPairs($group->id);
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('groups', $groups);
|
||||
$this->assign('groupUsers', $groupUsers);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->groups = $groups;
|
||||
$this->view->groupUsers = $groupUsers;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -77,9 +77,9 @@ class group extends control
|
||||
|
||||
$header['title'] = $this->lang->company->orgView . $this->lang->colon . $this->lang->group->edit;
|
||||
$position[] = $this->lang->group->edit;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('group', $this->group->getById($groupID));
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->group = $this->group->getById($groupID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -140,11 +140,11 @@ class group extends control
|
||||
$header['title'] = $this->lang->company->common . $this->lang->colon . $group->name . $this->lang->colon . $this->lang->group->manageMember;
|
||||
$position[] = $group->name . $this->lang->colon . $this->lang->group->manageMember;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('group', $group);
|
||||
$this->assign('groupUsers', $groupUsers);
|
||||
$this->assign('allUsers', $allUsers);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->group = $group;
|
||||
$this->view->groupUsers = $groupUsers;
|
||||
$this->view->allUsers = $allUsers;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ class product extends control
|
||||
/* 获取所有的产品列表。如果还没有产品,则跳转到产品的添加页面。*/
|
||||
$this->products = $this->product->getPairs();
|
||||
if(empty($this->products) and strpos('create|view', $this->methodName) === false) $this->locate($this->createLink('product', 'create'));
|
||||
$this->assign('products', $this->products);
|
||||
$this->view->products = $this->products;
|
||||
}
|
||||
|
||||
/* 产品视图首页。*/
|
||||
|
||||
@@ -66,11 +66,11 @@ class project extends control
|
||||
$this->project->setMenu($this->projects, $project->id);
|
||||
|
||||
/* 将其赋值到模板系统。*/
|
||||
$this->assign('projects', $this->projects);
|
||||
$this->assign('project', $project);
|
||||
$this->assign('childProjects', $childProjects);
|
||||
$this->assign('products', $products);
|
||||
$this->assign('teamMembers', $teamMembers);
|
||||
$this->view->projects = $this->projects;
|
||||
$this->view->project = $project;
|
||||
$this->view->childProjects = $childProjects;
|
||||
$this->view->products = $products;
|
||||
$this->view->teamMembers = $teamMembers;
|
||||
|
||||
/* 检查是否有访问权限。*/
|
||||
if(!$this->project->checkPriv($project))
|
||||
@@ -219,12 +219,12 @@ class project extends control
|
||||
$users = $this->user->getPairs('noletter');
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('stories', $stories);
|
||||
$this->assign('storyTasks', $storyTasks);
|
||||
$this->assign('tabID', 'story');
|
||||
$this->assign('users', $users);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->storyTasks = $storyTasks;
|
||||
$this->view->tabID = 'story';
|
||||
$this->view->users = $users;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -256,14 +256,14 @@ class project extends control
|
||||
$users = $this->user->getPairs('noletter');
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('bugs', $bugs);
|
||||
$this->assign('tabID', 'bug');
|
||||
$this->assign('pager', $pager);
|
||||
$this->assign('orderBy', $orderBy);
|
||||
$this->assign('users', $users);
|
||||
$this->assign('productID',$productID);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->bugs = $bugs;
|
||||
$this->view->tabID = 'bug';
|
||||
$this->view->pager = $pager;
|
||||
$this->view->orderBy = $orderBy;
|
||||
$this->view->users = $users;
|
||||
$this->view->productID = $productID;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -305,10 +305,10 @@ class project extends control
|
||||
$charts = $this->report->createJSChart('line', $dataXML, 800);
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('tabID', 'burn');
|
||||
$this->assign('charts', $charts);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->tabID = 'burn';
|
||||
$this->view->charts = $charts;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -340,8 +340,8 @@ class project extends control
|
||||
$position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name);
|
||||
$position[] = $this->lang->project->team;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -398,11 +398,11 @@ class project extends control
|
||||
$position[] = $this->lang->project->edit;
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('projects', $projects);
|
||||
$this->assign('project', $project);
|
||||
$this->assign('groups', $this->loadModel('group')->getPairs());
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->projects = $projects;
|
||||
$this->view->project = $project;
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -472,10 +472,10 @@ class project extends control
|
||||
$linkedProducts = join(',', array_keys($linkedProducts));
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('allProducts', $allProducts);
|
||||
$this->assign('linkedProducts', $linkedProducts);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->allProducts = $allProducts;
|
||||
$this->view->linkedProducts = $linkedProducts;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -507,10 +507,10 @@ class project extends control
|
||||
$this->project->setMenu($this->projects, $project->id);
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('projects', $projects);
|
||||
$this->assign('childProjects', $childProjects);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->projects = $projects;
|
||||
$this->view->childProjects = $childProjects;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -537,12 +537,12 @@ class project extends control
|
||||
$header['title'] = $this->lang->project->manageMembers . $this->lang->colon . $project->name;
|
||||
$position[] = html::a($this->createLink('project', 'browse', "projectID=$projectID"), $project->name);
|
||||
$position[] = $this->lang->project->manageMembers;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
|
||||
$this->assign('project', $project);
|
||||
$this->assign('users', $users);
|
||||
$this->assign('members', $members);
|
||||
$this->view->project = $project;
|
||||
$this->view->users = $users;
|
||||
$this->view->members = $members;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -595,13 +595,13 @@ class project extends control
|
||||
$allStories = $this->story->getProductStories(array_keys($products), $moduleID = '0', $status = 'active');
|
||||
$prjStories = $this->story->getProjectStoryPairs($projectID);
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('project', $project);
|
||||
$this->assign('products', $products);
|
||||
$this->assign('allStories', $allStories);
|
||||
$this->assign('prjStories', $prjStories);
|
||||
$this->assign('users', $this->loadModel('user')->getPairs('noletter'));
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->project = $project;
|
||||
$this->view->products = $products;
|
||||
$this->view->allStories = $allStories;
|
||||
$this->view->prjStories = $prjStories;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -27,11 +27,11 @@ class search extends control
|
||||
{
|
||||
$this->search->initSession($module, $searchFields, $fieldParams);
|
||||
|
||||
$this->assign('module', $module);
|
||||
$this->assign('groupItems', $this->config->search->groupItems);
|
||||
$this->assign('searchFields', $searchFields);
|
||||
$this->assign('actionURL', $actionURL);
|
||||
$this->assign('fieldParams', $this->search->setDefaultParams($searchFields, $fieldParams));
|
||||
$this->view->module = $module;
|
||||
$this->view->groupItems = $this->config->search->groupItems;
|
||||
$this->view->searchFields = $searchFields;
|
||||
$this->view->actionURL = $actionURL;
|
||||
$this->view->fieldParams = $this->search->setDefaultParams($searchFields, $fieldParams);
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -197,15 +197,15 @@ class story extends control
|
||||
$position[] = html::a($this->createLink('product', 'browse', "product=$product->id"), $product->name);
|
||||
$position[] = $this->lang->story->view;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('product', $product);
|
||||
$this->assign('plan', $plan);
|
||||
$this->assign('story', $story);
|
||||
$this->assign('users', $users);
|
||||
$this->assign('actions', $this->action->getList('story', $storyID));
|
||||
$this->assign('modulePath', $modulePath);
|
||||
$this->assign('version', $version == 0 ? $story->version : $version);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->product = $product;
|
||||
$this->view->plan = $plan;
|
||||
$this->view->story = $story;
|
||||
$this->view->users = $users;
|
||||
$this->view->actions = $this->action->getList('story', $storyID);
|
||||
$this->view->modulePath = $modulePath;
|
||||
$this->view->version = $version == 0 ? $story->version : $version;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -320,7 +320,7 @@ class story extends control
|
||||
{
|
||||
$this->loadModel('task');
|
||||
$tasks = $this->task->getStoryTaskPairs($storyID, $projectID);
|
||||
$this->assign('tasks', $tasks);
|
||||
$this->view->tasks = $tasks;
|
||||
$this->display();
|
||||
exit;
|
||||
}
|
||||
|
||||
@@ -72,13 +72,13 @@ class task extends control
|
||||
$position[] = html::a($browseProjectLink, $project->name);
|
||||
$position[] = $this->lang->task->create;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('project', $project);
|
||||
$this->assign('stories', $stories);
|
||||
$this->assign('storyID', $storyID);
|
||||
$this->assign('members', $members);
|
||||
$this->assign('users', $this->loadModel('user')->getPairs('noletter, nodeleted'));
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->project = $project;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->storyID = $storyID;
|
||||
$this->view->members = $members;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter, nodeleted');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -185,12 +185,12 @@ class task extends control
|
||||
$position[] = html::a($this->createLink('project', 'browse', "projectID=$task->project"), $project->name);
|
||||
$position[] = $this->lang->task->view;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('project', $project);
|
||||
$this->assign('task', $task);
|
||||
$this->assign('actions', $this->action->getList('task', $taskID));
|
||||
$this->assign('users', $this->loadModel('user')->getPairs('noletter'));
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->project = $project;
|
||||
$this->view->task = $task;
|
||||
$this->view->actions = $this->action->getList('task', $taskID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -249,8 +249,8 @@ class task extends control
|
||||
$action->history = isset($history[$actionID]) ? $history[$actionID] : array();
|
||||
|
||||
/* 赋值,获得邮件内容。*/
|
||||
$this->assign('task', $task);
|
||||
$this->assign('action', $action);
|
||||
$this->view->task = $task;
|
||||
$this->view->action = $action;
|
||||
$this->clear();
|
||||
$mailContent = $this->parse($this->moduleName, 'sendmail');
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ class testcase extends control
|
||||
{
|
||||
/* 构造搜索表单。*/
|
||||
$this->config->testcase->search['actionURL'] = $this->createLink('testcase', 'browse', "productID=$productID&browseType=bySearch");
|
||||
$this->assign('searchForm', $this->fetch('search', 'buildForm', $this->config->testcase->search));
|
||||
$this->view->searchForm = $this->fetch('search', 'buildForm', $this->config->testcase->search);
|
||||
|
||||
/* 设置浏览模式,产品ID和模块ID。 */
|
||||
$browseType = strtolower($browseType);
|
||||
@@ -127,14 +127,14 @@ class testcase extends control
|
||||
$position[] = $this->lang->testcase->create;
|
||||
|
||||
$users = $this->user->getPairs();
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('productID', $productID);
|
||||
$this->assign('users', $users);
|
||||
$this->assign('productName', $this->products[$productID]);
|
||||
$this->assign('moduleOptionMenu', $this->tree->getOptionMenu($productID, $viewType = 'case', $rooteModuleID = 0));
|
||||
$this->assign('currentModuleID', $currentModuleID);
|
||||
$this->assign('stories', $this->story->getProductStoryPairs($productID));
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->users = $users;
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'case', $rooteModuleID = 0);
|
||||
$this->view->currentModuleID = $currentModuleID;
|
||||
$this->view->stories = $this->story->getProductStoryPairs($productID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -202,19 +202,19 @@ class testcase extends control
|
||||
$this->testcase->setMenu($this->products, $productID);
|
||||
|
||||
$users = $this->user->getPairs();
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('productID', $productID);
|
||||
$this->assign('productName', $this->products[$productID]);
|
||||
$this->assign('moduleOptionMenu', $this->tree->getOptionMenu($productID, $viewType = 'case', $rooteModuleID = 0));
|
||||
$this->assign('currentModuleID', $currentModuleID);
|
||||
$this->assign('users', $users);
|
||||
$this->assign('stories', $this->story->getProductStoryPairs($productID));
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'case', $rooteModuleID = 0);
|
||||
$this->view->currentModuleID = $currentModuleID;
|
||||
$this->view->users = $users;
|
||||
$this->view->stories = $this->story->getProductStoryPairs($productID);
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('case', $case);
|
||||
$this->view->actions = $this->loadModel('action')->getList('case', $caseID);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->case = $case;
|
||||
$this->view->actions = $this->loadModel('action')->getList('case', $caseID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -48,12 +48,12 @@ class todo extends control
|
||||
$header['title'] = $this->lang->my->common . $this->lang->colon . $this->lang->todo->create;
|
||||
$position[] = $this->lang->todo->create;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('dates', $this->todo->buildDateList(0, 3));
|
||||
$this->assign('date', $date);
|
||||
$this->assign('times', $this->todo->buildTimeList());
|
||||
$this->assign('time', $this->todo->now());
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->dates = $this->todo->buildDateList(0, 3);
|
||||
$this->view->date = $date;
|
||||
$this->view->times = $this->todo->buildTimeList();
|
||||
$this->view->time = $this->todo->now();
|
||||
$this->display();
|
||||
}
|
||||
|
||||
@@ -79,11 +79,11 @@ class todo extends control
|
||||
$header['title'] = $this->lang->my->common . $this->lang->colon . $this->lang->todo->edit;
|
||||
$position[] = $this->lang->todo->edit;
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('dates', $this->todo->buildDateList());
|
||||
$this->assign('times', $this->todo->buildTimeList());
|
||||
$this->assign('todo', $todo);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->dates = $this->todo->buildDateList();
|
||||
$this->view->times = $this->todo->buildTimeList();
|
||||
$this->view->todo = $todo;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -84,15 +84,15 @@ class tree extends control
|
||||
}
|
||||
|
||||
$parentModules = $this->tree->getParents($currentModuleID);
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('productID', $productID);
|
||||
$this->assign('product', $product);
|
||||
$this->assign('viewType', $viewType);
|
||||
$this->assign('modules', $this->tree->getTreeMenu($productID, $viewType, $rooteModuleID = 0, array('treeModel', 'createManageLink')));
|
||||
$this->assign('sons', $this->tree->getSons($productID, $currentModuleID, $viewType));
|
||||
$this->assign('currentModuleID', $currentModuleID);
|
||||
$this->assign('parentModules', $parentModules);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->productID = $productID;
|
||||
$this->view->product = $product;
|
||||
$this->view->viewType = $viewType;
|
||||
$this->view->modules = $this->tree->getTreeMenu($productID, $viewType, $rooteModuleID = 0, array('treeModel', 'createManageLink'));
|
||||
$this->view->sons = $this->tree->getSons($productID, $currentModuleID, $viewType);
|
||||
$this->view->currentModuleID = $currentModuleID;
|
||||
$this->view->parentModules = $parentModules;
|
||||
$this->display();
|
||||
}
|
||||
|
||||
|
||||
@@ -63,15 +63,15 @@ class user extends control
|
||||
$position[] = $this->lang->user->todo;
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('tabID', 'todo');
|
||||
$this->assign('dates', $this->todo->buildDateList());
|
||||
$this->assign('date', $date);
|
||||
$this->assign('todos', $todos);
|
||||
$this->assign('user', $user);
|
||||
$this->assign('account', $account);
|
||||
$this->assign('type', $type);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->tabID = 'todo';
|
||||
$this->view->dates = $this->todo->buildDateList();
|
||||
$this->view->date = $date;
|
||||
$this->view->todos = $todos;
|
||||
$this->view->user = $user;
|
||||
$this->view->account = $account;
|
||||
$this->view->type = $type;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -94,11 +94,11 @@ class user extends control
|
||||
$position[] = $this->lang->user->task;
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('tabID', 'task');
|
||||
$this->assign('tasks', $this->task->getUserTasks($account));
|
||||
$this->assign('user', $this->dao->findByAccount($account)->from(TABLE_USER)->fetch());
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->tabID = 'task';
|
||||
$this->view->tasks = $this->task->getUserTasks($account);
|
||||
$this->view->user = $this->dao->findByAccount($account)->from(TABLE_USER)->fetch();
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -121,12 +121,12 @@ class user extends control
|
||||
$position[] = $this->lang->user->bug;
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('tabID', 'bug');
|
||||
$this->assign('bugs', $this->user->getBugs($account));
|
||||
$this->assign('user', $this->dao->findByAccount($account)->from(TABLE_USER)->fetch());
|
||||
$this->assign('users', $this->user->getPairs('noletter'));
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->tabID = 'bug';
|
||||
$this->view->bugs = $this->user->getBugs($account);
|
||||
$this->view->user = $this->dao->findByAccount($account)->from(TABLE_USER)->fetch();
|
||||
$this->view->users = $this->user->getPairs('noletter');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -147,11 +147,11 @@ class user extends control
|
||||
$position[] = $this->lang->user->project;
|
||||
|
||||
/* 赋值。*/
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('tabID', 'project');
|
||||
$this->assign('projects', $this->user->getProjects($account));
|
||||
$this->assign('user', $this->dao->findByAccount($account)->from(TABLE_USER)->fetch());
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->tabID = 'project';
|
||||
$this->view->projects = $this->user->getProjects($account);
|
||||
$this->view->user = $this->dao->findByAccount($account)->from(TABLE_USER)->fetch();
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -165,9 +165,9 @@ class user extends control
|
||||
/* 设置菜单。*/
|
||||
$this->user->setMenu($this->user->getPairs('noempty|noclosed'), $account);
|
||||
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('user', $this->user->getById($account));
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->user = $this->user->getById($account);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -201,10 +201,10 @@ class user extends control
|
||||
|
||||
$header['title'] = $this->lang->company->common . $this->lang->colon . $this->lang->user->create;
|
||||
$position[] = $this->lang->user->create;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('depts', $this->dept->getOptionMenu());
|
||||
$this->assign('deptID', $deptID);
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->depts = $this->dept->getOptionMenu();
|
||||
$this->view->deptID = $deptID;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -230,10 +230,10 @@ class user extends control
|
||||
|
||||
$header['title'] = $this->lang->company->common . $this->lang->colon . $this->lang->user->edit;
|
||||
$position[] = $this->lang->user->edit;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('position', $position);
|
||||
$this->assign('user', $this->user->getById($userID));
|
||||
$this->assign('depts', $this->dept->getOptionMenu());
|
||||
$this->view->header = $header;
|
||||
$this->view->position = $position;
|
||||
$this->view->user = $this->user->getById($userID);
|
||||
$this->view->depts = $this->dept->getOptionMenu();
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -339,8 +339,8 @@ class user extends control
|
||||
else
|
||||
{
|
||||
$header['title'] = $this->lang->user->login;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('referer', $this->referer);
|
||||
$this->view->header = $header;
|
||||
$this->view->referer = $this->referer;
|
||||
$this->display();
|
||||
}
|
||||
}
|
||||
@@ -350,11 +350,11 @@ class user extends control
|
||||
{
|
||||
$this->setReferer();
|
||||
$header['title'] = $this->lang->user->deny;
|
||||
$this->assign('header', $header);
|
||||
$this->assign('module', $module);
|
||||
$this->assign('method', $method);
|
||||
$this->assign('denyPage', $this->referer); // 访问受限的页面。
|
||||
$this->assign('refererBeforeDeny', $refererBeforeDeny); // 受限页面之前的referer页面。
|
||||
$this->view->header = $header;
|
||||
$this->view->module = $module;
|
||||
$this->view->method = $method;
|
||||
$this->view->denyPage = $this->referer; // 访问受限的页面。
|
||||
$this->view->refererBeforeDeny = $refererBeforeDeny; // 受限页面之前的referer页面。
|
||||
$this->app->loadLang($module);
|
||||
$this->app->loadLang('index');
|
||||
$this->display();
|
||||
|
||||
Reference in New Issue
Block a user