* Finish Task #43407,43420

This commit is contained in:
xiawenlong
2021-10-27 16:53:15 +08:00
parent 2204b280f1
commit 5b0458b841
6 changed files with 72 additions and 18 deletions
-2
View File
@@ -14,6 +14,4 @@
.kanban-affixed .kanban-header-col > .title > .count {color: #fff!important;}
.dropdown-menu a {text-align: left;}
.panel{ position: unset }
.menu-actions { display: contents }
.scrollbar-hover {max-height: 2000px; overflow: scroll !important;}
+1 -2
View File
@@ -39,8 +39,7 @@
<?php
echo "<div class='btn-group menu-actions'>";
echo html::a('javascript:;', "<i class='icon icon-ellipsis-v'></i>", '', "data-toggle='dropdown' class='btn btn-link'");
// TODO 暂时解决样式问题
echo "<ul class='dropdown-menu pull-right' style='position: relative'>";
echo "<ul class='dropdown-menu pull-right'>";
if(common::hasPriv('execution', 'printKanban')) echo '<li>' .html::a($this->createLink('execution', 'printKanban', "executionID=$executionID"), "<i class='icon-printer muted'></i> " . $lang->execution->printKanban, '', "class='iframe btn btn-link' id='printKanban' title='{$lang->execution->printKanban}' data-width='500'") . '</li>';
echo '<li>' .html::a('javascript:fullScreen()', "<i class='icon-fullscreen muted'></i> " . $lang->execution->fullScreen, '', "class='btn btn-link' title='{$lang->execution->fullScreen}' data-width='500'") . '</li>';
echo '</ul></div>';
+6 -4
View File
@@ -2,10 +2,12 @@
global $lang;
$config->kanban = new stdclass();
$config->kanban->setwip = new stdclass();
$config->kanban->setlane = new stdclass();
$config->kanban->setwip->requiredFields = 'limit';
$config->kanban->setlane->requiredFields = 'name,type';
$config->kanban->setwip = new stdclass();
$config->kanban->setlane = new stdclass();
$config->kanban->setlaneColumn = new stdclass();
$config->kanban->setwip->requiredFields = 'limit';
$config->kanban->setlane->requiredFields = 'name,type';
$config->kanban->setlaneColumn->requiredFields = 'name';
$config->kanban->default = new stdclass();
$config->kanban->default->story = new stdclass();
+33
View File
@@ -72,4 +72,37 @@ class kanban extends control
$this->display();
}
/**
* Set lane column info.
*
* @param int $columnID
* @access public
* @return void
*/
public function setLaneColumn($columnID)
{
$column = $this->kanban->getColumnById($columnID);
if($_POST)
{
$params = fixer::input('post')->get();
$this->kanban->updateLaneColumn($columnID, $params);
if(dao::isError()) return $this->sendError(dao::getError());
$changes = common::createChanges($column, $params);
if($changes)
{
$actionID = $this->loadModel('action')->create('kanbancolumn', $columnID, 'Edited');
$this->action->logHistory($actionID, $changes);
}
return $this->sendSuccess(array('locate' => 'parent'));
}
$this->view->column = $column;
$this->view->title = $column->name . $this->lang->colon . $this->lang->kanban->setLaneColumn;
$this->display();
}
}
+13 -10
View File
@@ -1,16 +1,19 @@
<?php
$lang->kanban = new stdClass();
$lang->kanban->WIP = 'WIP';
$lang->kanban->setWIP = '在制品设置';
$lang->kanban->WIPStatus = '在制品状态';
$lang->kanban->WIPStage = '在制品阶段';
$lang->kanban->WIPType = '在制品类型';
$lang->kanban->WIPCount = '在制品数量';
$lang->kanban->noLimit = '不限制∞';
$lang->kanban->setLane = '泳道设置';
$lang->kanban->laneName = '泳道名称';
$lang->kanban->laneColor = '泳道颜色';
$lang->kanban->WIP = 'WIP';
$lang->kanban->setWIP = '在制品设置';
$lang->kanban->WIPStatus = '在制品状态';
$lang->kanban->WIPStage = '在制品阶段';
$lang->kanban->WIPType = '在制品类型';
$lang->kanban->WIPCount = '在制品数量';
$lang->kanban->noLimit = '不限制∞';
$lang->kanban->setLane = '泳道设置';
$lang->kanban->laneName = '泳道名称';
$lang->kanban->laneColor = '泳道颜色';
$lang->kanban->setLaneColumn = '看板列设置';
$lang->kanban->columnName = '看板列名称';
$lang->kanban->columnColor = '看板列颜色';
$this->lang->kanban->laneTypeList = array();
$this->lang->kanban->laneTypeList['story'] = $lang->SRCommon;
+19
View File
@@ -401,4 +401,23 @@ class kanbanModel extends model
return dao::isError();
}
/**
* Update lane column.
*
* @param int $columnID
* @access public
* @return array
*/
public function updateLaneColumn($columnID, $data)
{
$this->dao->update(TABLE_KANBANCOLUMN)->data($data)
->autoCheck()
->batchcheck($this->config->kanban->setlaneColumn->requiredFields, 'notempty')
->where('id')->eq($columnID)
->exec();
}
}