* Finish card view ui page.
This commit is contained in:
@@ -7,6 +7,11 @@ $config->kanban->require->createregion = 'name';
|
||||
$config->kanban->require->createlane = 'name';
|
||||
$config->kanban->require->createcolumn = 'name';
|
||||
|
||||
$config->kanban->actions = new stdclass();
|
||||
$config->kanban->actions->view = array();
|
||||
$config->kanban->actions->viewcard['mainActions'] = array('editCard', 'finishCard', 'activateCard', 'archiveCard');
|
||||
$config->kanban->actions->viewcard['suffixActions'] = array('deleteCard');
|
||||
|
||||
$config->kanban->setwip = new stdclass();
|
||||
$config->kanban->setlane = new stdclass();
|
||||
$config->kanban->setlaneColumn = new stdclass();
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
global $lang;
|
||||
|
||||
$config->kanban->actionList = array();
|
||||
$config->kanban->actionList['editCard']['icon'] = 'edit';
|
||||
$config->kanban->actionList['editCard']['text'] = $lang->kanbancard->edit;
|
||||
$config->kanban->actionList['editCard']['hint'] = $lang->kanbancard->edit;
|
||||
$config->kanban->actionList['editCard']['url'] = array('module' => 'kanban', 'method' => 'editCard', 'params' => 'cardID={id}');
|
||||
$config->kanban->actionList['editCard']['data-toggle'] = 'modal';
|
||||
|
||||
$config->kanban->actionList['finishCard']['icon'] = 'checked';
|
||||
$config->kanban->actionList['finishCard']['text'] = $lang->kanban->finishCard;
|
||||
$config->kanban->actionList['finishCard']['hint'] = $lang->kanban->finishCard;
|
||||
$config->kanban->actionList['finishCard']['url'] = array('module' => 'kanban', 'method' => 'finishCard', 'params' => 'cardID={id}&kanbanID={kanban}');
|
||||
$config->kanban->actionList['finishCard']['className'] = 'ajax-submit';
|
||||
|
||||
$config->kanban->actionList['activateCard']['icon'] = 'magic';
|
||||
$config->kanban->actionList['activateCard']['text'] = $lang->kanban->activateCard;
|
||||
$config->kanban->actionList['activateCard']['hint'] = $lang->kanban->activateCard;
|
||||
$config->kanban->actionList['activateCard']['url'] = array('module' => 'kanban', 'method' => 'activateCard', 'params' => 'cardID={id}&kanbanID={kanban}');
|
||||
$config->kanban->actionList['activateCard']['data-toggle'] = 'modal';
|
||||
|
||||
$config->kanban->actionList['archiveCard']['icon'] = 'ban-circle';
|
||||
$config->kanban->actionList['archiveCard']['text'] = $lang->kanban->archiveCard;
|
||||
$config->kanban->actionList['archiveCard']['hint'] = $lang->kanban->archiveCard;
|
||||
$config->kanban->actionList['archiveCard']['url'] = array('module' => 'kanban', 'method' => 'archiveCard', 'params' => 'cardID={id}');
|
||||
$config->kanban->actionList['archiveCard']['data-confirm'] = $lang->kanbancard->confirmArchive;
|
||||
$config->kanban->actionList['archiveCard']['className'] = 'ajax-submit';
|
||||
|
||||
$config->kanban->actionList['deleteCard']['icon'] = 'trash';
|
||||
$config->kanban->actionList['deleteCard']['text'] = $lang->kanbancard->delete;
|
||||
$config->kanban->actionList['deleteCard']['hint'] = $lang->kanbancard->delete;
|
||||
$config->kanban->actionList['deleteCard']['url'] = array('module' => 'kanban', 'method' => 'deleteCard', 'params' => 'cardID={id}');
|
||||
$config->kanban->actionList['deleteCard']['data-confirm'] = $lang->kanbancard->confirmDelete;
|
||||
$config->kanban->actionList['deleteCard']['className'] = 'ajax-submit';
|
||||
@@ -995,7 +995,7 @@ class kanban extends control
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
$callback = $this->kanban->getKanbanCallback($card->kanban, $card->region);
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'load' => true, 'closeModal' => true));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => $callback));
|
||||
}
|
||||
|
||||
$this->view->card = $this->kanban->getCardByID($cardID);
|
||||
|
||||
+11
-3
@@ -4023,7 +4023,7 @@ class kanbanModel extends model
|
||||
}
|
||||
return $object->archived == '1';
|
||||
case 'archivecolumn' :
|
||||
if($object->archived != '0') return false; // The column has been archived.
|
||||
return $object->archived == '0'; // The column has been archived.
|
||||
case 'deletecolumn' :
|
||||
if($object->deleted != '0') return false;
|
||||
|
||||
@@ -4036,8 +4036,14 @@ class kanbanModel extends model
|
||||
->fetch('count');
|
||||
|
||||
return $count > 1;
|
||||
case 'sortColumn' :
|
||||
if($object->deleted != '0') return false;
|
||||
case 'sortcolumn' :
|
||||
return $object->deleted == '0';
|
||||
case 'finishcard' :
|
||||
return $object->status != 'done';
|
||||
case 'activatecard' :
|
||||
return $object->status == 'done';
|
||||
case 'deletecard' :
|
||||
return $object->deleted == '0';
|
||||
}
|
||||
|
||||
return true;
|
||||
@@ -4101,4 +4107,6 @@ class kanbanModel extends model
|
||||
$kanbanData = reset($kanbanData);
|
||||
return array('name' => 'updateKanbanRegion', 'params' => array('region' . $regionID, $kanbanData));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* The splitcolumn view file of kanban 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 Yuting Wang <wangyuting@easycorp.ltd>
|
||||
|
||||
@@ -0,0 +1,98 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
/**
|
||||
* The viewcard view file of kanban 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 Yuting Wang <wangyuting@easycorp.ltd>
|
||||
* @package kanban
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
namespace zin;
|
||||
|
||||
$assignedToList = '';
|
||||
$assignedToPairs = array_filter(explode(',', $card->assignedTo));
|
||||
foreach($assignedToPairs as $index => $assignedTo)
|
||||
{
|
||||
$userName = \zget($users, $assignedTo, '');
|
||||
if($userName) $assignedToList .= $userName . ' ';
|
||||
}
|
||||
|
||||
detailHeader
|
||||
(
|
||||
to::title
|
||||
(
|
||||
entityLabel
|
||||
(
|
||||
set::entityID($card->id),
|
||||
set::level(1),
|
||||
set::text($card->name)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
$actions = $this->loadModel('common')->buildOperateMenu($card);
|
||||
detailBody
|
||||
(
|
||||
sectionList
|
||||
(
|
||||
set::style(array('padding' => '0px 0px 20px 0px')),
|
||||
section
|
||||
(
|
||||
set::title($lang->kanbancard->desc),
|
||||
set::content($card->desc),
|
||||
set::useHtml(true)
|
||||
)
|
||||
),
|
||||
history(set::commentUrl(createLink('action', 'comment', array('objectType' => 'kanbancard', 'objectID' => $card->id)))),
|
||||
floatToolbar
|
||||
(
|
||||
set::object($card),
|
||||
isAjaxRequest('modal') ? null : to::prefix(backBtn(set::icon('back'), set::className('ghost text-white'), $lang->goback)),
|
||||
set::main($actions['mainActions']),
|
||||
set::suffix($actions['suffixActions'])
|
||||
),
|
||||
detailSide
|
||||
(
|
||||
tabs
|
||||
(
|
||||
set::collapse(true),
|
||||
tabPane
|
||||
(
|
||||
set::key(''),
|
||||
set::title($lang->kanbancard->legendBasicInfo),
|
||||
set::active(true),
|
||||
tableData
|
||||
(
|
||||
item(set::name($lang->kanbancard->assignedTo), $assignedToList),
|
||||
item(set::name($lang->kanbancard->space), $space->name),
|
||||
item(set::name($lang->kanbancard->kanban), $kanban->name),
|
||||
item(set::name($lang->kanbancard->begin), $card->begin),
|
||||
item(set::name($lang->kanbancard->end), $card->end),
|
||||
item(set::name($lang->kanbancard->pri), priLabel($card->pri)),
|
||||
item(set::name($lang->kanbancard->estimate), round($card->estimate, 2) . ' ' . $lang->kanbancard->lblHour),
|
||||
$kanban->performable ? item(set::name($lang->kanbancard->progress), round($card->progress, 2) . ' %') : null
|
||||
)
|
||||
)
|
||||
),
|
||||
tabs
|
||||
(
|
||||
set::collapse(true),
|
||||
tabPane
|
||||
(
|
||||
set::key('legendLifeTime'),
|
||||
set::title($lang->kanbancard->legendLifeTime),
|
||||
set::active(true),
|
||||
tableData
|
||||
(
|
||||
item(set::name($lang->kanbancard->createdBy), \zget($users, $card->createdBy) . $lang->at . $card->createdDate),
|
||||
item(set::name($lang->kanbancard->archivedBy), $card->archivedBy ? \zget($users, $card->archivedBy) . $lang->at . $card->archivedDate : ''),
|
||||
item(set::name($lang->kanbancard->lastEditedBy), $card->lastEditedBy ? \zget($users, $card->lastEditedBy) . $lang->at . $card->lastEditedDate : ''),
|
||||
)
|
||||
)
|
||||
)
|
||||
)
|
||||
);
|
||||
|
||||
render();
|
||||
Reference in New Issue
Block a user