* Finish task #47996.
This commit is contained in:
@@ -1,2 +1,3 @@
|
||||
ALTER TABLE `zt_kanbanspace` ADD `type` varchar(50) NOT NULL AFTER `name`;
|
||||
UPDATE `zt_kanbanspace` SET `type` = 'cooperation';
|
||||
ALTER TABLE `zt_kanban` ADD `performable` enum ('0', '1') NOT NULL DEFAULT '0' AFTER `archived`;
|
||||
|
||||
@@ -996,6 +996,30 @@ class kanban extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set done function.
|
||||
*
|
||||
* @param int $kanbanID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setDoneFunction($kanbanID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->kanban->setDoneFunction($kanbanID);
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
|
||||
|
||||
}
|
||||
|
||||
$this->view->kanban = $this->kanban->getByID($kanbanID);
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* AJAX: Update the cards sorting of the lane column.
|
||||
*
|
||||
|
||||
@@ -37,6 +37,8 @@ $lang->kanban->setCardColor = 'Set Card Color';
|
||||
$lang->kanban->deleteCard = 'Delete Card';
|
||||
$lang->kanban->assigntoCard = 'Assign';
|
||||
$lang->kanban->setting = 'Setting';
|
||||
$lang->kanban->setDoneFunction = 'Set done function';
|
||||
$lang->kanban->doneFunction = 'Done function';
|
||||
$lang->kanban->splitColumn = 'Split Column';
|
||||
$lang->kanban->createColumnOnLeft = 'Create Column On Left';
|
||||
$lang->kanban->createColumnOnRight = 'Create Column On Right';
|
||||
@@ -94,6 +96,9 @@ $lang->kanban->aclList['private'] = 'Private (For the kanban team, whitelist mem
|
||||
$lang->kanban->enableArchived['0'] = 'No Enable';
|
||||
$lang->kanban->enableArchived['1'] = 'Enable';
|
||||
|
||||
$lang->kanban->enableFinished['0'] = 'No Enable';
|
||||
$lang->kanban->enableFinished['1'] = 'Enable';
|
||||
|
||||
$lang->kanban->type = array();
|
||||
$lang->kanban->type['all'] = "All KanBan";
|
||||
$lang->kanban->type['story'] = "Story KanBan";
|
||||
|
||||
@@ -37,6 +37,8 @@ $lang->kanban->setCardColor = '设置卡片颜色';
|
||||
$lang->kanban->deleteCard = '删除卡片';
|
||||
$lang->kanban->assigntoCard = '指派';
|
||||
$lang->kanban->setting = '设置';
|
||||
$lang->kanban->setDoneFunction = '设置完成功能';
|
||||
$lang->kanban->doneFunction = '完成功能';
|
||||
$lang->kanban->splitColumn = '新增子看板列';
|
||||
$lang->kanban->createColumnOnLeft = '左侧新增看板列';
|
||||
$lang->kanban->createColumnOnRight = '右侧新增看板列';
|
||||
@@ -94,6 +96,9 @@ $lang->kanban->aclList['private'] = '私有(看板团队成员、白名单、
|
||||
$lang->kanban->enableArchived['0'] = '不启用';
|
||||
$lang->kanban->enableArchived['1'] = '启用';
|
||||
|
||||
$lang->kanban->enableFinished['0'] = '不启用';
|
||||
$lang->kanban->enableFinished['1'] = '启用';
|
||||
|
||||
$lang->kanban->type = array();
|
||||
$lang->kanban->type['all'] = "综合看板";
|
||||
$lang->kanban->type['story'] = "{$lang->SRCommon}看板";
|
||||
|
||||
+11
-2
@@ -2519,6 +2519,14 @@ class kanbanModel extends model
|
||||
if(dao::isError()) return false;
|
||||
}
|
||||
|
||||
public function setDoneFunction($kanbanID)
|
||||
{
|
||||
$kanban = fixer::input('post')->get();
|
||||
|
||||
$this->dao->update(TABLE_KANBAN)->set('performable')->eq($kanban->performable)->exec();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Set kanban headerActions.
|
||||
*
|
||||
@@ -2545,7 +2553,7 @@ class kanbanModel extends model
|
||||
$actions .= "<div class='btn-group'>";
|
||||
$actions .= "<a href='javascript:fullScreen();' id='fullScreenBtn' class='btn btn-link'><i class='icon icon-fullscreen'></i> {$this->lang->kanban->fullScreen}</a>";
|
||||
|
||||
$printSettingBtn = (common::hasPriv('kanban', 'createRegion') or $printSetHeight or common::hasPriv('kanban', 'edit') or common::hasPriv('kanban', 'close') or common::hasPriv('kanban', 'delete'));
|
||||
$printSettingBtn = (common::hasPriv('kanban', 'createRegion') or $printSetHeight or common::hasPriv('kanban', 'setDoneFunction') or common::hasPriv('kanban', 'edit') or common::hasPriv('kanban', 'close') or common::hasPriv('kanban', 'delete'));
|
||||
|
||||
if($printSettingBtn)
|
||||
{
|
||||
@@ -2558,6 +2566,7 @@ class kanbanModel extends model
|
||||
$actions .= '<li>' . html::a(helper::createLink('kanban', 'setLaneHeight', "kanbanID=$kanban->id", '', true), '<i class="icon icon-size-height"></i>' . $this->lang->kanban->laneHeight, '', "class='iframe btn btn-link' data-width='$width'") . '</li>';
|
||||
|
||||
}
|
||||
if(common::hasPriv('kanban', 'setDoneFunction')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'setDoneFunction', "kanbanID=$kanban->id", '', true), '<i class="icon icon-checked"></i>' . $this->lang->kanban->doneFunction, '', "class='iframe btn btn-link'") . '</li>';
|
||||
|
||||
$kanbanActions = '';
|
||||
$attr = $kanban->status == 'closed' ? "disabled='disabled'" : '';
|
||||
@@ -2566,7 +2575,7 @@ class kanbanModel extends model
|
||||
if(common::hasPriv('kanban', 'delete')) $kanbanActions .= '<li>' . html::a(helper::createLink('kanban', 'delete', "kanbanID=$kanban->id"), '<i class="icon icon-trash"></i>' . $this->lang->kanban->delete, 'hiddenwin', "class='btn btn-link'") . '</li>';
|
||||
if($kanbanActions)
|
||||
{
|
||||
$actions .= ((common::hasPriv('kanban', 'createRegion') or $printSetHeight) and (common::hasPriv('kanban', 'edit') or common::hasPriv('kanban', 'close') or common::hasPriv('kanban', 'delete'))) ? "<div class='divider'></div>" . $kanbanActions : $kanbanActions;
|
||||
$actions .= ((common::hasPriv('kanban', 'createRegion') or $printSetHeight or common::hasPriv('kanban', 'setDoneFunction')) and (common::hasPriv('kanban', 'edit') or common::hasPriv('kanban', 'close') or common::hasPriv('kanban', 'delete'))) ? "<div class='divider'></div>" . $kanbanActions : $kanbanActions;
|
||||
}
|
||||
$actions .= "</ul>";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* The setDoneFunction file of kanban module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Yue Ma <mayue@easycorp.ltd>
|
||||
* @package kanban
|
||||
* @version $Id: setDoneFunction.html.php 935 2022-01-1 14:20:24Z $
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->kanban->setDoneFunction;?></h2>
|
||||
</div>
|
||||
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->kanban->doneFunction;?></th>
|
||||
<td><?php echo nl2br(html::radio('performable', $lang->kanban->enableFinished, $performable));?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
/**
|
||||
* The setdonefunction file of kanban module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2022 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Yue Ma <mayue@easycorp.ltd>
|
||||
* @package kanban
|
||||
* @version $Id: setdonefunction.html.php 935 2022-01-1 14:20:24Z $
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->kanban->setDoneFunction;?></h2>
|
||||
</div>
|
||||
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->kanban->doneFunction;?></th>
|
||||
<td><?php echo nl2br(html::radio('performable', $lang->kanban->enableFinished, $kanban->performable));?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='2' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
Reference in New Issue
Block a user