* Code details.
This commit is contained in:
@@ -66,8 +66,8 @@ CREATE TABLE `zt_kanbancard` (
|
||||
`pri` mediumint(8) unsigned NOT NULL,
|
||||
`assignedTo` text NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
`begin` datetime NOT NULL,
|
||||
`end` datetime NOT NULL,
|
||||
`begin` date NOT NULL,
|
||||
`end` date NOT NULL,
|
||||
`estimate` float unsigned NOT NULL,
|
||||
`color` char(7) NOT NULL,
|
||||
`acl` char(30) NOT NULL DEFAULT 'open',
|
||||
|
||||
+2
-2
@@ -708,8 +708,8 @@ CREATE TABLE `zt_kanbancard` (
|
||||
`pri` mediumint(8) unsigned NOT NULL,
|
||||
`assignedTo` text NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
`begin` datetime NOT NULL,
|
||||
`end` datetime NOT NULL,
|
||||
`begin` date NOT NULL,
|
||||
`end` date NOT NULL,
|
||||
`estimate` float unsigned NOT NULL,
|
||||
`color` char(7) NOT NULL,
|
||||
`acl` char(30) NOT NULL DEFAULT 'open',
|
||||
|
||||
+33
-3
@@ -397,7 +397,7 @@ class kanbanModel extends model
|
||||
$groupGroup = $this->getGroupGroupByRegions(array_keys($regions));
|
||||
$laneGroup = $this->getLaneGroupByRegions(array_keys($regions));
|
||||
$columnGroup = $this->getColumnGroupByRegions(array_keys($regions));
|
||||
//$taskGroup = $this->getTaskGroupByProject($kanbanID);
|
||||
$cardGroup = $this->getCardGroupByKanban($kanbanID);
|
||||
|
||||
foreach($regions as $regionID => $regionName)
|
||||
{
|
||||
@@ -412,7 +412,7 @@ class kanbanModel extends model
|
||||
$lanes = zget($laneGroup, $group->id, array());
|
||||
if(!$lanes) continue;
|
||||
|
||||
foreach($lanes as $lane) $lane->items = isset($taskGroup[$lane->id]) ? $taskGroup[$lane->id] : array();
|
||||
foreach($lanes as $lane) $lane->items = isset($cardGroup[$lane->id]) ? $cardGroup[$lane->id] : array();
|
||||
|
||||
$group->columns = zget($columnGroup, $group->id, array());
|
||||
$group->lanes = $lanes;
|
||||
@@ -555,6 +555,37 @@ class kanbanModel extends model
|
||||
return $columnData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get card group by kanban id.
|
||||
*
|
||||
* @param int $kanbanID
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getCardGroupByKanban($kanbanID)
|
||||
{
|
||||
$cards = $this->dao->select('*')->from(TABLE_KANBANCARD)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('kanban')->eq($kanbanID)
|
||||
//->orderBy('`order` asc')
|
||||
->fetchAll('id');
|
||||
|
||||
$actions = array('editcard', 'movecard', 'copycard', 'startcard', 'finishcard', 'activatecard', 'cancelcard', 'closecard', 'archivecard', 'deletecard', 'setcardcolor');
|
||||
$cardGroup = array();
|
||||
foreach($cards as $card)
|
||||
{
|
||||
$card->actions = array();
|
||||
foreach($actions as $action)
|
||||
{
|
||||
if(common::hasPriv('kanban', $action)) $card->actions[] = $action;
|
||||
}
|
||||
|
||||
$cardGroup[$card->lane]['column' . $card->column][] = $card;
|
||||
}
|
||||
|
||||
return $cardGroup;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Kanban by execution id.
|
||||
*
|
||||
@@ -1643,7 +1674,6 @@ class kanbanModel extends model
|
||||
$actions = '';
|
||||
$actions .= "<div class='btn-group'>";
|
||||
$actions .= "<a href='javascript:fullScreen();' id='fullScreenBtn' class='btn btn-link'><i class='icon icon-fullscreen'></i> {$this->lang->kanban->fullScreen}</a>";
|
||||
|
||||
$printSettingBtn = (common::hasPriv('kanban', 'createRegion') or common::hasPriv('kanban', 'edit') or common::hasPriv('kanban', 'close') or common::hasPriv('kanban', 'delete'));
|
||||
if($printSettingBtn)
|
||||
{
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
<th><?php echo $lang->kanbancard->beginAndEnd;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::input('begin', '', "class='form-control form-date form-date' placeholder='{$lang->kanbancard->begin}'");?>
|
||||
<?php echo html::input('begin', '', "class='form-control form-date' placeholder='{$lang->kanbancard->begin}'");?>
|
||||
<span class='input-group-addon fix-border'>~</span>
|
||||
<?php echo html::input('end', '', "class='form-control form-date form-date' placeholder='{$lang->kanbancard->end}'");?>
|
||||
<?php echo html::input('end', '', "class='form-control form-date' placeholder='{$lang->kanbancard->end}'");?>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -48,7 +48,18 @@
|
||||
<th><?php echo $lang->kanbancard->name;?></th>
|
||||
<td colspan='2'>
|
||||
<div class='required required-wrapper'></div>
|
||||
<?php echo html::input('name', '', "class='form-control'");?>
|
||||
<div class='input-group title-group'>
|
||||
<?php echo html::input('name', '', "class='form-control'");?>
|
||||
<span class="input-group-addon fix-border br-0"><?php echo $lang->kanbancard->pri;?></span>
|
||||
<div class="input-group-btn pri-selector" data-type="pri">
|
||||
<button type="button" class="btn dropdown-toggle br-0" data-toggle="dropdown">
|
||||
<span class="pri-text"><span class="label-pri label-pri-3" title="3">3</span></span> <span class="caret"></span>
|
||||
</button>
|
||||
<div class='dropdown-menu pull-right'>
|
||||
<?php echo html::select('pri', $lang->kanbancard->priList, 3, "class='form-control' data-provide='labelSelector' data-label-class='label-pri'");?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@@ -65,4 +76,13 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
$('#pri').on('change', function()
|
||||
{
|
||||
var $select = $(this);
|
||||
var $selector = $select.closest('.pri-selector');
|
||||
var value = $select.val();
|
||||
$selector.find('.pri-text').html('<span class="label-pri label-pri-' + value + '" title="' + value + '">' + value + '</span>');
|
||||
});
|
||||
</script>
|
||||
<?php include '../../common/view/footer.lite.html.php';?>
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
*/
|
||||
?>
|
||||
<?php include '../../common/view/header.lite.html.php';?>
|
||||
<?php js::set('colorList',$config->kanban->laneColorList);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='center-block'>
|
||||
<div class='main-header'>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php include '../../common/view/header.html.php';?>
|
||||
<?php include '../../common/view/kindeditor.html.php';?>
|
||||
<?phpjs::set('colorList',$config->kanban->laneColorList);?>
|
||||
<?php js::set('colorList',$config->kanban->laneColorList);?>
|
||||
<div id='mainContent' class='main-content'>
|
||||
<div class='main-header'>
|
||||
<h2>
|
||||
|
||||
Reference in New Issue
Block a user