+19
-2
@@ -231,9 +231,26 @@ class actionModel extends model
|
||||
$objectIds = array_unique($objectIds);
|
||||
$table = $this->config->action->objectTables[$objectType];
|
||||
$field = $this->config->action->objectNameFields[$objectType];
|
||||
$objectNames[$objectType] = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIds)->fetchPairs();
|
||||
if($table != 'zt_todo')
|
||||
{
|
||||
$objectNames[$objectType] = $this->dao->select("id, $field AS name")->from($table)->where('id')->in($objectIds)->fetchPairs();
|
||||
}
|
||||
else
|
||||
{
|
||||
$todos = $this->dao->select("id, $field AS name, account, private")->from($table)->where('id')->in($objectIds)->fetchAll('id');
|
||||
foreach($todos as $id => $todo)
|
||||
{
|
||||
if($todo->private == 1 and $todo->account != $this->app->user->account)
|
||||
{
|
||||
$objectNames[$objectType][$id] = $this->lang->todo->thisIsPrivate;
|
||||
}
|
||||
else
|
||||
{
|
||||
$objectNames[$objectType][$id] = $todo->name;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$objectNames['user'][0] = 'guest'; // Add guest account.
|
||||
|
||||
foreach($actions as $action)
|
||||
|
||||
@@ -199,8 +199,9 @@ class project extends control
|
||||
$this->view->position[] = $this->lang->project->task;
|
||||
|
||||
/* Get tasks and group them. */
|
||||
$tasks = $this->loadModel('task')->getProjectTasks($projectID, $status = 'all', $groupBy);
|
||||
$tasks = $this->loadModel('task')->getProjectTasks($projectID, $status = 'all', $groupBy ? $groupBy : 'story');
|
||||
$groupBy = strtolower(str_replace('`', '', $groupBy));
|
||||
|
||||
$taskLang = $this->lang->task;
|
||||
$groupByList = array();
|
||||
$groupTasks = array();
|
||||
@@ -214,6 +215,11 @@ class project extends control
|
||||
$groupTasks[$task->story][] = $task;
|
||||
$groupByList[$task->story] = $task->storyTitle;
|
||||
}
|
||||
elseif($groupBy == '')
|
||||
{
|
||||
$groupTasks[$task->story][] = $task;
|
||||
$groupByList[$task->story] = $task->storyTitle;
|
||||
}
|
||||
elseif($groupBy == 'status')
|
||||
{
|
||||
$groupTasks[$taskLang->statusList[$task->status]][] = $task;
|
||||
@@ -249,6 +255,7 @@ class project extends control
|
||||
$this->view->tabID = 'task';
|
||||
$this->view->groupByList = $groupByList;
|
||||
$this->view->browseType = 'group';
|
||||
$this->view->groupBy = $groupBy;
|
||||
$this->view->orderBy = $groupBy;
|
||||
$this->view->projectID = $projectID;
|
||||
$this->view->users = $users;
|
||||
|
||||
@@ -90,6 +90,7 @@ $lang->project->statusDoing = 'Doing';
|
||||
$lang->project->statusDone = 'Done';
|
||||
$lang->project->statusClosed = 'Closed';
|
||||
$lang->project->delayed = 'Delayed';
|
||||
$lang->project->groups[''] = 'Group by look';
|
||||
$lang->project->groups['story'] = 'Group by story';
|
||||
$lang->project->groups['status'] = 'Group by status';
|
||||
$lang->project->groups['pri'] = 'Group by priority';
|
||||
|
||||
@@ -90,6 +90,7 @@ $lang->project->statusDoing = '进行中';
|
||||
$lang->project->statusDone = '已完成';
|
||||
$lang->project->statusClosed = '已关闭';
|
||||
$lang->project->delayed = '已延期';
|
||||
$lang->project->groups[''] = '分组查看';
|
||||
$lang->project->groups['story'] = '需求分组';
|
||||
$lang->project->groups['status'] = '状态分组';
|
||||
$lang->project->groups['pri'] = '优先级分组';
|
||||
|
||||
Reference in New Issue
Block a user