*Finish task 47997 48003.
This commit is contained in:
@@ -1055,6 +1055,28 @@ class kanban extends control
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set done function.
|
||||
*
|
||||
* @param int $kanbanID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function setArchivedFunction($kanbanID)
|
||||
{
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$this->dao->update(TABLE_KANBAN)->set('archived')->eq($_POST['archived'])->exec();
|
||||
|
||||
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.
|
||||
|
||||
@@ -259,6 +259,15 @@ function renderKanbanItem(item, $item)
|
||||
var privs = item.actions;
|
||||
var printMoreBtn = (privs.includes('editCard') || privs.includes('archiveCard') || privs.includes('copyCard') || privs.includes('deleteCard') || privs.includes('moveCard') || privs.includes('setCardColor'));
|
||||
|
||||
if(kanban.performable == 1 && item.status == 'done' )
|
||||
{
|
||||
$item.closest('.kanban-card').css({'filter' : 'opacity(0.5)', 'text-decoration' : 'line-through'});
|
||||
}
|
||||
else
|
||||
{
|
||||
$item.closest('.kanban-card').css({'filter' : '', 'text-decoration' : ''});
|
||||
}
|
||||
|
||||
if(privs.includes('sortCard')) $item.parent().addClass('sort');
|
||||
if(!$title.length)
|
||||
{
|
||||
|
||||
@@ -37,8 +37,10 @@ $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->setDoneFunction = 'Set Done Function';
|
||||
$lang->kanban->doneFunction = 'Done Function';
|
||||
$lang->kanban->setArchivedFunction = 'Set Archived Function';
|
||||
$lang->kanban->ArchivedFunction = 'Archived Function';
|
||||
$lang->kanban->splitColumn = 'Split Column';
|
||||
$lang->kanban->createColumnOnLeft = 'Create Column On Left';
|
||||
$lang->kanban->createColumnOnRight = 'Create Column On Right';
|
||||
|
||||
@@ -39,6 +39,8 @@ $lang->kanban->assigntoCard = '指派';
|
||||
$lang->kanban->setting = '设置';
|
||||
$lang->kanban->setDoneFunction = '设置完成功能';
|
||||
$lang->kanban->doneFunction = '完成功能';
|
||||
$lang->kanban->setArchivedFunction = '设置归档功能';
|
||||
$lang->kanban->ArchivedFunction = '归档功能';
|
||||
$lang->kanban->splitColumn = '新增子看板列';
|
||||
$lang->kanban->createColumnOnLeft = '左侧新增看板列';
|
||||
$lang->kanban->createColumnOnRight = '右侧新增看板列';
|
||||
|
||||
@@ -2538,7 +2538,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', 'setDoneFunction') 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', 'setArchivedFunction') or common::hasPriv('kanban', 'delete'));
|
||||
|
||||
if($printSettingBtn)
|
||||
{
|
||||
@@ -2546,6 +2546,7 @@ class kanbanModel extends model
|
||||
$actions .= "<ul id='kanbanActionMenu' class='dropdown-menu text-left'>";
|
||||
if(common::hasPriv('kanban', 'createRegion')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'createRegion', "kanbanID=$kanban->id", '', true), '<i class="icon icon-plus"></i>' . $this->lang->kanban->createRegion, '', "class='iframe btn btn-link'") . '</li>';
|
||||
if(common::hasPriv('kanban', 'import')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'import', "kanbanID=$kanban->id", '', true), '<i class="icon icon-import"></i>' . $this->lang->kanban->import, '', "class='iframe btn btn-link'") . '</li>';
|
||||
if(common::hasPriv('kanban', 'setArchivedFunction')) $actions .= '<li>' . html::a(helper::createLink('kanban', 'setArchivedFunction', "kanbanID=$kanban->id", '', true), '<i class="icon icon-card-archive"></i>' . $this->lang->kanban->archived, '', "class='iframe btn btn-link'") . '</li>';
|
||||
if($printSetHeight)
|
||||
{
|
||||
$width = $this->app->getClientLang() == 'en' ? '70%' : '60%';
|
||||
@@ -2561,7 +2562,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 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 .= ((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', 'setArchivedFunction') or common::hasPriv('kanban', 'delete'))) ? "<div class='divider'></div>" . $kanbanActions : $kanbanActions;
|
||||
}
|
||||
$actions .= "</ul>";
|
||||
}
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* The setarchivedfunction 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 Runyu Zheng <zhengrunyu@easycorp.ltd>
|
||||
* @package kanban
|
||||
* @version $Id: setarchivedfunction.html.php 935 2022-01-21 11:02: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->setArchivedFunction;?></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->ArchivedFunction;?></th>
|
||||
<td><?php echo nl2br(html::radio('archived', $lang->kanban->enableArchived, $kanban->archived));?></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