From cb1ca450559d884e9fd2ed72c3cdba5d587ddd74 Mon Sep 17 00:00:00 2001 From: sunhao Date: Sun, 12 Nov 2023 21:41:10 +0800 Subject: [PATCH] * refactor usage of the new history widget. --- extension/lite/story/ext/ui/view.html.php | 2 +- module/bug/ui/view.html.php | 2 +- module/kanban/ui/viewcard.html.php | 2 +- module/productplan/ui/view.html.php | 6 +----- module/story/ui/view.html.php | 2 +- module/task/ui/view.html.php | 2 +- module/testtask/ui/view.html.php | 2 +- module/todo/ui/view.html.php | 2 +- module/zahost/ui/view.html.php | 2 +- module/zanode/ui/view.html.php | 2 +- 10 files changed, 10 insertions(+), 14 deletions(-) diff --git a/extension/lite/story/ext/ui/view.html.php b/extension/lite/story/ext/ui/view.html.php index 7b931f25b6..21d22edbab 100644 --- a/extension/lite/story/ext/ui/view.html.php +++ b/extension/lite/story/ext/ui/view.html.php @@ -205,7 +205,7 @@ detailBody ) ), ), - history(set::commentUrl(helper::createLink('action', 'comment', "objectType=story&objectID=$story->id"))), + history(), floatToolbar ( set::object($story), diff --git a/module/bug/ui/view.html.php b/module/bug/ui/view.html.php index 95eada1b3c..3d19540652 100644 --- a/module/bug/ui/view.html.php +++ b/module/bug/ui/view.html.php @@ -202,7 +202,7 @@ detailBody set::padding(false), ), ), - history(set::commentUrl(createLink('action', 'comment', array('objectType' => 'bug', 'objectID' => $bug->id)))), + history(), floatToolbar ( set::object($bug), diff --git a/module/kanban/ui/viewcard.html.php b/module/kanban/ui/viewcard.html.php index bd21d74d30..d1fff8fa01 100644 --- a/module/kanban/ui/viewcard.html.php +++ b/module/kanban/ui/viewcard.html.php @@ -45,7 +45,7 @@ detailBody set::useHtml(true) ) ), - history(set::commentUrl(createLink('action', 'comment', array('objectType' => 'kanbancard', 'objectID' => $card->id)))), + history(set(array('objectType' => 'kanbancard', 'objectID' => $card->id))), floatToolbar ( set::object($card), diff --git a/module/productplan/ui/view.html.php b/module/productplan/ui/view.html.php index 85081cdf2a..a012da74e7 100644 --- a/module/productplan/ui/view.html.php +++ b/module/productplan/ui/view.html.php @@ -267,11 +267,7 @@ detailBody item(set::name($lang->productplan->desc), empty($plan->desc) ? $lang->noData : html(($plan->desc))), ), h::hr(setClass('mt-4')), - history( - set::hasCommont(false), - set::commentBtn(false), - set::methodName('view_1'), - ), + history(set::commentBtn(false)), ), ) ) diff --git a/module/story/ui/view.html.php b/module/story/ui/view.html.php index f6995bd9a7..1a734e5b1e 100644 --- a/module/story/ui/view.html.php +++ b/module/story/ui/view.html.php @@ -212,7 +212,7 @@ detailBody ) ), ), - history(set::commentUrl(helper::createLink('action', 'comment', "objectType=story&objectID=$story->id"))), + history(), floatToolbar ( set::object($story), diff --git a/module/task/ui/view.html.php b/module/task/ui/view.html.php index 2d4e24120f..ce478b74e9 100644 --- a/module/task/ui/view.html.php +++ b/module/task/ui/view.html.php @@ -208,7 +208,7 @@ detailBody ( set::files($task->files), ) : null, - history(set::commentUrl(createLink('action', 'comment', array('objectType' => 'task', 'objectID' => $task->id))),), + history(), floatToolbar ( isAjaxRequest('modal') ? null : to::prefix(backBtn(set::icon('back'), $lang->goback)), diff --git a/module/testtask/ui/view.html.php b/module/testtask/ui/view.html.php index b4d16fc3e9..41fa79dc46 100644 --- a/module/testtask/ui/view.html.php +++ b/module/testtask/ui/view.html.php @@ -43,7 +43,7 @@ detailBody set::content($task->desc ? $task->desc : $lang->noData), set::useHtml(true) ), - history(set::commentUrl(helper::createLink('action', 'comment', "objectType=testtask&objectID=$task->id"))), + history(set::objectID($task->id)), center ( floatToolbar diff --git a/module/todo/ui/view.html.php b/module/todo/ui/view.html.php index b32b46d102..8967ea863a 100644 --- a/module/todo/ui/view.html.php +++ b/module/todo/ui/view.html.php @@ -392,7 +392,7 @@ detailBody to::actions($fnGenerateTitleSuffix()), ), $fromItemData, - history(set::commentUrl(createLink('action', 'comment', "objectType=todo&objectID=$todo->id"))), + history(), /* Render float toolbar. */ $actionList ? center(floatToolbar(set($actionList))) : null diff --git a/module/zahost/ui/view.html.php b/module/zahost/ui/view.html.php index 39bfab6aa7..2dc1bf51b5 100644 --- a/module/zahost/ui/view.html.php +++ b/module/zahost/ui/view.html.php @@ -266,7 +266,7 @@ detailBody ), detailSide ( - history(set::commentUrl(createLink('action', 'comment', array('objectType' => 'zahost', 'objectID' => $zahost->id))),), + history() ), ); diff --git a/module/zanode/ui/view.html.php b/module/zanode/ui/view.html.php index 4902ed8662..2470eeec1e 100644 --- a/module/zanode/ui/view.html.php +++ b/module/zanode/ui/view.html.php @@ -487,7 +487,7 @@ detailBody ), detailSide ( - history(set::commentUrl(createLink('action', 'comment', array('objectType' => 'zanode', 'objectID' => $zanode->id))),), + history() ), );