diff --git a/module/todo/lang/zh-cn.php b/module/todo/lang/zh-cn.php
index d26736be2e..29a5f6b1c2 100644
--- a/module/todo/lang/zh-cn.php
+++ b/module/todo/lang/zh-cn.php
@@ -68,6 +68,7 @@ $lang->todo->finishedDate = '完成时间';
$lang->todo->closedBy = '由谁关闭';
$lang->todo->closedDate = '关闭时间';
$lang->todo->deadline = '过期时间';
+$lang->todo->deleted = '已删除';
$lang->todo->every = '间隔';
$lang->todo->specify = '指定';
diff --git a/module/todo/view/view.html.php b/module/todo/view/view.html.php
index a9c7c7547f..4ade094eed 100644
--- a/module/todo/view/view.html.php
+++ b/module/todo/view/view.html.php
@@ -19,6 +19,9 @@
";
- echo html::a($this->createLink('todo', 'finish', "id=$todo->id", 'html', true), "
", 'hiddenwin', "title='{$lang->todo->finish}' class='btn showinonlybody btn-success'");
- $createStoryPriv = common::hasPriv('story', 'create');
- $createTaskPriv = common::hasPriv('task', 'create');
- $createBugPriv = common::hasPriv('bug', 'create');
- if($createStoryPriv or $createTaskPriv or $createBugPriv)
+ if($todo->status == 'wait') common::printLink('todo', 'start', "todoID=$todo->id", "
", 'hiddenwin', "title='{$lang->todo->start}' class='btn showinonlybody'");
+ if($todo->status == 'done' || $todo->status == 'closed') common::printLink('todo', 'activate', "todoID=$todo->id", "
", 'hiddenwin', "title='{$lang->todo->activate}' class='btn showinonlybody'");
+ if($todo->status == 'done') common::printLink('todo', 'close', "todoID=$todo->id", "
", 'hiddenwin', "title='{$lang->todo->close}' class='btn showinonlybody'");
+ common::printLink('todo', 'edit', "todoID=$todo->id", "
", '', "title='{$lang->todo->edit}' class='btn showinonlybody'");
+ common::printLink('todo', 'delete', "todoID=$todo->id", "
", 'hiddenwin', "title='{$lang->todo->delete}' class='btn showinonlybody'");
+
+ if($todo->status != 'done' && $todo->status != 'closed')
{
- $isonlybody = isonlybody();
- unset($_GET['onlybody']);
- echo "
";
- echo "";
- if($isonlybody) $_GET['onlybody'] = 'yes';
+ echo "
";
+ echo html::a($this->createLink('todo', 'finish', "id=$todo->id", 'html', true), "", 'hiddenwin', "title='{$lang->todo->finish}' class='btn showinonlybody btn-success'");
+ $createStoryPriv = common::hasPriv('story', 'create');
+ $createTaskPriv = common::hasPriv('task', 'create');
+ $createBugPriv = common::hasPriv('bug', 'create');
+ if($createStoryPriv or $createTaskPriv or $createBugPriv)
+ {
+ $isonlybody = isonlybody();
+ unset($_GET['onlybody']);
+ echo "";
+ echo "";
+ if($isonlybody) $_GET['onlybody'] = 'yes';
+ }
+ echo "
";
}
- echo "
";
}
}
common::printRPN($browseLink);