From dd0d97a437b5a16e46f2e58bf92598c894eed5cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BB=94=E5=93=A5?= Date: Fri, 12 Jan 2018 10:38:11 +0800 Subject: [PATCH] * Finish Task#3587. --- db/zentao.sql | 24 ++++++++++++++++++++++++ module/group/lang/resource.php | 7 +++++-- module/todo/config.php | 3 ++- module/todo/view/view.html.php | 10 ++++++++++ 4 files changed, 41 insertions(+), 3 deletions(-) diff --git a/db/zentao.sql b/db/zentao.sql index a3a98f5372..f1f705b2a0 100644 --- a/db/zentao.sql +++ b/db/zentao.sql @@ -1518,6 +1518,9 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (2, 'todo', 'finish'), (2, 'todo', 'import2Today'), (2, 'todo', 'view'), +(2, 'todo', 'assignTo'), +(2, 'todo', 'activate'), +(2, 'todo', 'close'), (2, 'user', 'bug'), (2, 'user', 'deleteContacts'), (2, 'user', 'dynamic'), @@ -1957,6 +1960,9 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (4, 'todo', 'finish'), (4, 'todo', 'import2Today'), (4, 'todo', 'view'), +(4, 'todo', 'assignTo'), +(4, 'todo', 'activate'), +(4, 'todo', 'close'), (4, 'tree', 'browse'), (4, 'tree', 'browseTask'), (4, 'tree', 'delete'), @@ -2214,6 +2220,9 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (5, 'todo', 'finish'), (5, 'todo', 'import2Today'), (5, 'todo', 'view'), +(5, 'todo', 'assignTo'), +(5, 'todo', 'activate'), +(5, 'todo', 'close'), (5, 'tree', 'browse'), (5, 'tree', 'browseTask'), (5, 'tree', 'delete'), @@ -2443,6 +2452,9 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (6, 'todo', 'finish'), (6, 'todo', 'import2Today'), (6, 'todo', 'view'), +(6, 'todo', 'assignTo'), +(6, 'todo', 'activate'), +(6, 'todo', 'close'), (6, 'tree', 'browse'), (6, 'tree', 'browseTask'), (6, 'tree', 'delete'), @@ -2684,6 +2696,9 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (7, 'todo', 'finish'), (7, 'todo', 'import2Today'), (7, 'todo', 'view'), +(7, 'todo', 'assignTo'), +(7, 'todo', 'activate'), +(7, 'todo', 'close'), (7, 'tree', 'browse'), (7, 'tree', 'browseTask'), (7, 'tree', 'delete'), @@ -2937,6 +2952,9 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (8, 'todo', 'finish'), (8, 'todo', 'import2Today'), (8, 'todo', 'view'), +(8, 'todo', 'assignTo'), +(8, 'todo', 'activate'), +(8, 'todo', 'close'), (8, 'tree', 'browse'), (8, 'tree', 'browseTask'), (8, 'tree', 'delete'), @@ -3103,6 +3121,9 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (9, 'todo', 'finish'), (9, 'todo', 'import2Today'), (9, 'todo', 'view'), +(9, 'todo', 'assignTo'), +(9, 'todo', 'activate'), +(9, 'todo', 'close'), (9, 'user', 'batchCreate'), (9, 'user', 'batchEdit'), (9, 'user', 'bug'), @@ -3217,6 +3238,9 @@ INSERT INTO `zt_grouppriv` (`group`, `module`, `method`) VALUES (10, 'todo', 'finish'), (10, 'todo', 'import2Today'), (10, 'todo', 'view'), +(10, 'todo', 'assignTo'), +(10, 'todo', 'activate'), +(10, 'todo', 'close'), (10, 'user', 'bug'), (10, 'user', 'dynamic'), (10, 'user', 'profile'), diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 763705c285..7a6cd501ee 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -115,6 +115,9 @@ $lang->resource->todo->export = 'export'; $lang->resource->todo->finish = 'finish'; $lang->resource->todo->batchFinish = 'batchFinish'; $lang->resource->todo->import2Today = 'import2Today'; +$lang->resource->todo->assignTo = 'assignTo'; +$lang->resource->todo->activate = 'activate'; +$lang->resource->todo->close = 'close'; $lang->todo->methodOrder[5] = 'create'; $lang->todo->methodOrder[10] = 'batchCreate'; @@ -953,7 +956,7 @@ $lang->editor->methodOrder[30] = 'delete'; /* Convert. */ $lang->resource->convert = new stdclass(); $lang->resource->convert->index = 'index'; -$lang->resource->convert->selectSource = 'selectSource'; +$lang->resource->convert->selectSource = 'selectSource'; $lang->resource->convert->setConfig = 'setConfig'; $lang->resource->convert->setBugfree = 'setBugfree'; $lang->resource->convert->setRedmine = 'setRedmine'; @@ -1417,7 +1420,7 @@ if($config->global->flow == 'onlyStory') unset($lang->moduleOrder[150]); unset($lang->resource->git); unset($lang->moduleOrder[155]); - + unset($lang->resource->story->tasks); } diff --git a/module/todo/config.php b/module/todo/config.php index af20d428df..34f3f814b8 100644 --- a/module/todo/config.php +++ b/module/todo/config.php @@ -16,9 +16,10 @@ $config->todo->times->delta = 10; $config->todo->editor = new stdclass(); $config->todo->editor->create = array('id' => 'desc', 'tools' => 'simpleTools'); $config->todo->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools'); +$config->todo->editor->view = array('id' => 'comment,lastComment', 'tools' => 'simpleTools'); $config->todo->list = new stdclass(); -$config->todo->list->exportFields = 'id, account, date, begin, end, type, idvalue, pri, name, desc, status, private'; +$config->todo->list->exportFields = 'id, account, date, begin, end, type, idvalue, pri, name, desc, status, private'; $config->todo->list->customBatchCreateFields = 'type,pri,desc,beginAndEnd'; $config->todo->list->customBatchEditFields = 'pri,desc,beginAndEnd,status'; diff --git a/module/todo/view/view.html.php b/module/todo/view/view.html.php index 1b72750642..bccd6a4b64 100644 --- a/module/todo/view/view.html.php +++ b/module/todo/view/view.html.php @@ -11,6 +11,7 @@ */ ?> + private or ($todo->private and $todo->account == $app->user->account)):?>
@@ -112,6 +113,8 @@ if($todo->status == 'done' || $todo->status == 'closed') echo html::a($this->createLink('todo', 'activate', "todoID=$todo->id"), " " . $lang->todo->activate, 'hiddenwin', "class='btn showinonlybody'"); if($todo->status == 'done') echo html::a($this->createLink('todo', 'close', "todoID=$todo->id"), " " . $lang->todo->close, 'hiddenwin', "class='btn showinonlybody'"); echo html::a($this->createLink('todo', 'delete', "todoID=$todo->id"), " " . $lang->todo->delete, 'hiddenwin', "class='btn showinonlybody'"); + + echo html::a('#commentBox', '', '', "title='$lang->comment' onclick='setComment()' class='btn'"); } if($this->session->todoList) @@ -153,6 +156,13 @@ ?>
+
+ comment;?> +
id")?>' target='hiddenwin'> +
+ +
+