Merge branch 'sprint/235_tianshujie_66996' into 'sprint/235'
Sprint/235 tianshujie 66996 See merge request easycorp/zentaopms!5214
This commit is contained in:
+15
-1
@@ -2935,7 +2935,21 @@ class bugModel extends model
|
||||
|
||||
/* If search criteria don't have products, append the selected product from the top left dropdown-menu. */
|
||||
if(is_array($productIDList)) $productIDList = implode(',', $productIDList);
|
||||
if(strpos($bugQuery, '`product`') === false) $bugQuery .= ' AND `product` IN (' . $productIDList . ')';
|
||||
if(strpos($bugQuery, '`product`') === false)
|
||||
{
|
||||
$bugQuery .= ' AND `product` IN (' . $productIDList . ')';
|
||||
}
|
||||
else
|
||||
{
|
||||
$productParis = $this->loadModel('product')->getPairs();
|
||||
$productIDList = array_keys($productParis);
|
||||
|
||||
if(!empty($productIDList))
|
||||
{
|
||||
$productIDList = implode(',', $productIDList);
|
||||
$bugQuery .= ' AND `product` IN (' . $productIDList . ')';
|
||||
}
|
||||
}
|
||||
|
||||
$allBranch = "`branch` = 'all'";
|
||||
if($branch !== 'all' and strpos($bugQuery, '`branch` =') === false) $bugQuery .= " AND `branch` in('0','$branch')";
|
||||
|
||||
@@ -388,12 +388,15 @@ class kanban extends control
|
||||
/**
|
||||
* View a kanban.
|
||||
*
|
||||
* @param int $kanbanID
|
||||
* @param int $kanbanID
|
||||
* @param int|string $regionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
public function view($kanbanID)
|
||||
public function view($kanbanID, $regionID = 'all')
|
||||
{
|
||||
$this->session->set('kanbanView', $this->app->getURI(true), 'kanban');
|
||||
|
||||
$kanban = $this->kanban->getByID($kanbanID);
|
||||
$users = $this->loadModel('user')->getPairs('noletter|nodeleted');
|
||||
|
||||
@@ -419,11 +422,14 @@ class kanban extends control
|
||||
$userList[$account]['avatar'] = $avatar;
|
||||
}
|
||||
|
||||
$regions = $this->kanban->getKanbanData($kanbanID);
|
||||
|
||||
$this->view->users = $users;
|
||||
$this->view->title = $this->lang->kanban->view;
|
||||
$this->view->regions = $this->kanban->getKanbanData($kanbanID);
|
||||
$this->view->userList = $userList;
|
||||
$this->view->kanban = $kanban;
|
||||
$this->view->regions = $regions;
|
||||
$this->view->regionID = isset($regions[$regionID]) ? $regionID : 'all';
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -469,7 +475,14 @@ class kanban extends control
|
||||
$regionID = $this->kanban->createRegion($kanban, '', $copyRegionID, $from);
|
||||
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
|
||||
if($from == 'kanban')
|
||||
{
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'closeModal' => true, 'callback' => "parent.loadKanban($kanbanID, $regionID)"));
|
||||
}
|
||||
else
|
||||
{
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => 'parent'));
|
||||
}
|
||||
}
|
||||
|
||||
$regions = $this->kanban->getRegionPairs($kanbanID, 0, $from);
|
||||
@@ -935,7 +948,7 @@ class kanban extends control
|
||||
{
|
||||
$this->kanban->batchCreateCard($kanbanID, $regionID, $groupID, $columnID);
|
||||
if(dao::isError()) return $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $backLink));
|
||||
return $this->send(array('result' => 'success', 'message' => $this->lang->saveSuccess, 'locate' => $this->session->kanbanView));
|
||||
}
|
||||
|
||||
$kanbanUsers = $kanbanID == 0 ? ',' : trim($kanban->owner) . ',' . trim($kanban->team);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
#kanbanContainer.fullscreen {overflow: auto;}
|
||||
|
||||
.region {border: 0px solid #dcdcdc; background-color: #fff;}
|
||||
.region + .region {margin-top: 20px;}
|
||||
.region + .region {margin-top: 10px;}
|
||||
.region .region-header {padding: 10px;}
|
||||
.region .region-header strong {font-size: 14px; color: #3C4353; float: left;}
|
||||
.region .region-header label {color: #999; background: transparent; border: 1px solid #ddd; margin-left: 10px; margin-right: 10px}
|
||||
@@ -156,3 +156,23 @@
|
||||
.region .kanban-board .kanban-header-sub-cols .kanban-header-col > .title > span {max-width: calc(100% - 165px) !important;}
|
||||
.region .kanban-board .kanban-header-sub-cols .kanban-header-col.left > .title > span {max-width: calc(100% - 120px) !important;}
|
||||
.executionName .delayed {margin-right: 10px;}
|
||||
|
||||
#kanbanBox {position: relative;}
|
||||
#regionTabs {background-color: #efefef; z-index: 100; display: flex;}
|
||||
#regionTabs .leftBtn.disabled i, #regionTabs .rightBtn.disabled i{color: #c2c2c2;}
|
||||
#regionTabs .icon-angle-left, #regionTabs .icon-angle-right {font-size: 20px; vertical-align: -webkit-baseline-middle;}
|
||||
#regionNavTabs {display: inline-flex; overflow: hidden; width: 100%;}
|
||||
#regionNavTabs > ul {display: inline-flex; border-bottom: unset;}
|
||||
#regionNavTabs > ul > li {padding: 6px 15px; margin-bottom: 6px; border-radius: 4px 4px 0px 0px;}
|
||||
#regionNavTabs > ul > li.active {background-color: #fff;}
|
||||
#regionNavTabs > ul > li.active::before {content: ''; width: 10px; height: 10px; position: absolute; left: -10px; top: 21px; background: radial-gradient(circle at 0% 0%,transparent 10px,#fff 0);}
|
||||
#regionNavTabs > ul > li.active::after {content: ''; width: 10px; height: 10px; position: absolute; left: calc(100%); top: 21px; background: radial-gradient(circle at 100% 0%,transparent 10px,#fff 0);}
|
||||
#regionNavTabs > ul > li > a {max-width: 195px; overflow: hidden; white-space: nowrap; padding: 0;}
|
||||
#regionNavTabs > ul > li.active > a {color: #0c64eb !important;}
|
||||
#regionNavTabs > ul > li.active > a:before {background: unset;}
|
||||
#regionTabs.affixed {margin-bottom: 5px; position: fixed; top: 0px;}
|
||||
#regionTabs.affixed + #kanbanContainer .kanban-board.kanban-affixed > .kanban-header {margin-top: 30px;}
|
||||
#regionTabs.affixed + #kanbanContainer .kanban-board.kanban-affixed > .kanban-header + .kanban-lane {margin-top: 38px;}
|
||||
#regionTabs.affixed ul > li {margin-bottom: 0px !important;}
|
||||
#regionTabs .region-actions .dropdown-menu {top: 25px;}
|
||||
#region-tab-actions {display: flex; position: relative; right: 0px;}
|
||||
|
||||
@@ -148,3 +148,16 @@ function loadOwners(spaceID)
|
||||
$('#owner').chosen();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Load kanban.
|
||||
*
|
||||
* @param int $kanbanID
|
||||
* @param int $regionID
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function loadKanban(kanbanID, regionID)
|
||||
{
|
||||
location.href = createLink('kanban', 'view', 'kanbanID=' + kanbanID + '®ionID=' + regionID);
|
||||
}
|
||||
|
||||
@@ -1508,6 +1508,7 @@ $(function()
|
||||
$(window).on('scroll', function()
|
||||
{
|
||||
$.zui.ContextMenu.hide();
|
||||
if($('#regionTabs').length > 0) updateRegionTabAffixState();
|
||||
});
|
||||
|
||||
$(document).on('click', '#splitTable .btn-plus', function()
|
||||
@@ -1547,8 +1548,28 @@ $(function()
|
||||
if(!CRKanban && kanbanInfo.status == 'closed') $('.kanban-col.kanban-header-col').css('padding', '0px 0px 0px 0px');
|
||||
|
||||
setToolTip();
|
||||
|
||||
$(window).on('resize', initRegionTabs);
|
||||
|
||||
$('.leftBtn').click(function()
|
||||
{
|
||||
if($(this).hasClass('disabled')) return;
|
||||
swipeRegionNavTabs($('#regionNavTabs').find('ul'), 'left');
|
||||
});
|
||||
|
||||
$('.rightBtn').click(function()
|
||||
{
|
||||
if($(this).hasClass('disabled')) return;
|
||||
swipeRegionNavTabs($('#regionNavTabs').find('ul'), 'right');
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Init sortable.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function initSortable()
|
||||
{
|
||||
var sortType = '';
|
||||
@@ -1777,3 +1798,122 @@ function setToolTip()
|
||||
{
|
||||
$('[data-toggle="tooltip"]').tooltip({container: 'body'});
|
||||
}
|
||||
|
||||
/**
|
||||
* Update kanban affix state for all boards in page.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function updateRegionTabAffixState()
|
||||
{
|
||||
var $kanbanContainer = $('#kanbanContainer');
|
||||
var kanbanContainer = $kanbanContainer[0].getBoundingClientRect();
|
||||
var $regionTabs = $('#regionTabs');
|
||||
var regionTabs = $regionTabs[0].getBoundingClientRect();
|
||||
if(regionTabs.top <= 0 && !$regionTabs.hasClass('affixed'))
|
||||
{
|
||||
$regionTabs.addClass('affixed');
|
||||
$regionTabs.find('#region-tab-actions').addClass('hidden');
|
||||
}
|
||||
else if($regionTabs.hasClass('affixed') && kanbanContainer.top >= 0)
|
||||
{
|
||||
$regionTabs.removeClass('affixed');
|
||||
$regionTabs.find('#region-tab-actions').removeClass('hidden');
|
||||
}
|
||||
|
||||
initRegionTabs();
|
||||
}
|
||||
|
||||
/**
|
||||
* Swipe region navigation tabs.
|
||||
*
|
||||
* @param object $object
|
||||
* @param string $direction
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
function swipeRegionNavTabs($object, direction)
|
||||
{
|
||||
var $regionNavTabs = $('#regionNavTabs');
|
||||
var offsetWidth = $regionNavTabs[0].offsetWidth;
|
||||
var objectWidth = $object[0].offsetWidth;
|
||||
var radius = 0;
|
||||
|
||||
$object.css('transition-duration', '1s');
|
||||
|
||||
$object.find('li').each(function()
|
||||
{
|
||||
if($(this).hasClass('active') && radius == 0) radius = radiusWidth;
|
||||
|
||||
/* Get the offset of the item. */
|
||||
var itemLeft = $(this)[0].offsetLeft;
|
||||
var itemWidth = $(this)[0].offsetWidth;
|
||||
var itemOffset = itemLeft + itemWidth;
|
||||
|
||||
/* Calculate the offset after sliding. */
|
||||
if(direction == 'left' && (itemOffset + distance + radius) >= 0)
|
||||
{
|
||||
/* If you swipe left, the distance is equal to the item's left. */
|
||||
distance = - itemLeft - radius;
|
||||
if(distance + radius >= 0)
|
||||
{
|
||||
distance = radius;
|
||||
$('.leftBtn').addClass('disabled');
|
||||
}
|
||||
$object[0].style.transform = 'translateX(' + distance + 'px)';
|
||||
|
||||
/* If the width of regionNavTabs plus offsetWidth is less than the width of object, change rightBtn to clickable. */
|
||||
if(offsetWidth - distance < objectWidth) $('.rightBtn').removeClass('disabled');
|
||||
return false;
|
||||
}
|
||||
|
||||
if(direction == 'right' && itemOffset > (offsetWidth - distance + radius))
|
||||
{
|
||||
/* If you swipe right, the distance is equal to the left distance of item plus the width of item minus the width of the regionNavTabs. */
|
||||
distance = offsetWidth - itemOffset - radius;
|
||||
if($(this).next().length == 0)
|
||||
{
|
||||
distance = - objectWidth + offsetWidth - radius;
|
||||
$('.rightBtn').addClass('disabled');
|
||||
}
|
||||
$object[0].style.transform = 'translateX(' + distance + 'px)';
|
||||
|
||||
/* If distance is less than 0, change leftBtn to clickable. */
|
||||
if(distance < 0) $('.leftBtn').removeClass('disabled');
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Init region tabs.
|
||||
*
|
||||
* @access public
|
||||
* @return void
|
||||
*/
|
||||
function initRegionTabs()
|
||||
{
|
||||
var $regionNavTabs = $('#regionNavTabs');
|
||||
if($regionNavTabs.length == 0) return;
|
||||
|
||||
/* Set the width of regionTab. */
|
||||
$('#regionTabs').width($('#kanban').outerWidth());
|
||||
|
||||
var regionTabsWidth = $regionNavTabs[0].offsetWidth;
|
||||
var regionTabULWidth = $regionNavTabs.find('ul')[0].offsetWidth;
|
||||
var $acitiveItem = $('#regionNavTabs > ul > li.active');
|
||||
var acitiveItemWidth = $acitiveItem[0].offsetWidth;
|
||||
var acitiveItemLeft = $acitiveItem[0].offsetLeft;
|
||||
|
||||
/* Print left and right button. */
|
||||
if(regionTabULWidth > regionTabsWidth) $('.leftBtn, .rightBtn').removeClass('hidden');
|
||||
|
||||
/* Locate the position of the currently selected item. */
|
||||
radiusWidth = 10;
|
||||
distance = (acitiveItemLeft + acitiveItemWidth) > regionTabsWidth ? - (acitiveItemLeft + acitiveItemWidth - regionTabsWidth + radiusWidth) : 0;
|
||||
if($acitiveItem.prev().length == 0) distance = radiusWidth;
|
||||
$regionNavTabs.find('ul')[0].style.transform = 'translateX(' + distance + 'px)';
|
||||
if(distance < 0) $('#regionTabs').find('.leftBtn').removeClass('disabled');
|
||||
if($acitiveItem.next().length != 0 && regionTabULWidth > regionTabsWidth) $('#regionTabs').find('.rightBtn').removeClass('disabled');
|
||||
}
|
||||
|
||||
@@ -361,6 +361,7 @@ $lang->kanbanregion = new stdclass();
|
||||
$lang->kanbanregion->name = 'Region Name';
|
||||
$lang->kanbanregion->default = 'Default Region';
|
||||
$lang->kanbanregion->style = 'Region Style';
|
||||
$lang->kanbanregion->all = 'All Region';
|
||||
|
||||
$lang->kanbanregion->confirmDelete = 'Are you sure to delete this region? After deleting this region, all data in this region will be deleted.';
|
||||
|
||||
|
||||
@@ -361,6 +361,7 @@ $lang->kanbanregion = new stdclass();
|
||||
$lang->kanbanregion->name = 'Region Name';
|
||||
$lang->kanbanregion->default = 'Default Region';
|
||||
$lang->kanbanregion->style = 'Region Style';
|
||||
$lang->kanbanregion->all = 'All Region';
|
||||
|
||||
$lang->kanbanregion->confirmDelete = 'Are you sure to delete this region? After deleting this region, all data in this region will be deleted.';
|
||||
|
||||
|
||||
@@ -361,6 +361,7 @@ $lang->kanbanregion = new stdclass();
|
||||
$lang->kanbanregion->name = 'Region Name';
|
||||
$lang->kanbanregion->default = 'Default Region';
|
||||
$lang->kanbanregion->style = 'Region Style';
|
||||
$lang->kanbanregion->all = 'All Region';
|
||||
|
||||
$lang->kanbanregion->confirmDelete = 'Are you sure to delete this region? After deleting this region, all data in this region will be deleted.';
|
||||
|
||||
|
||||
@@ -361,6 +361,7 @@ $lang->kanbanregion = new stdclass();
|
||||
$lang->kanbanregion->name = '区域名称';
|
||||
$lang->kanbanregion->default = '默认区域';
|
||||
$lang->kanbanregion->style = '区域样式';
|
||||
$lang->kanbanregion->all = '所有区域';
|
||||
|
||||
$lang->kanbanregion->confirmDelete = '您确认删除该区域吗?删除该区域后,该区域中所有数据将会被删除。';
|
||||
|
||||
|
||||
Executable → Regular
+93
-41
@@ -45,56 +45,108 @@ js::set('mode', $config->systemMode);
|
||||
js::set('alignment', $kanban->alignment);
|
||||
js::set('priv', array('canAssignCard' => common::hasPriv('kanban', 'assigncard')));
|
||||
|
||||
$canSortRegion = commonModel::hasPriv('kanban', 'sortRegion') && count($regions) > 1;
|
||||
$canEditRegion = commonModel::hasPriv('kanban', 'editRegion');
|
||||
$canCreateRegion = commonModel::hasPriv('kanban', 'createRegion');
|
||||
$canDeleteRegion = commonModel::hasPriv('kanban', 'deleteRegion');
|
||||
$canCreateLane = commonModel::hasPriv('kanban', 'createLane');
|
||||
$canSortRegion = commonModel::hasPriv('kanban', 'sortRegion') && count($regions) > 1;
|
||||
$canEditRegion = commonModel::hasPriv('kanban', 'editRegion');
|
||||
$canCreateRegion = commonModel::hasPriv('kanban', 'createRegion');
|
||||
$canDeleteRegion = commonModel::hasPriv('kanban', 'deleteRegion');
|
||||
$canCreateLane = commonModel::hasPriv('kanban', 'createLane');
|
||||
$canViewArchivedCard = commonModel::hasPriv('kanban', 'viewArchivedCard');
|
||||
$canViewArchivedColumn = commonModel::hasPriv('kanban', 'viewArchivedColumn');
|
||||
?>
|
||||
|
||||
<div class='panel' id='kanbanContainer'>
|
||||
<div class='panel-body'>
|
||||
<div id="kanban" data-id='<?php echo $kanban->id;?>'>
|
||||
<?php foreach($regions as $region):?>
|
||||
<div class="region<?php if($canSortRegion) echo ' sort';?>" data-id="<?php echo $region->id;?>">
|
||||
<div class="region-header dropdown">
|
||||
<strong><?php echo $region->name;?></strong>
|
||||
<i class="icon icon-angle-top btn-link" data-id="<?php echo $region->id;?>"></i>
|
||||
<div class='region-actions'>
|
||||
<?php if(($canEditRegion || $canCreateLane || $canDeleteRegion || $canCreateRegion) and !(isset($this->config->CRKanban) and $this->config->CRKanban == '0' and $kanban->status == 'closed')):?>
|
||||
<button class="btn btn-link action" type="button" data-toggle="dropdown"><i class="icon icon-ellipsis-v"></i></button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<?php if($canCreateRegion) echo '<li>' . html::a(inlink('createRegion', "kanbanID={$kanban->id}", '', 1), '<i class="icon icon-plus"></i>' . $this->lang->kanban->createRegion, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
|
||||
<?php if($canEditRegion) echo '<li>' . html::a(inlink('editRegion', "regionID={$region->id}", '', 1), '<i class="icon icon-edit"></i>' . $this->lang->kanban->editRegion, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
|
||||
<?php if($canCreateLane) echo '<li>' . html::a(inlink('createLane', "kanbanID={$kanban->id}®ionID={$region->id}", '', 1), '<i class="icon icon-plus"></i>' . $this->lang->kanban->createLane, '', "class='iframe'") . '</li>';?>
|
||||
<?php if($canDeleteRegion and count($regions) > 1) echo '<li>' . html::a(inlink('deleteRegion', "regionID={$region->id}"), '<i class="icon icon-trash"></i>' . $this->lang->kanban->deleteRegion, "hiddenwin") . '</li>';?>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class='region-actions'>
|
||||
<?php $canViewArchivedCard = commonModel::hasPriv('kanban', 'viewArchivedCard');?>
|
||||
<?php $canViewArchivedColumn = commonModel::hasPriv('kanban', 'viewArchivedColumn');?>
|
||||
<?php if(($canViewArchivedCard or $canViewArchivedColumn) and $kanban->archived):?>
|
||||
<div>
|
||||
<button data-toggle="dropdown" class="btn btn-link action" type="button" title=<?php echo $this->lang->kanban->archived;?>>
|
||||
<span><?php echo $this->lang->kanban->archived;?></span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<div id='kanbanBox'>
|
||||
<?php if(count($regions) > 1):?>
|
||||
<div id='regionTabs'>
|
||||
<div class='leftBtn hidden disabled'><a><i class='icon icon-angle-left'></i></a></div>
|
||||
<div id='regionNavTabs'>
|
||||
<ul class="nav nav-tabs">
|
||||
<li data-id='all' class="<?php echo $regionID === 'all' ? 'active' : '';?>" title="<?php echo $lang->kanbanregion->all;?>"><a href="<?php echo inlink('view', "kanbanID=$kanban->id®ionID=all");?>"><?php echo $lang->kanbanregion->all;?></a></li>
|
||||
<?php foreach($regions as $region):?>
|
||||
<li data-id="<?php echo $region->id;?>" class="<?php echo $region->id == $regionID ? 'active' : '';?>" title="<?php echo $region->name;?>"><a href="<?php echo inlink('view', "kanbanID=$kanban->id®ionID=$region->id");?>"><?php echo $region->name;?></a></li>
|
||||
<?php endforeach;?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class='rightBtn hidden disabled'><a><i class='icon icon-angle-right'></i></a></div>
|
||||
<?php if($regionID !== 'all'):?>
|
||||
<div id='region-tab-actions'>
|
||||
<div class='region-actions'>
|
||||
<?php if(($canViewArchivedCard or $canViewArchivedColumn) and $kanban->archived):?>
|
||||
<div>
|
||||
<button data-toggle="dropdown" class="btn btn-link action" type="button" title=<?php echo $this->lang->kanban->archived;?>>
|
||||
<span><?php echo $this->lang->kanban->archived;?></span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<?php if($canViewArchivedCard) echo '<li>' . html::a("javascript:loadMore(\"Card\", $regionID)", '<i class="icon icon-card-archive"></i>' . $this->lang->kanban->viewArchivedCard) . '</li>';?>
|
||||
<?php if($canViewArchivedColumn) echo '<li>' . html::a("javascript:loadMore(\"Column\", $regionID)", '<i class="icon icon-col-archive"></i>' . $this->lang->kanban->viewArchivedColumn) . '</li>';?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<?php echo '<li>' . html::a(inlink('viewArchivedCard', "", '', 1), '<i class="icon icon-card-archive"></i>' . $this->lang->kanban->viewArchivedCard, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
|
||||
<?php echo '<li>' . html::a(inlink('viewArchivedColumn', "", '', 1), '<i class="icon icon-col-archive"></i>' . $this->lang->kanban->viewArchivedColumn, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class='region-actions'>
|
||||
<?php if(($canEditRegion || $canCreateLane || $canDeleteRegion || $canCreateRegion) and !(isset($this->config->CRKanban) and $this->config->CRKanban == '0' and $kanban->status == 'closed')):?>
|
||||
<button class="btn btn-link action" type="button" data-toggle="dropdown"><i class="icon icon-ellipsis-v"></i></button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<?php if($canCreateRegion) echo '<li>' . html::a(inlink('createRegion', "kanbanID={$kanban->id}", '', 1), '<i class="icon icon-plus"></i>' . $this->lang->kanban->createRegion, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
|
||||
<?php if($canEditRegion) echo '<li>' . html::a(inlink('editRegion', "regionID={$regionID}", '', 1), '<i class="icon icon-edit"></i>' . $this->lang->kanban->editRegion, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
|
||||
<?php if($canCreateLane) echo '<li>' . html::a(inlink('createLane', "kanbanID={$kanban->id}®ionID={$regionID}", '', 1), '<i class="icon icon-plus"></i>' . $this->lang->kanban->createLane, '', "class='iframe'") . '</li>';?>
|
||||
<?php if($canDeleteRegion and count($regions) > 1) echo '<li>' . html::a(inlink('deleteRegion', "regionID={$regionID}"), '<i class="icon icon-trash"></i>' . $this->lang->kanban->deleteRegion, "hiddenwin") . '</li>';?>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div class='panel' id='kanbanContainer'>
|
||||
<div class='panel-body'>
|
||||
<div id="kanban" data-id='<?php echo $kanban->id;?>'>
|
||||
<?php $regionGroup = ($regionID !== 'all' and isset($regions[$regionID])) ? array($regionID => $regions[$regionID]) : $regions;?>
|
||||
<?php foreach($regionGroup as $region):?>
|
||||
<div class="region<?php if($canSortRegion) echo ' sort';?>" data-id="<?php echo $region->id;?>">
|
||||
<div class="region-header dropdown">
|
||||
<?php if($regionID === 'all'):?>
|
||||
<strong><?php echo $region->name;?></strong>
|
||||
<i class="icon icon-angle-top btn-link" data-id="<?php echo $region->id;?>"></i>
|
||||
<div class='region-actions'>
|
||||
<?php if(($canEditRegion || $canCreateLane || $canDeleteRegion || $canCreateRegion) and !(isset($this->config->CRKanban) and $this->config->CRKanban == '0' and $kanban->status == 'closed')):?>
|
||||
<button class="btn btn-link action" type="button" data-toggle="dropdown"><i class="icon icon-ellipsis-v"></i></button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<?php if($canViewArchivedCard) echo '<li>' . html::a("javascript:loadMore(\"Card\", $region->id)", '<i class="icon icon-card-archive"></i>' . $this->lang->kanban->viewArchivedCard) . '</li>';?>
|
||||
<?php if($canViewArchivedColumn) echo '<li>' . html::a("javascript:loadMore(\"Column\", $region->id)", '<i class="icon icon-col-archive"></i>' . $this->lang->kanban->viewArchivedColumn) . '</li>';?>
|
||||
<?php if($canCreateRegion) echo '<li>' . html::a(inlink('createRegion', "kanbanID={$kanban->id}", '', 1), '<i class="icon icon-plus"></i>' . $this->lang->kanban->createRegion, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
|
||||
<?php if($canEditRegion) echo '<li>' . html::a(inlink('editRegion', "regionID={$region->id}", '', 1), '<i class="icon icon-edit"></i>' . $this->lang->kanban->editRegion, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
|
||||
<?php if($canCreateLane) echo '<li>' . html::a(inlink('createLane', "kanbanID={$kanban->id}®ionID={$region->id}", '', 1), '<i class="icon icon-plus"></i>' . $this->lang->kanban->createLane, '', "class='iframe'") . '</li>';?>
|
||||
<?php if($canDeleteRegion and count($regions) > 1) echo '<li>' . html::a(inlink('deleteRegion', "regionID={$region->id}"), '<i class="icon icon-trash"></i>' . $this->lang->kanban->deleteRegion, "hiddenwin") . '</li>';?>
|
||||
</ul>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class='region-actions'>
|
||||
<?php if(($canViewArchivedCard or $canViewArchivedColumn) and $kanban->archived):?>
|
||||
<div>
|
||||
<button data-toggle="dropdown" class="btn btn-link action" type="button" title=<?php echo $this->lang->kanban->archived;?>>
|
||||
<span><?php echo $this->lang->kanban->archived;?></span>
|
||||
<span class="caret"></span>
|
||||
</button>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<?php if($canViewArchivedCard) echo '<li>' . html::a("javascript:loadMore(\"Card\", $region->id)", '<i class="icon icon-card-archive"></i>' . $this->lang->kanban->viewArchivedCard) . '</li>';?>
|
||||
<?php if($canViewArchivedColumn) echo '<li>' . html::a("javascript:loadMore(\"Column\", $region->id)", '<i class="icon icon-col-archive"></i>' . $this->lang->kanban->viewArchivedColumn) . '</li>';?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<?php echo '<li>' . html::a(inlink('viewArchivedCard', "", '', 1), '<i class="icon icon-card-archive"></i>' . $this->lang->kanban->viewArchivedCard, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
|
||||
<?php echo '<li>' . html::a(inlink('viewArchivedColumn', "", '', 1), '<i class="icon icon-col-archive"></i>' . $this->lang->kanban->viewArchivedColumn, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<ul class="dropdown-menu pull-right">
|
||||
<?php echo '<li>' . html::a(inlink('viewArchivedCard', "", '', 1), '<i class="icon icon-card-archive"></i>' . $this->lang->kanban->viewArchivedCard, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
|
||||
<?php echo '<li>' . html::a(inlink('viewArchivedColumn', "", '', 1), '<i class="icon icon-col-archive"></i>' . $this->lang->kanban->viewArchivedColumn, '', 'class="iframe" data-toggle="modal" data-width="600px"') . '</li>';?>
|
||||
</ul>
|
||||
</div>
|
||||
<div id='kanban<?php echo $region->id;?>' data-id='<?php echo $region->id;?>' class='kanban'></div>
|
||||
</div>
|
||||
<div id='kanban<?php echo $region->id;?>' data-id='<?php echo $region->id;?>' class='kanban'></div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user