* Fix bug for lite kanban.
This commit is contained in:
@@ -85,7 +85,7 @@ public function getKanban4Group($executionID, $browseType, $groupBy, $searchValu
|
||||
$columnData[$columnID]['actions'] = $column->actions;
|
||||
|
||||
$cardOrder = 1;
|
||||
$objects = zget($cardGroup, $columnID, array());
|
||||
$objects = zget($cardGroup, $column->columnType, array());
|
||||
foreach($objects as $object)
|
||||
{
|
||||
if(empty($object)) continue;
|
||||
@@ -104,10 +104,14 @@ public function getKanban4Group($executionID, $browseType, $groupBy, $searchValu
|
||||
|
||||
if($browseType == 'task')
|
||||
{
|
||||
if($searchValue != '' and strpos($object->name, $searchValue) === false) continue;
|
||||
$cardData['name'] = $object->name;
|
||||
$cardData['status'] = $object->status;
|
||||
$cardData['left'] = $object->left;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($searchValue != '' and strpos($object->name, $searchValue) === false) continue;
|
||||
$cardData['title'] = $object->title;
|
||||
}
|
||||
|
||||
|
||||
@@ -37,17 +37,17 @@
|
||||
</div>
|
||||
<?php else:?>
|
||||
<div class='kanban-cards'>
|
||||
<?php
|
||||
<?php
|
||||
$kanbanview = 'kanban';
|
||||
if($this->cookie->kanbanview) $kanbanview = $this->cookie->kanbanview;
|
||||
|
||||
|
||||
if(!common::hasPriv('execution', $kanbanview))
|
||||
{
|
||||
foreach (explode('|', 'kanban|task|calendar|gantt|tree|grouptask') as $view)
|
||||
foreach (explode('|', 'kanban|task|calendar|gantt|tree|grouptask') as $view)
|
||||
{
|
||||
if(common::hasPriv('execution', $view))
|
||||
{
|
||||
$kanbanview = $view;
|
||||
$kanbanview = $view;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -93,24 +93,24 @@
|
||||
</div>
|
||||
<div class="kanban-footer">
|
||||
<div class='kanban-members pull-left'>
|
||||
<?php $teams = $memberGroup[$kanban->id];?>
|
||||
<?php $teams = isset($memberGroup[$kanban->id]) ? $memberGroup[$kanban->id] : array();?>
|
||||
<?php $count = 0;?>
|
||||
<?php foreach($teams as $member):?>
|
||||
<?php if($count > 2) break;?>
|
||||
<?php $count ++;?>
|
||||
<?php if($count > 2) break;?>
|
||||
<?php $count ++;?>
|
||||
<div title="<?php echo zget($users, $member->account);?>">
|
||||
<?php echo html::smallAvatar(array('avatar' => zget($usersAvatar, $member->account), 'account' => $member->account, 'name' => isset($member->realname) ? $member->realname : '')); ?>
|
||||
</div>
|
||||
<?php endforeach;?>
|
||||
<?php if(count($teams) > 4):?>
|
||||
<?php echo '<span>… </span>';?>
|
||||
<?php endif;?>
|
||||
<?php echo '<span>… </span>';?>
|
||||
<?php endif;?>
|
||||
<?php if(count($teams) > 3):?>
|
||||
<?php $lastMember = end($teams);?>
|
||||
<div title="<?php echo $lastMember->realname;?>">
|
||||
<?php echo html::smallAvatar(array('avatar' => $usersAvatar[$lastMember->account], 'account' => $lastMember->account, 'name' => $lastMember->realname), 'avatar-circle avatar-' . key($lastMember)); ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
<div title="<?php echo $lastMember->realname;?>">
|
||||
<?php echo html::smallAvatar(array('avatar' => $usersAvatar[$lastMember->account], 'account' => $lastMember->account, 'name' => $lastMember->realname), 'avatar-circle avatar-' . key($lastMember)); ?>
|
||||
</div>
|
||||
<?php endif;?>
|
||||
</div>
|
||||
<div class='kanban-members-count pull-left'><?php echo sprintf($lang->project->teamSumCount, count($teams));?></div>
|
||||
<div class='kanban-acl pull-right'>
|
||||
|
||||
Reference in New Issue
Block a user