* Display todo module all the time.

This commit is contained in:
daitingting
2017-05-09 16:41:53 +08:00
parent d9bb5678bb
commit 28ce46a835
4 changed files with 9 additions and 7 deletions
-1
View File
@@ -49,7 +49,6 @@ class block extends control
if(!common::hasPriv($moduleKey, 'index')) unset($modules[$moduleKey]);
}
if($this->config->global->flow != 'full') unset($modules['todo']);
if($this->config->global->flow == 'onlyTask' or $this->config->global->flow == 'onlyStory') unset($modules['qa']);
if($this->config->global->flow == 'onlyTask' or $this->config->global->flow == 'onlyTest') unset($modules['product']);
if($this->config->global->flow == 'onlyStory' or $this->config->global->flow == 'onlyTest') unset($modules['project']);
-3
View File
@@ -568,7 +568,6 @@ if(isset($config->global->flow) and $config->global->flow == 'onlyStory')
/* Adjust sub menu of my dashboard. */
unset($lang->my->menu->bug);
unset($lang->my->menu->todo);
unset($lang->my->menu->testtask);
unset($lang->my->menu->task);
unset($lang->my->menu->myProject);
@@ -601,7 +600,6 @@ if(isset($config->global->flow) and $config->global->flow == 'onlyTask')
/* Adjust sub menu of my dashboard. */
unset($lang->my->menu->bug);
unset($lang->my->menu->todo);
unset($lang->my->menu->testtask);
unset($lang->my->menu->story);
@@ -647,7 +645,6 @@ if(isset($config->global->flow) and $config->global->flow == 'onlyTest')
unset($lang->my->menu->task);
unset($lang->my->menu->myProject);
unset($lang->my->menu->story);
unset($lang->my->menu->todo);
/* Remove sub menu of project module. */
unset($lang->project->menu);
+4
View File
@@ -57,6 +57,10 @@ $lang->todo->typeList['custom'] = '自定义';
$lang->todo->typeList['bug'] = 'Bug';
$lang->todo->typeList['task'] = $lang->projectCommon . '任务';
global $config;
if($config->global->flow == 'onlyTest' or $config->global->flow == 'onlyStory') unset($lang->todo->typeList['task']);
if($config->global->flow == 'onlyTask' or $config->global->flow == 'onlyStory') unset($lang->todo->typeList['bug']);
$lang->todo->confirmDelete = "您确定要删除这条待办吗?";
$lang->todo->thisIsPrivate = '这是一条私人事务。:)';
$lang->todo->lblDisableDate = '暂时不设定时间';
+5 -3
View File
@@ -323,6 +323,10 @@ class todoModel extends model
while($todo = $stmt->fetch())
{
if($this->config->global->flow == 'onlyTest' and $todo->type == 'task') continue;
if($this->config->global->flow == 'onlyTask' and $todo->type == 'bug') continue;
if($this->config->global->flow == 'onlyStory' and $todo->type != 'custom') continue;
if($todo->type == 'task') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_TASK)->fetch('name');
if($todo->type == 'bug') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_BUG)->fetch('title');
$todo->begin = date::formatTime($todo->begin);
@@ -330,6 +334,7 @@ class todoModel extends model
/* If is private, change the title to private. */
if($todo->private and $this->app->user->account != $todo->account) $todo->name = $this->lang->todo->thisIsPrivate;
$todos[] = $todo;
}
return $todos;
@@ -352,6 +357,3 @@ class todoModel extends model
return true;
}
}