Merge branch 'sprint/177_tianshujie_card' into 'kanban'
* Add the ability to create cards. See merge request easycorp/zentaopms!912
This commit is contained in:
@@ -247,6 +247,22 @@ class kanban extends control
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a card.
|
||||
*
|
||||
* @param int $kanbanID
|
||||
* @param int $regionID
|
||||
* @param int $groupID
|
||||
* @param int $laneID
|
||||
* @param int $columnID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function createCard($kanbanID, $regionID, $groupID, $laneID, $columnID)
|
||||
{
|
||||
$this->display();
|
||||
}
|
||||
|
||||
/**
|
||||
* Set WIP.
|
||||
*
|
||||
|
||||
@@ -108,11 +108,18 @@ function renderHeaderCol($column, column, $header, kanbanData)
|
||||
}
|
||||
}
|
||||
|
||||
var regionID = $column.closest('.kanban').data('id');
|
||||
var groupID = $column.closest('.kanban-board').data('id');
|
||||
var laneID = column.$kanbanData.lanes[0].id ? column.$kanbanData.lanes[0].id : 0;
|
||||
var columnID = $column.closest('.kanban-col').data('id');
|
||||
var cardUrl = createLink('kanban', 'createCard', 'kanbanID=' + kanbanID + '®ionID=' + regionID + '&groupID=' + groupID + '&laneID=' + laneID + '&columnID=' + columnID);
|
||||
|
||||
/* Render more menu. */
|
||||
if(!$column.children('.actions').length) $column.append('<div class="actions"></div>');
|
||||
var $actions = $column.children('.actions');
|
||||
$actions.attr('title', lang.more);
|
||||
$actions.html('<button class="btn btn-link action" title="' + kanbanLang.moreAction + '" data-contextmenu="column" data-column="' + column.id + '" data-kanban="' + kanban.id + '"><i class="icon icon-ellipsis-v"></i></button>');
|
||||
var addItemBtn = ['<a data-contextmenu="columnCreate" data-toggle="modal" data-action="addItem" data-column="' + column.id + '" data-lane="' + laneID + '" href="' + cardUrl + '" class="text-primary iframe">', '<i class="icon icon-expand-alt"></i>', '</a>'].join('');
|
||||
var moreAction = ' <button class="btn btn-link action" title="' + kanbanLang.moreAction + '" data-contextmenu="column" data-column="' + column.id + '"><i class="icon icon-ellipsis-v"></i></button>';
|
||||
$actions.html(addItemBtn + moreAction);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -363,7 +370,7 @@ function openAddTaskForm($element)
|
||||
var laneID = $element.closest('.kanban-lane').data('id');
|
||||
var columnID = $element.closest('.kanban-col').data('id');
|
||||
var status = $element.closest('.kanban-col').data('type');
|
||||
var modalUrl = createLink('sys.task', 'create', 'kanbanID=' + kanbanID + '&from=kanban®ionID=' + regionID + '&groupID=' + groupID + '&laneID=' + laneID + '&columnID=' + columnID + '&status=' + status);
|
||||
var modalUrl = createLink('kanban', 'createCard', 'kanbanID=' + kanbanID + '®ionID=' + regionID + '&groupID=' + groupID + '&laneID=' + laneID + '&columnID=' + columnID);
|
||||
$.zui.modalTrigger.show(
|
||||
{
|
||||
url: modalUrl,
|
||||
|
||||
@@ -214,3 +214,6 @@ $lang->kanbanregion->name = 'Kanban Region';
|
||||
$lang->kanbanregion->default = 'Default Region';
|
||||
|
||||
$lang->kanbancard = new stdclass();
|
||||
$lang->kanbancard->create = 'Create Card';
|
||||
|
||||
$lang->kanbancard->name = 'Card Name';
|
||||
|
||||
@@ -214,3 +214,6 @@ $lang->kanbanregion->name = '看板区域';
|
||||
$lang->kanbanregion->default = '默认区域';
|
||||
|
||||
$lang->kanbancard = new stdclass();
|
||||
$lang->kanbancard->create = '创建卡片';
|
||||
|
||||
$lang->kanbancard->name = '卡片名称';
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
/**
|
||||
* The create card view of kanban module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2021 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
* @author Shujie Tian<tianshujie@cnezsoft.com>
|
||||
* @package kanban
|
||||
* @version $Id: createcard.html.php 5090 2021-12-13 13:49:24Z tainshujie@cnezsoft.com $
|
||||
* @link https://www.zentao.net
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
<h2><?php echo $lang->kanbancard->create;?></h2>
|
||||
</div>
|
||||
<form class='main-form form-ajax' method='post' enctype='multipart/form-data' id='dataform'>
|
||||
<table class='table table-form'>
|
||||
<tr>
|
||||
<th><?php echo $lang->kanbancard->name;?></th>
|
||||
<td><?php echo html::input('name', '', "class='form-control'");?></td><td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan='4' class='text-center form-actions'>
|
||||
<?php echo html::submitButton();?>
|
||||
<?php echo html::commonButton($lang->cancel, "data-dismiss='modal'", 'btn btn-wide');?>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
Reference in New Issue
Block a user