sprint_sunjun_29766
This commit is contained in:
@@ -56,6 +56,7 @@ $lang->create = 'Create';
|
||||
$lang->edit = 'Edit';
|
||||
$lang->delete = 'Delete';
|
||||
$lang->close = 'Close';
|
||||
$lang->activate = 'Activate';
|
||||
$lang->unlink = 'Unlink';
|
||||
$lang->import = 'Import';
|
||||
$lang->export = 'Export';
|
||||
|
||||
@@ -55,6 +55,7 @@ $lang->refresh = '刷新';
|
||||
$lang->create = '新建';
|
||||
$lang->edit = '编辑';
|
||||
$lang->delete = '删除';
|
||||
$lang->activate = '激活';
|
||||
$lang->close = '关闭';
|
||||
$lang->unlink = '移除';
|
||||
$lang->import = '导入';
|
||||
|
||||
+11
-10
@@ -34,16 +34,17 @@ $config->kanban->editregion->requiredFields = 'name';
|
||||
$config->kanban->splitcolumn->requiredFields = 'name,limit';
|
||||
|
||||
$config->kanban->editor = new stdclass();
|
||||
$config->kanban->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->createspace = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->editspace = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->closespace = array('id' => 'comment', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->createcard = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->close = array('id' => 'comment', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->editcard = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->viewcard = array('id' => 'comment', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->activatecard = array('id' => 'comment', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->create = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->edit = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->createspace = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->editspace = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->closespace = array('id' => 'comment', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->activatespace = array('id' => 'comment', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->createcard = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->close = array('id' => 'comment', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->editcard = array('id' => 'desc', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->viewcard = array('id' => 'comment', 'tools' => 'simpleTools');
|
||||
$config->kanban->editor->activatecard = array('id' => 'comment', 'tools' => 'simpleTools');
|
||||
|
||||
$config->kanban->fromType = array('execution', 'productplan', 'release', 'build');
|
||||
$config->kanban->executionField = array('name', 'status', 'end', 'PM', 'type', 'deleted');
|
||||
|
||||
@@ -114,6 +114,36 @@ class kanban extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Activate a space.
|
||||
*
|
||||
* @param int $spaceID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function activateSpace($spaceID)
|
||||
{
|
||||
$this->loadModel('action');
|
||||
|
||||
if(!empty($_POST))
|
||||
{
|
||||
$changes = $this->kanban->activateSpace($spaceID);
|
||||
|
||||
if(dao::isError()) return print(js::error(dao::getError()));
|
||||
|
||||
$actionID = $this->action->create('kanbanSpace', $spaceID, 'activated', $this->post->comment);
|
||||
$this->action->logHistory($actionID, $changes);
|
||||
|
||||
return print(js::reload('parent.parent'));
|
||||
}
|
||||
|
||||
$this->view->space = $this->kanban->getById($spaceID);
|
||||
$this->view->actions = $this->action->getList('kanbanSpace', $spaceID);
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/*
|
||||
* Close a space.
|
||||
*
|
||||
|
||||
@@ -4,6 +4,7 @@ $lang->kanban->create = 'Create Kanban';
|
||||
$lang->kanban->createSpace = 'Create Space';
|
||||
$lang->kanban->editSpace = 'Edit Space';
|
||||
$lang->kanban->closeSpace = 'Close Space';
|
||||
$lang->kanban->activateSpace = 'Activate Space';
|
||||
$lang->kanban->deleteSpace = 'Delete Space';
|
||||
$lang->kanban->sortSpace = 'Sort Space';
|
||||
$lang->kanban->edit = 'Edit Kanban';
|
||||
|
||||
@@ -5,6 +5,7 @@ $lang->kanban->createSpace = '创建空间';
|
||||
$lang->kanban->editSpace = '设置空间';
|
||||
$lang->kanban->closeSpace = '关闭空间';
|
||||
$lang->kanban->deleteSpace = '删除空间';
|
||||
$lang->kanban->activateSpace = '激活空间';
|
||||
$lang->kanban->sortSpace = '空间排序';
|
||||
$lang->kanban->edit = '设置看板';
|
||||
$lang->kanban->view = '查看看板';
|
||||
|
||||
@@ -1847,6 +1847,39 @@ class kanbanModel extends model
|
||||
->setDefault('closedDate', $now)
|
||||
->setDefault('lastEditedBy', $account)
|
||||
->setDefault('lastEditedDate', $now)
|
||||
->setDefault('activatedBy', '')
|
||||
->setDefault('activatedDate', '0000-00-00 00:00:00')
|
||||
->remove('comment')
|
||||
->get();
|
||||
|
||||
$this->dao->update(TABLE_KANBANSPACE)->data($space)
|
||||
->autoCheck()
|
||||
->where('id')->eq($spaceID)
|
||||
->exec();
|
||||
|
||||
if(!dao::isError()) return common::createChanges($oldSpace, $space);
|
||||
}
|
||||
|
||||
/**
|
||||
* Activate a space.
|
||||
*
|
||||
* @param int $spaceID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
function activateSpace($spaceID)
|
||||
{
|
||||
$spaceID = (int)$spaceID;
|
||||
$oldSpace = $this->getSpaceById($spaceID);
|
||||
$now = helper::now();
|
||||
$space = fixer::input('post')
|
||||
->setDefault('status', 'active')
|
||||
->setDefault('activatedBy', $this->app->user->account)
|
||||
->setDefault('activatedDate', $now)
|
||||
->setDefault('lastEditedBy', $this->app->user->account)
|
||||
->setDefault('lastEDitedDate', $now)
|
||||
->setDefault('closedBy', '')
|
||||
->setDefault('closedDate', '0000-00-00 00:00:00')
|
||||
->remove('comment')
|
||||
->get();
|
||||
|
||||
|
||||
@@ -52,7 +52,11 @@
|
||||
<?php $class = $space->status == 'closed' ? 'disabled' : '';?>
|
||||
<?php if($space->status != 'closed' and $browseType != 'involved' and !empty($unclosedSpace)) common::printLink('kanban', 'create', "spaceID={$space->id}&type={$space->type}", '<i class="icon icon-plus"></i> ' . $lang->kanban->create, '', "class='iframe' data-width='75%'", '', true);?>
|
||||
<?php common::printLink('kanban', 'editSpace', "spaceID={$space->id}", '<i class="icon icon-cog-outline"></i> ' . $lang->kanban->setting, '', "class='iframe' data-width='75%'", '', true);?>
|
||||
<?php common::printLink('kanban', 'closeSpace', "spaceID={$space->id}", '<i class="icon icon-off"></i> ' . $lang->close, '', "class='iframe {$class}'", '', true);?>
|
||||
<?php if($class == 'disabled'):?>
|
||||
<?php common::printLink('kanban', 'activateSpace', "spaceID={$space->id}", '<i class="icon icon-magic"></i> ' . $lang->activate, '', "class='iframe'", '', true);?>
|
||||
<?php else:?>
|
||||
<?php common::printLink('kanban', 'closeSpace', "spaceID={$space->id}", '<i class="icon icon-close"></i> ' . $lang->close, '', "class='iframe'", '', true);?>
|
||||
<?php endif;?>
|
||||
<?php common::printLink('kanban', 'deleteSpace', "spaceID={$space->id}", '<i class="icon icon-trash"></i> ' . $lang->delete, 'hiddenwin', '', '', true);?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user