* Fix bug for task #47976.

This commit is contained in:
liumengyi
2022-01-21 12:16:16 +08:00
parent 8c2bd2386d
commit d0739e40e3
8 changed files with 17 additions and 9 deletions
+1 -1
View File
@@ -622,7 +622,7 @@ $lang->action->label->issue = 'Issue|issue|view|issueID=%s';
$lang->action->label->design = 'Design|design|view|designID=%s';
$lang->action->label->stakeholder = 'Stakeholder|stakeholder|view|userID=%s';
$lang->action->label->api = 'Interface|api|index|libID=%s&moduleID=%s&apiID=%s';
$lang->action->label->kanbanspace = 'Kanban Space|kanban|space|browseType=all';
$lang->action->label->kanbanspace = 'Kanban Space|kanban|space|browseType=%s';
$lang->action->label->kanbanregion = 'Kanban Region|kanban|view|kanbanID=%s';
$lang->action->label->kanban = 'Kanban|kanban|view|kanbanID=%s';
$lang->action->label->kanbancolumn = 'Kanban Column|execution|kanban|execution=%s';
+1 -1
View File
@@ -622,7 +622,7 @@ $lang->action->label->issue = '问题|issue|view|issueID=%s';
$lang->action->label->design = '设计|design|view|designID=%s';
$lang->action->label->stakeholder = '干系人|stakeholder|view|userID=%s';
$lang->action->label->api = '接口|api|index|libID=%s&moduleID=%s&apiID=%s';
$lang->action->label->kanbanspace = '看板空间|kanban|space|browseType=all';
$lang->action->label->kanbanspace = '看板空间|kanban|space|browseType=%s';
$lang->action->label->kanbanregion = '看板区域|kanban|view|kanbanID=%s';
$lang->action->label->kanban = '看板|kanban|view|kanbanID=%s';
$lang->action->label->kanbancolumn = '看板列|execution|kanban|execution=%s';
+5
View File
@@ -1289,6 +1289,11 @@ class actionModel extends model
{
$params = sprintf($vars, trim($action->product, ','));
}
elseif($action->objectType == 'kanbanspace')
{
$kanbanSpace = $this->dao->select('type')->from(TABLE_KANBANSPACE)->where('id')->eq($action->objectID)->fetch();
$params = sprintf($vars, $kanbanSpace->type);
}
elseif($action->objectType == 'kanbancolumn' or $action->objectType == 'kanbanlane')
{
$params = sprintf($vars, $action->extra);
+1 -1
View File
@@ -168,7 +168,7 @@ class kanban extends control
unset($this->lang->kanbanspace->featureBar['involved']);
$space = $this->kanban->getSpaceById($spaceID);
$spaceUsers = trim($space->owner) . ',' . trim($space->team) . ',' . trim($space->whitelist);
$spaceUsers = $spaceID == 0 ? ',' : trim($space->owner) . ',' . trim($space->team) . ',' . trim($space->whitelist);
$users = $this->loadModel('user')->getPairs('noclosed|nodeleted', '', 0, $spaceUsers);
$this->view->users = $users;
+3 -2
View File
@@ -1,13 +1,14 @@
/**
* When type change.
* When space type or space value change.
*
* @oaram int spaceID
* @param string type
* @access public
* @return void
*/
function changeType(spaceID, type)
function changeValue(spaceID, type = '')
{
if(type == '') type = spaceType;
location.href = createLink('kanban', 'create', 'spaceID=' + spaceID + '&type=' + type);
}
+2 -1
View File
@@ -1448,7 +1448,6 @@ class kanbanModel extends model
->setDefault('createdBy', $account)
->setDefault('createdDate', helper::now())
->setdefault('team', '')
->setdefault('owner', $account)
->setdefault('whitelist', '')
->join('whitelist', ',')
->join('team', ',')
@@ -1456,6 +1455,8 @@ class kanbanModel extends model
->remove('uid,contactListMenu')
->get();
if($space->type == 'private') $space->owner = $account;
if(strpos(",{$space->team},", ",$account,") === false and $space->owner != $account) $space->team .= ",$account";
$space = $this->loadModel('file')->processImgURL($space, $this->config->kanban->editor->createspace['id'], $this->post->uid);
+3 -2
View File
@@ -12,6 +12,7 @@
?>
<?php include '../../common/view/header.html.php';?>
<?php include '../../common/view/kindeditor.html.php';?>
<?php js::set('spaceType', $type);?>
<div id='mainContent' class='main-content'>
<div class='main-header'>
<h2><?php echo $lang->kanban->create;?></h2>
@@ -20,12 +21,12 @@
<table class='table table-form'>
<tr>
<th><?php echo $lang->kanbanspace->type;?></th>
<td><?php echo html::select('type', $typeList, $type, "onchange='changeType({$spaceID}, this.value)' class='form-control chosen'");?></td>
<td><?php echo html::select('type', $typeList, $type, "onchange='changeValue({$spaceID}, this.value)' class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>
<th><?php echo $lang->kanban->space;?></th>
<td><?php echo html::select('space', $spacePairs, $spaceID, "class='form-control chosen'");?></td>
<td><?php echo html::select('space', $spacePairs, $spaceID, "onchange='changeValue(this.value)' class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>
+1 -1
View File
@@ -20,7 +20,7 @@
<table class='table table-form'>
<tr>
<th><?php echo $lang->kanbanspace->type;?></th>
<td><?php echo html::select('type', $typeList, $type, "onchange='changeType(this.value)' class='form-control'");?></td>
<td><?php echo html::select('type', $typeList, $type, "onchange='changeType(this.value)' class='form-control chosen'");?></td>
<td></td>
</tr>
<tr>