diff --git a/lib/zin/wg/history/v1.php b/lib/zin/wg/history/v1.php index 1568cc268f..ade13d2d47 100644 --- a/lib/zin/wg/history/v1.php +++ b/lib/zin/wg/history/v1.php @@ -13,6 +13,7 @@ class history extends wg 'commentUrl?: string', 'commentBtn?: bool', 'bodyClass?: string', + 'hasComment?: bool', ); public static function getPageCSS(): string|false @@ -230,7 +231,7 @@ class history extends wg $isInModal = isAjaxRequest('modal'); $padding = $isInModal ? 'px-3 pd-3' : 'px-6 pb-6'; - list($commentUrl, $bodyClass) = $this->prop(array('commentUrl', 'bodyClass')); + list($commentUrl, $bodyClass, $hasComment) = $this->prop(array('commentUrl', 'bodyClass', 'hasComment')); return panel ( setClass('history', 'pt-4', 'h-full', $padding), @@ -257,11 +258,11 @@ class history extends wg ) ), div(setClass('mt-3'), $this->historyList()), - commentDialog + $hasComment !== false ? commentDialog ( set::name('comment'), set::url($commentUrl), - ) + ) : null ); } } diff --git a/module/testcase/ui/edit.html.php b/module/testcase/ui/edit.html.php index 6f00d0fc4b..279dce5bae 100644 --- a/module/testcase/ui/edit.html.php +++ b/module/testcase/ui/edit.html.php @@ -143,7 +143,7 @@ detailBody editor ( set::name('comment'), - set::rows(5) + set::rows(5), ) ) ), @@ -152,6 +152,7 @@ detailBody set::actions($actions), set::users($users), set::methodName($methodName), + set::hasComment(false), ), detailSide (