* Add story for todo
This commit is contained in:
@@ -48,10 +48,12 @@ class todo extends control
|
||||
{
|
||||
$date = 'future';
|
||||
}
|
||||
else if($date == date('Ymd'))
|
||||
elseif($date == date('Ymd'))
|
||||
{
|
||||
$date = 'today';
|
||||
}
|
||||
|
||||
if(!empty($_POST['idvalue'])) $this->send(array('result' => 'success'));
|
||||
die(js::locate($this->createLink('my', 'todo', "type=$date"), 'parent'));
|
||||
}
|
||||
|
||||
|
||||
@@ -43,9 +43,9 @@ $lang->todo->private = 'Private';
|
||||
$lang->todo->confirmBug = 'This To-Do is related to Bug #%s. Do you want to edit it?';
|
||||
$lang->todo->confirmTask = 'This To-Do is related to Task #%s,Do you want to edit it?';
|
||||
|
||||
$lang->todo->statusList['wait'] = 'Wait';
|
||||
$lang->todo->statusList['doing'] = 'Doing';
|
||||
$lang->todo->statusList['done'] = 'Done';
|
||||
$lang->todo->statusList['wait'] = 'Wait';
|
||||
$lang->todo->statusList['doing'] = 'Doing';
|
||||
$lang->todo->statusList['done'] = 'Done';
|
||||
//$lang->todo->statusList['cancel'] = 'Cancelled';
|
||||
//$lang->todo->statusList['postpone'] = 'Delayed';
|
||||
|
||||
@@ -57,6 +57,7 @@ $lang->todo->priList[4] = '4';
|
||||
$lang->todo->typeList['custom'] = 'Custom';
|
||||
$lang->todo->typeList['bug'] = 'Bug';
|
||||
$lang->todo->typeList['task'] = $lang->projectCommon . 'Task';
|
||||
$lang->todo->typeList['story'] = $lang->projectCommon . 'Story';
|
||||
|
||||
global $config;
|
||||
if($config->global->flow == 'onlyTest' or $config->global->flow == 'onlyStory') unset($lang->todo->typeList['task']);
|
||||
@@ -80,5 +81,5 @@ $lang->todo->periods['before'] = 'Undone';
|
||||
$lang->todo->periods['all'] = 'All';
|
||||
|
||||
$lang->todo->action = new stdclass();
|
||||
$lang->todo->action->finished = array('main' => '$date, is finished by <strong>$actor</strong>.');
|
||||
$lang->todo->action->marked = array('main' => '$date, is marked by <strong>$actor</strong> as <strong>$extra</strong>.', 'extra' => 'statusList');
|
||||
$lang->todo->action->finished = array('main' => '$date, is finished by <strong>$actor</strong>.');
|
||||
$lang->todo->action->marked = array('main' => '$date, is marked by <strong>$actor</strong> as <strong>$extra</strong>.', 'extra' => 'statusList');
|
||||
|
||||
@@ -43,9 +43,9 @@ $lang->todo->private = '私人事务';
|
||||
$lang->todo->confirmBug = '该Todo关联的是Bug #%s,需要修改它吗?';
|
||||
$lang->todo->confirmTask = '该Todo关联的是Task #%s,需要修改它吗?';
|
||||
|
||||
$lang->todo->statusList['wait'] = '未开始';
|
||||
$lang->todo->statusList['doing'] = '进行中';
|
||||
$lang->todo->statusList['done'] = '已完成';
|
||||
$lang->todo->statusList['wait'] = '未开始';
|
||||
$lang->todo->statusList['doing'] = '进行中';
|
||||
$lang->todo->statusList['done'] = '已完成';
|
||||
//$lang->todo->statusList['cancel'] = '已取消';
|
||||
//$lang->todo->statusList['postpone'] = '已延期';
|
||||
|
||||
@@ -57,6 +57,7 @@ $lang->todo->priList[4] = '最低';
|
||||
$lang->todo->typeList['custom'] = '自定义';
|
||||
$lang->todo->typeList['bug'] = 'Bug';
|
||||
$lang->todo->typeList['task'] = $lang->projectCommon . '任务';
|
||||
$lang->todo->typeList['story'] = $lang->projectCommon . '需求';
|
||||
|
||||
global $config;
|
||||
if($config->global->flow == 'onlyTest' or $config->global->flow == 'onlyStory') unset($lang->todo->typeList['task']);
|
||||
@@ -80,5 +81,5 @@ $lang->todo->periods['before'] = '未完';
|
||||
$lang->todo->periods['all'] = '所有';
|
||||
|
||||
$lang->todo->action = new stdclass();
|
||||
$lang->todo->action->finished = array('main' => '$date, 由 <strong>$actor</strong>完成');
|
||||
$lang->todo->action->marked = array('main' => '$date, 由 <strong>$actor</strong> 标记为<strong>$extra</strong>。', 'extra' => 'statusList');
|
||||
$lang->todo->action->finished = array('main' => '$date, 由 <strong>$actor</strong>完成');
|
||||
$lang->todo->action->marked = array('main' => '$date, 由 <strong>$actor</strong> 标记为<strong>$extra</strong>。', 'extra' => 'statusList');
|
||||
|
||||
@@ -236,8 +236,9 @@ class todoModel extends model
|
||||
if(!$todo) return false;
|
||||
$todo = $this->loadModel('file')->replaceImgURL($todo, 'desc');
|
||||
if($setImgSize) $todo->desc = $this->file->setImgSize($todo->desc);
|
||||
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');
|
||||
if($todo->type == 'story') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_STORY)->fetch('title');
|
||||
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->date = str_replace('-', '', $todo->date);
|
||||
return $todo;
|
||||
}
|
||||
@@ -336,8 +337,9 @@ class todoModel extends model
|
||||
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');
|
||||
if($todo->type == 'story') $todo->name = $this->dao->findById($todo->idvalue)->from(TABLE_STORY)->fetch('title');
|
||||
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);
|
||||
$todo->end = date::formatTime($todo->end);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user