* Rewrite stakeholder communicate and expect page.

This commit is contained in:
wangyidong
2023-08-08 14:35:07 +08:00
parent 870479ab65
commit 86a2bc7cd3
5 changed files with 62 additions and 8 deletions
+1 -1
View File
@@ -14,7 +14,7 @@ $config->stakeholder->actionList['communicate']['data-toggle'] = 'modal';
$config->stakeholder->actionList['expect']['icon'] = 'flag';
$config->stakeholder->actionList['expect']['text'] = $lang->stakeholder->expect;
$config->stakeholder->actionList['expect']['hint'] = $lang->stakeholder->expect;
$config->stakeholder->actionList['expect']['url'] = array('module' => 'stakeholder', 'method' => 'communicate', 'params' => 'id={id}');
$config->stakeholder->actionList['expect']['url'] = array('module' => 'stakeholder', 'method' => 'expect', 'params' => 'id={id}');
$config->stakeholder->actionList['expect']['data-toggle'] = 'modal';
$config->stakeholder->actionList['edit']['icon'] = 'edit';
+6 -6
View File
@@ -372,8 +372,9 @@ class stakeholder extends control
$this->commonAction($userID, 'stakeholder');
if(!empty($_POST))
{
if(dao::isError()) return print(js::error(dao::getError()));
if(isonlybody()) return print(js::closeModal('parent.parent', 'this'));
$this->stakeholder->communicate($userID);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
return $this->send(array('result' => 'success', 'closeModal' => true));
}
$this->view->title = $this->lang->stakeholder->common . $this->lang->colon . $this->lang->stakeholder->communicate;
@@ -395,10 +396,9 @@ class stakeholder extends control
if(!empty($_POST))
{
$expectID = $this->stakeholder->expect($user->id);
if(dao::isError()) return print(js::error(dao::getError()));
return print(js::closeModal('parent.parent', 'this'));
$this->stakeholder->expect($user->id);
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
return $this->send(array('result' => 'success', 'closeModal' => true));
}
$this->view->title = $this->lang->stakeholder->common . $this->lang->colon . $this->lang->stakeholder->communicate;
@@ -0,0 +1,25 @@
<?php
declare(strict_types=1);
/**
* The communicate file of stakeholder module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Wangy Yidong <yidong@cnezsoft.com>
* @package stakeholder
* @link http://www.zentao.net
*/
namespace zin;
modalHeader(set::entityID($user->id), set::entityText($user->name));
formPanel
(
formGroup
(
set::label($lang->stakeholder->communicate),
set::name('comment'),
set::control('editor'),
),
);
hr();
history();
+1 -1
View File
@@ -1,7 +1,7 @@
<?php
declare(strict_types=1);
/**
* The create view file of stakeholder module of ZenTaoPMS.
* The edit view file of stakeholder module of ZenTaoPMS.
* @copyright Copyright 2009-2023 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.zentao.net)
* @license ZPL(https://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author stakeholder <stakeholder@easycorp.ltd>
+29
View File
@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
/**
* The expect file of stakeholder module of ZenTaoPMS.
*
* @copyright Copyright 2009-2015 禅道软件(青岛)有限公司(ZenTao Software (Qingdao) Co., Ltd. www.cnezsoft.com)
* @license ZPL(http://zpl.pub/page/zplv12.html) or AGPL(https://www.gnu.org/licenses/agpl-3.0.en.html)
* @author Wang Yidong <yidong@cnezsoft.com>
* @package stakeholder
* @link http://www.zentao.net
*/
namespace zin;
modalHeader(set::entityID($user->id), set::entityText($user->name));
formPanel
(
formGroup
(
set::label($lang->stakeholder->expect),
set::name('expect'),
set::control('editor'),
),
formGroup
(
set::label($lang->stakeholder->progress),
set::name('progress'),
set::control('editor'),
),
);