* Finish task #46241.
This commit is contained in:
@@ -185,6 +185,7 @@ $lang->action->desc->syncproject = '$date, starting the execution sets the
|
||||
$lang->action->desc->syncexecution = '$date, starting the task sets the execution status as Ongoing.' . "\n";
|
||||
$lang->action->desc->importfromgitlab = '$date, Issue associate created from gitlab by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->archived = '$date, archived by <strong>$actor</strong>.' . "\n";
|
||||
$lang->action->desc->restore = '$date, restore by <strong>$actor</strong>.' . "\n";
|
||||
|
||||
/* Used to describe the history of operations related to parent-child tasks. */
|
||||
$lang->action->desc->createchildren = '$date, <strong>$actor</strong> created a child task <strong>$extra</strong>。' . "\n";
|
||||
@@ -316,6 +317,7 @@ $lang->action->label->approve = 'Passed';
|
||||
$lang->action->label->reject = 'Rejected';
|
||||
$lang->action->label->importfromgitlab = 'Issue associate created';
|
||||
$lang->action->label->archived = 'Archived';
|
||||
$lang->action->label->restore = 'Restore';
|
||||
$lang->action->label->mergedbranch = 'Merge Branch';
|
||||
|
||||
/* Dynamic information is grouped by object. */
|
||||
|
||||
@@ -185,6 +185,7 @@ $lang->action->desc->syncproject = '$date, 系统判断由于执行开始
|
||||
$lang->action->desc->syncexecution = '$date, 系统判断由于任务开始,将执行状态置为进行中。' . "\n";
|
||||
$lang->action->desc->importfromgitlab = '$date, 由 <strong>$actor</strong> 从Gitlab的Issue关联创建。' . "\n";
|
||||
$lang->action->desc->archived = '$date, 由 <strong>$actor</strong> 归档。' . "\n";
|
||||
$lang->action->desc->restore = '$date, 由 <strong>$actor</strong> 还原。' . "\n";
|
||||
|
||||
/* 用来描述和父子任务相关的操作历史记录。*/
|
||||
$lang->action->desc->createchildren = '$date, 由 <strong>$actor</strong> 创建子任务 <strong>$extra</strong>。' . "\n";
|
||||
@@ -316,6 +317,7 @@ $lang->action->label->approve = '通过了';
|
||||
$lang->action->label->reject = '拒绝了';
|
||||
$lang->action->label->importfromgitlab = '从Gitlab关联创建了';
|
||||
$lang->action->label->archived = '归档了';
|
||||
$lang->action->label->restore = '还原了';
|
||||
$lang->action->label->mergedbranch = '合并分支';
|
||||
|
||||
/* 动态信息按照对象分组 */
|
||||
|
||||
@@ -618,43 +618,44 @@ $lang->release->methodOrder[75] = 'notify';
|
||||
|
||||
/* Kanban */
|
||||
$lang->resource->kanban = new stdclass();
|
||||
$lang->resource->kanban->space = 'spaceCommon';
|
||||
$lang->resource->kanban->createSpace = 'createSpace';
|
||||
$lang->resource->kanban->editSpace = 'editSpace';
|
||||
$lang->resource->kanban->closeSpace = 'closeSpace';
|
||||
$lang->resource->kanban->deleteSpace = 'deleteSpace';
|
||||
$lang->resource->kanban->sortSpace = 'sortSpace';
|
||||
$lang->resource->kanban->create = 'create';
|
||||
$lang->resource->kanban->edit = 'edit';
|
||||
$lang->resource->kanban->view = 'view';
|
||||
$lang->resource->kanban->close = 'close';
|
||||
$lang->resource->kanban->delete = 'delete';
|
||||
$lang->resource->kanban->createRegion = 'createRegion';
|
||||
$lang->resource->kanban->editRegion = 'editRegion';
|
||||
$lang->resource->kanban->sortRegion = 'sortRegion';
|
||||
$lang->resource->kanban->deleteRegion = 'deleteRegion';
|
||||
$lang->resource->kanban->createLane = 'createLane';
|
||||
$lang->resource->kanban->setLane = 'setLane';
|
||||
$lang->resource->kanban->sortLane = 'sortLane';
|
||||
$lang->resource->kanban->deleteLane = 'deleteLane';
|
||||
$lang->resource->kanban->createColumn = 'createColumn';
|
||||
$lang->resource->kanban->setColumn = 'setColumn';
|
||||
$lang->resource->kanban->setWIP = 'setWIP';
|
||||
$lang->resource->kanban->sortColumn = 'sortColumn';
|
||||
$lang->resource->kanban->deleteColumn = 'deleteColumn';
|
||||
$lang->resource->kanban->createCard = 'createCard';
|
||||
$lang->resource->kanban->editCard = 'editCard';
|
||||
$lang->resource->kanban->viewCard = 'viewCard';
|
||||
$lang->resource->kanban->sortCard = 'sortCard';
|
||||
$lang->resource->kanban->archiveCard = 'archiveCard';
|
||||
$lang->resource->kanban->assigntoCard = 'assigntoCard';
|
||||
$lang->resource->kanban->copyCard = 'copyCard';
|
||||
$lang->resource->kanban->deleteCard = 'deleteCard';
|
||||
$lang->resource->kanban->moveCard = 'moveCard';
|
||||
$lang->resource->kanban->setCardColor = 'setCardColor';
|
||||
$lang->resource->kanban->laneMove = 'laneMove';
|
||||
$lang->resource->kanban->cardsSort = 'cardsSort';
|
||||
$lang->resource->kanban->splitColumn = 'splitColumn';
|
||||
$lang->resource->kanban->space = 'spaceCommon';
|
||||
$lang->resource->kanban->createSpace = 'createSpace';
|
||||
$lang->resource->kanban->editSpace = 'editSpace';
|
||||
$lang->resource->kanban->closeSpace = 'closeSpace';
|
||||
$lang->resource->kanban->deleteSpace = 'deleteSpace';
|
||||
$lang->resource->kanban->sortSpace = 'sortSpace';
|
||||
$lang->resource->kanban->create = 'create';
|
||||
$lang->resource->kanban->edit = 'edit';
|
||||
$lang->resource->kanban->view = 'view';
|
||||
$lang->resource->kanban->close = 'close';
|
||||
$lang->resource->kanban->delete = 'delete';
|
||||
$lang->resource->kanban->createRegion = 'createRegion';
|
||||
$lang->resource->kanban->editRegion = 'editRegion';
|
||||
$lang->resource->kanban->sortRegion = 'sortRegion';
|
||||
$lang->resource->kanban->deleteRegion = 'deleteRegion';
|
||||
$lang->resource->kanban->createLane = 'createLane';
|
||||
$lang->resource->kanban->setLane = 'setLane';
|
||||
$lang->resource->kanban->sortLane = 'sortLane';
|
||||
$lang->resource->kanban->deleteLane = 'deleteLane';
|
||||
$lang->resource->kanban->createColumn = 'createColumn';
|
||||
$lang->resource->kanban->splitColumn = 'splitColumn';
|
||||
$lang->resource->kanban->restoreColumn = 'restoreColumn';
|
||||
$lang->resource->kanban->setColumn = 'setColumn';
|
||||
$lang->resource->kanban->setWIP = 'setWIP';
|
||||
$lang->resource->kanban->sortColumn = 'sortColumn';
|
||||
$lang->resource->kanban->deleteColumn = 'deleteColumn';
|
||||
$lang->resource->kanban->createCard = 'createCard';
|
||||
$lang->resource->kanban->editCard = 'editCard';
|
||||
$lang->resource->kanban->viewCard = 'viewCard';
|
||||
$lang->resource->kanban->sortCard = 'sortCard';
|
||||
$lang->resource->kanban->archiveCard = 'archiveCard';
|
||||
$lang->resource->kanban->assigntoCard = 'assigntoCard';
|
||||
$lang->resource->kanban->copyCard = 'copyCard';
|
||||
$lang->resource->kanban->deleteCard = 'deleteCard';
|
||||
$lang->resource->kanban->moveCard = 'moveCard';
|
||||
$lang->resource->kanban->setCardColor = 'setCardColor';
|
||||
$lang->resource->kanban->laneMove = 'laneMove';
|
||||
$lang->resource->kanban->cardsSort = 'cardsSort';
|
||||
|
||||
$lang->kanban->methodOrder[5] = 'space';
|
||||
$lang->kanban->methodOrder[10] = 'createSpace';
|
||||
@@ -676,23 +677,24 @@ $lang->kanban->methodOrder[85] = 'setLane';
|
||||
$lang->kanban->methodOrder[90] = 'sortLane';
|
||||
$lang->kanban->methodOrder[95] = 'deleteLane';
|
||||
$lang->kanban->methodOrder[100] = 'createColumn';
|
||||
$lang->kanban->methodOrder[105] = 'setColumn';
|
||||
$lang->kanban->methodOrder[110] = 'setWIP';
|
||||
$lang->kanban->methodOrder[115] = 'sortColumn';
|
||||
$lang->kanban->methodOrder[120] = 'deleteColumn';
|
||||
$lang->kanban->methodOrder[125] = 'createCard';
|
||||
$lang->kanban->methodOrder[130] = 'editCard';
|
||||
$lang->kanban->methodOrder[135] = 'viewCard';
|
||||
$lang->kanban->methodOrder[140] = 'sortCard';
|
||||
$lang->kanban->methodOrder[145] = 'archivedCard';
|
||||
$lang->kanban->methodOrder[150] = 'copyCard';
|
||||
$lang->kanban->methodOrder[155] = 'deleteCard';
|
||||
$lang->kanban->methodOrder[160] = 'assigntoCard';
|
||||
$lang->kanban->methodOrder[165] = 'moveCard';
|
||||
$lang->kanban->methodOrder[170] = 'setCardColor';
|
||||
$lang->kanban->methodOrder[175] = 'laneMove';
|
||||
$lang->kanban->methodorder[180] = 'cardsSort';
|
||||
$lang->kanban->methodorder[185] = 'splitColumn';
|
||||
$lang->kanban->methodorder[105] = 'splitColumn';
|
||||
$lang->kanban->methodorder[110] = 'restoreColumn';
|
||||
$lang->kanban->methodOrder[115] = 'setColumn';
|
||||
$lang->kanban->methodOrder[120] = 'setWIP';
|
||||
$lang->kanban->methodOrder[125] = 'sortColumn';
|
||||
$lang->kanban->methodOrder[130] = 'deleteColumn';
|
||||
$lang->kanban->methodOrder[135] = 'createCard';
|
||||
$lang->kanban->methodOrder[140] = 'editCard';
|
||||
$lang->kanban->methodOrder[145] = 'viewCard';
|
||||
$lang->kanban->methodOrder[150] = 'sortCard';
|
||||
$lang->kanban->methodOrder[155] = 'archivedCard';
|
||||
$lang->kanban->methodOrder[160] = 'copyCard';
|
||||
$lang->kanban->methodOrder[165] = 'deleteCard';
|
||||
$lang->kanban->methodOrder[170] = 'assigntoCard';
|
||||
$lang->kanban->methodOrder[175] = 'moveCard';
|
||||
$lang->kanban->methodOrder[180] = 'setCardColor';
|
||||
$lang->kanban->methodOrder[185] = 'laneMove';
|
||||
$lang->kanban->methodorder[190] = 'cardsSort';
|
||||
|
||||
/* Execution. */
|
||||
$lang->resource->execution = new stdclass();
|
||||
|
||||
@@ -521,17 +521,70 @@ class kanban extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$changes = $this->kanban->archiveColumn($columnID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
$this->kanban->archiveColumn($columnID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
$actionID = $this->loadModel('action')->create('kanbancolumn', $columnID, 'archived');
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
$this->loadModel('action')->create('kanbancolumn', $columnID, 'archived');
|
||||
|
||||
if(isonlybody()) die(js::reload('parent.parent'));
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Restore a column.
|
||||
*
|
||||
* @param int $columnID
|
||||
* @param string $confirm no|yes
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function restoreColumn($columnID, $confirm = 'no')
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->kanbancolumn->confirmRestore, $this->createLink('kanban', 'restoreColumn', "columnID=$columnID&confirm=yes"), ''));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->kanban->restoreColumn($columnID);
|
||||
if(dao::isError()) die(js::error(dao::getError()));
|
||||
|
||||
$this->loadModel('action')->create('kanbancolumn', $columnID, 'restore');
|
||||
die(js::reload('parent'));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* View archived columns.
|
||||
*
|
||||
* @param int $regionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function viewArchivedColumn($regionID)
|
||||
{
|
||||
$columns = $this->kanban->getColumnsByRegion($regionID);
|
||||
$columnsData = array();
|
||||
foreach($columns as $column)
|
||||
{
|
||||
if($column->archived == 0) continue;
|
||||
if($column->parent > 0)
|
||||
{
|
||||
if(empty($columnsData[$column->parent])) $columnsData[$column->parent] = $columns[$column->parent];
|
||||
$columnsData[$column->parent]->child[$column->id] = $column;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(empty($columnsData[$column->id])) $columnsData[$column->id] = $column;
|
||||
}
|
||||
}
|
||||
|
||||
$this->view->columns = $columnsData;
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Delete a column.
|
||||
*
|
||||
@@ -544,7 +597,7 @@ class kanban extends control
|
||||
{
|
||||
if($confirm == 'no')
|
||||
{
|
||||
die(js::confirm($this->lang->kanbancolumn->confirmDelete, $this->createLink('kanban', 'deleteColumn', "columnID=$columnID&confirm=yes"), ''));
|
||||
die(js::confirm($this->lang->kanbancolumn->confirmDelete, $this->createLink('kanban', 'deleteColumn', "columnID=$columnID&confirm=yes")));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
.kanbans .panel:hover {border-color: #006AF1; box-shadow: 0 0 10px 0 rgba(0,0,100,.25);}
|
||||
.kanbans .panel-heading {padding: 12px 24px 10px 16px;}
|
||||
.kanbans .kanban-name {overflow: hidden; white-space:nowrap}
|
||||
.kanbans .panel .label-closed {background: #AAA !important; color: #FFF; margin-top:-6px;}
|
||||
.kanbans .panel .label-closed {background: #AAA !important; color: #FFF; margin-top:-1px;}
|
||||
.kanbans .panel-body {padding: 0 16px 16px;}
|
||||
.kanbans .kanban-desc {color: #838a9d; word-break:break-all; height: 70px; overflow: hidden; display: -webkit-box;}
|
||||
.kanbans .kanban-footer {position: absolute; bottom: 10px; right: 10px; left: 15px;}
|
||||
|
||||
@@ -12,7 +12,7 @@ $(function()
|
||||
*/
|
||||
function setWhite(acl)
|
||||
{
|
||||
acl != 'open' ? $('#whitelistBox').removeClass('hidden') : $('#whitelistBox').addClass('hidden');
|
||||
acl != 'private' ? $('#whitelistBox').addClass('hidden') : $('#whitelistBox').removeClass('hidden');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1,13 +1,20 @@
|
||||
function loadMore(type)
|
||||
/**
|
||||
* Load more.
|
||||
*
|
||||
* @param string $type
|
||||
* @param int $regionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadMore(type, regionID)
|
||||
{
|
||||
var method = 'browseArchived' + type;
|
||||
var selector = '#more' + type + 's';
|
||||
var link = createLink('kanban', method, 'kanbanID=' + kanbanID);
|
||||
var method = 'viewArchived' + type;
|
||||
var selector = '#archived' + type + 's';
|
||||
var link = createLink('kanban', method, 'regionID=' + regionID);
|
||||
$(selector).load(link, function()
|
||||
{
|
||||
var windowHeight = $(window).height();
|
||||
$(selector + ' .panel-body').css('height', windowHeight - 100);
|
||||
$(selector + ' .avatar').renderAvatar();
|
||||
$(selector).animate({right: 0}, 500);
|
||||
});
|
||||
}
|
||||
@@ -65,6 +72,7 @@ function fullScreen()
|
||||
function exitFullScreen()
|
||||
{
|
||||
$('#mainContent').removeClass('scrollbar-hover');
|
||||
$('.region-header .action').attr('disabled', false);
|
||||
$.cookie('isFullScreen', 0);
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,11 @@ $lang->kanban->custom = 'Custom';
|
||||
$lang->kanban->archived = 'Archived';
|
||||
$lang->kanban->viewArchivedCard = 'View archived card';
|
||||
$lang->kanban->viewArchivedColumn = 'View archived column';
|
||||
$lang->kanban->archivedColumn = 'Archived Column';
|
||||
$lang->kanban->archivedCard = 'Archived Card';
|
||||
$lang->kanban->restoreColumn = 'Restore Column';
|
||||
$lang->kanban->restore = 'Restore';
|
||||
$lang->kanban->child = 'Child';
|
||||
|
||||
/* Fields. */
|
||||
$lang->kanban->space = 'Space';
|
||||
@@ -76,7 +81,7 @@ $lang->kanban->confirmDelete = 'Do you want to delete this?';
|
||||
$lang->kanban->aclGroup['open'] = 'Open';
|
||||
$lang->kanban->aclGroup['private'] = 'Private';
|
||||
|
||||
$lang->kanban->aclList['open'] = 'Open (Accessible with space view permissions)';
|
||||
$lang->kanban->aclList['extend'] = 'Extend (Accessible with space view permissions)';
|
||||
$lang->kanban->aclList['private'] = 'Private (For the kanban team, whitelist members and space owner only)';
|
||||
|
||||
$lang->kanban->enableArchived['0'] = 'Enable';
|
||||
@@ -220,9 +225,11 @@ $lang->kanbancolumn->limit = $lang->kanban->WIPCount;
|
||||
$lang->kanbancolumn->color = 'Column Color';
|
||||
$lang->kanbancolumn->childName = 'Name';
|
||||
$lang->kanbancolumn->childColor = 'Color';
|
||||
$lang->kanbancolumn->empty = 'No Column';
|
||||
|
||||
$lang->kanbancolumn->confirmArchive = 'Are you sure to archive this column? After archiving the column, the column and all cards in the column will be hidden. You can view the archived columns in the Region - Archived.';
|
||||
$lang->kanbancolumn->confirmDelete = 'Are you sure to delete this column? After deleting the column, all cards in this column will also be deleted.';
|
||||
$lang->kanbancolumn->confirmRestore = 'Are you sure you want to restore this Kanban column? After restoring the Kanban column, the Kanban column and all tasks in the Kanban column will be restored to the previous position at the same time.';
|
||||
|
||||
$lang->kanbanlane = new stdclass();
|
||||
$lang->kanbanlane->name = $lang->kanban->laneName;
|
||||
|
||||
@@ -46,6 +46,11 @@ $lang->kanban->custom = '自定义';
|
||||
$lang->kanban->archived = '已归档';
|
||||
$lang->kanban->viewArchivedCard = '查看已归档卡片';
|
||||
$lang->kanban->viewArchivedColumn = '查看已归档列';
|
||||
$lang->kanban->archivedColumn = '已归档的看板列';
|
||||
$lang->kanban->archivedCard = '已归档的卡片';
|
||||
$lang->kanban->restoreColumn = '还原看板列';
|
||||
$lang->kanban->restore = '还原';
|
||||
$lang->kanban->child = '子';
|
||||
|
||||
/* Fields. */
|
||||
$lang->kanban->space = '所属空间';
|
||||
@@ -73,7 +78,7 @@ $lang->kanban->createColumnOnRight = '在右侧添加看板列';
|
||||
$lang->kanban->accessDenied = '您无权访问该看板';
|
||||
$lang->kanban->confirmDelete = '您确认删除吗?';
|
||||
|
||||
$lang->kanban->aclList['open'] = '继承空间访问权限(能访问当前空间,即可访问)';
|
||||
$lang->kanban->aclList['extend'] = '继承空间访问权限(能访问当前空间,即可访问)';
|
||||
$lang->kanban->aclList['private'] = '私有(看板团队成员、白名单、空间负责人可访问)';
|
||||
|
||||
$lang->kanban->aclGroup['open'] = '公开';
|
||||
@@ -220,9 +225,11 @@ $lang->kanbancolumn->limit = $lang->kanban->WIPCount;
|
||||
$lang->kanbancolumn->color = '看板列颜色';
|
||||
$lang->kanbancolumn->childName = '子列名称';
|
||||
$lang->kanbancolumn->childColor = '子状态颜色';
|
||||
$lang->kanbancolumn->empty = '暂时没有看板列';
|
||||
|
||||
$lang->kanbancolumn->confirmArchive = '您确认归档该列吗?归档列后,该列和列中所有卡片将被隐藏,您可以在区域-已归档中查看已归档的列。';
|
||||
$lang->kanbancolumn->confirmDelete = '您确认删除该列吗?删除列后,该列中所有卡片也会被删除。';
|
||||
$lang->kanbancolumn->confirmRestore = '您确定要还原该看板列吗?还原看板列后,该看板列和看板列中所有的任务将同时还原到之前的位置。';
|
||||
|
||||
$lang->kanbanlane = new stdclass();
|
||||
$lang->kanbanlane->name = $lang->kanban->laneName;
|
||||
|
||||
+46
-12
@@ -859,9 +859,9 @@ class kanbanModel extends model
|
||||
*/
|
||||
public function getCanViewObjects($objectType = 'kanban')
|
||||
{
|
||||
$table = $this->config->objectTables[$objectType];
|
||||
$objects = $this->dao->select('*')->from($table)->fetchAll('id');
|
||||
$spaceOwnerPairs = $objectType == 'kanban' ? $this->dao->select('id,owner')->from(TABLE_KANBANSPACE)->fetchPairs() : array();
|
||||
$table = $this->config->objectTables[$objectType];
|
||||
$objects = $this->dao->select('*')->from($table)->fetchAll('id');
|
||||
$spaceList = $objectType == 'kanban' ? $this->dao->select('id,owner,team,whitelist')->from(TABLE_KANBANSPACE)->fetchAll('id') : array();
|
||||
|
||||
if($this->app->user->admin) return array_keys($objects);
|
||||
|
||||
@@ -876,8 +876,12 @@ class kanbanModel extends model
|
||||
if(strpos(",{$object->whitelist},", ",$account,") !== false) $remove = false;
|
||||
if($objectType == 'kanban')
|
||||
{
|
||||
$parentOwner = isset($spaceOwnerPairs[$object->space]) ? $spaceOwnerPairs[$object->space] : '';
|
||||
if(strpos(",$parentOwner,", ",$account,") !== false) $remove = false;
|
||||
$spaceOwner = isset($spaceList[$object->space]->owner) ? $spaceList[$object->space]->owner : '';
|
||||
$spaceTeam = isset($spaceList[$object->space]->team) ? trim($spaceList[$object->space]->team, ',') : '';
|
||||
$spaceWhiteList = isset($spaceList[$object->space]->whitelist) ? trim($spaceList[$object->space]->whitelist, ',') : '';
|
||||
if(strpos(",$spaceOwner,", ",$account,") !== false) $remove = false;
|
||||
if(strpos(",$spaceTeam,", ",$account,") !== false) $remove = false;
|
||||
if(strpos(",$spaceWhiteList,", ",$account,") !== false) $remove = false;
|
||||
}
|
||||
|
||||
if($remove) unset($objects[$objectID]);
|
||||
@@ -1087,6 +1091,12 @@ class kanbanModel extends model
|
||||
->where('space')->eq($kanban->space)
|
||||
->fetch('maxOrder');
|
||||
$kanban->order = $maxOrder ? $maxOrder+ 1 : 1;
|
||||
|
||||
if($kanban->acl == 'extend')
|
||||
{
|
||||
$spaceAcl = $this->dao->select('acl')->from(TABLE_KANBANSPACE)->where('id')->eq($kanban->space)->fetch('acl');
|
||||
$kanban->acl = $spaceAcl ? $spaceAcl : 'open';
|
||||
}
|
||||
}
|
||||
|
||||
$this->dao->insert(TABLE_KANBAN)->data($kanban)
|
||||
@@ -1948,20 +1958,29 @@ class kanbanModel extends model
|
||||
*
|
||||
* @param int $columnID
|
||||
* @access public
|
||||
* @return string
|
||||
* @return void
|
||||
*/
|
||||
public function archiveColumn($columnID)
|
||||
{
|
||||
$oldColumn = $this->getColumnByID($columnID);
|
||||
|
||||
$this->dao->update(TABLE_KANBANCOLUMN)
|
||||
->set('archived')->eq(1)
|
||||
->where('id')->eq($columnID)
|
||||
->exec();
|
||||
}
|
||||
|
||||
$column = $this->getColumnByID($columnID);
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldColumn, $column);
|
||||
/**
|
||||
* Restore a column.
|
||||
*
|
||||
* @param int $columnID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function restoreColumn($columnID)
|
||||
{
|
||||
$this->dao->update(TABLE_KANBANCOLUMN)
|
||||
->set('archived')->eq(0)
|
||||
->where('id')->eq($columnID)
|
||||
->exec();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1969,7 +1988,7 @@ class kanbanModel extends model
|
||||
*
|
||||
* @param int $cardID
|
||||
* @access public
|
||||
* @return string
|
||||
* @return array
|
||||
*/
|
||||
public function archiveCard($cardID)
|
||||
{
|
||||
@@ -2074,6 +2093,21 @@ class kanbanModel extends model
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get columns by region id.
|
||||
*
|
||||
* @param int $regionID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getColumnsByRegion($regionID)
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_KANBANCOLUMN)
|
||||
->where('region')->eq($regionID)
|
||||
->orderBy('order')
|
||||
->fetchAll('id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get lane by id.
|
||||
*
|
||||
|
||||
@@ -59,21 +59,25 @@ $canCreateLane = commonModel::hasPriv('kanban', 'createLane');
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
</span>
|
||||
<?php $canViewviewArchivedCard = commonModel::hasPriv('kanban', 'viewArchivedCard');?>
|
||||
<?php $canViewviewArchivedColumn = commonModel::hasPriv('kanban', 'viewArchivedColumn');?>
|
||||
<?php if($canViewviewArchivedCard or $canViewviewArchivedColumn):?>
|
||||
<span>
|
||||
<button data-toggle="dropdown" class="btn btn-link action" type="button" title=<?php echo $this->lang->kanban->archived;?>>
|
||||
<span><?php echo $this->lang->kanban->archived;?></span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<?php echo '<li>' . html::a(inlink('viewArchivedCard', "", '', 1), '<i class="icon icon-card-archive"></i>' . $this->lang->kanban->viewArchivedCard, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
|
||||
<?php echo '<li>' . html::a(inlink('viewArchivedColumn', "", '', 1), '<i class="icon icon-col-archive"></i>' . $this->lang->kanban->viewArchivedColumn, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
|
||||
<?php if($canViewviewArchivedCard) echo '<li>' . html::a("javascript:loadMore(\"card\", $region->id)", '<i class="icon icon-card-archive"></i>' . $this->lang->kanban->viewArchivedCard) . '</li>';?>
|
||||
<?php if($canViewviewArchivedColumn) echo '<li>' . html::a("javascript:loadMore(\"Column\", $region->id)", '<i class="icon icon-col-archive"></i>' . $this->lang->kanban->viewArchivedColumn) . '</li>';?>
|
||||
</ul>
|
||||
</span>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div id='kanban<?php echo $region->id;?>' data-id='<?php echo $region->id;?>' class='kanban'></div>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<div id='moreTasks'></div>
|
||||
<div id='moreColumns'></div>
|
||||
<div id='archivedCards'></div>
|
||||
<div id='archivedColumns'></div>
|
||||
<?php include '../../common/view/footer.html.php';?>
|
||||
|
||||
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
/**
|
||||
* The more columns view file of kanban module of ZDOO.
|
||||
*
|
||||
* @copyright Copyright 2009-2020 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Gang Liu <liugang@easycorp.ltd>
|
||||
* @package kanban
|
||||
* @version $Id$
|
||||
* @link http://www.zdoo.com
|
||||
*/
|
||||
?>
|
||||
<style>
|
||||
#archivedColumns {top: 50px; right: -400px; width: 400px; position: fixed; z-index: 1050; background-color: rgb(255,255,255);}
|
||||
#archivedColumns .panel .panel-body {overflow: auto; padding: 0px 20px;}
|
||||
#archivedColumns .parent-item,#archivedColumns .child-item {padding: 20px 0px; border-bottom: 1px solid #ddd; line-height: 26px; overflow: hidden;}
|
||||
#archivedColumns .title {width: 250px; float: left;}
|
||||
#archivedColumns .label-child {border-radius: 12px; background-color: #DDDDDD; color: #333; margin-right: 10px;}
|
||||
#archivedColumns .btn {float: right; line-height: 26px; height: 26px; padding: 0 20px;}
|
||||
</style>
|
||||
<div class='panel'>
|
||||
<div class='panel-heading text-center'>
|
||||
<strong><?php echo $lang->kanban->archivedColumn;?></strong>
|
||||
<button type="button" class="close" aria-hidden="true">×</button>
|
||||
</div>
|
||||
<div class='panel-body'>
|
||||
<?php if(empty($columns)):?>
|
||||
<div class="table-empty-tip">
|
||||
<p><span class="text-muted"><?php echo $lang->kanbancolumn->empty;?></span></p>
|
||||
</div>
|
||||
<?php else:?>
|
||||
<?php foreach($columns as $column):?>
|
||||
<div class="item-body">
|
||||
<div class="item parent-item" data-archived='<?php echo $column->archived;?>' data-id="<?php echo $column->id;?>">
|
||||
<div class="title text-ellipsis"><?php echo $column->name;?></div>
|
||||
<?php if(commonModel::hasPriv('kanban', 'restoreColumn') && $column->archived == '1') echo html::a(inlink('restoreColumn', "columnID={$column->id}", '',true), $lang->kanban->restore, '', "class='btn btn-primary' target='hiddenwin'");?>
|
||||
</div>
|
||||
<?php if(!empty($column->child) && $column->archived == '0'):?>
|
||||
<?php foreach($column->child as $childColumn):?>
|
||||
<div class="item child-item" data-id="<?php echo $childColumn->id;?>" data-archived='<?php echo $childColumn->archived;?>'>
|
||||
<div class="title text-ellipsis"><label class="label label-child"><?php echo $lang->kanban->child;?></label><?php echo $childColumn->name;?></div>
|
||||
<?php if(commonModel::hasPriv('kanban', 'restoreColumn') && $childColumn->archived == '1') echo html::a(inlink('restoreColumn', "columnID={$childColumn->id}", '',true), $lang->kanban->restore, 'hiddenwin', "class='btn btn-primary");?>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$(function()
|
||||
{
|
||||
$('#archivedColumns .panel .close').click(function()
|
||||
{
|
||||
$('#archivedColumns').animate({right: -400}, 500);
|
||||
});
|
||||
})
|
||||
</script>
|
||||
Reference in New Issue
Block a user