Merge branch 'sprint/165_package_lanzongjun_bugfix' into 'sprint/165_package'

* fix bug gantt

See merge request easycorp/zentaopms!2617
This commit is contained in:
王怡栋
2022-03-29 09:14:21 +00:00
5 changed files with 32 additions and 11 deletions
@@ -23,5 +23,4 @@ $lang->execution->icons['grouptask'] = 'sitemap';
$lang->execution->aclList['private'] = "Private (Accessible to team members and project leaders)";
$lang->execution->common = 'Project Execution';
$lang->execution->gantt = 'Gantt Chart';
$lang->execution->common = 'Project Execution';
@@ -24,5 +24,4 @@ $lang->execution->icons['grouptask'] = 'sitemap';
$lang->execution->aclList['private'] = "私有(团队成员和项目负责人可访问)";
$lang->execution->common = '项目看板';
$lang->execution->gantt = '甘特图';
$lang->execution->common = '项目看板';
+13 -6
View File
@@ -127,13 +127,20 @@ public function getTRActions($currentMethod)
foreach($subMenu as $key => $value)
{
$tmpValue = explode('|', $value['link']);
$subMenu->{$key}['name'] = $tmpValue[0];
$subMenu->{$key}['module'] = $tmpValue[1];
$subMenu->{$key}['method'] = $tmpValue[2];
$subMenu->{$key}['vars'] = $tmpValue[3];
if(common::hasPriv('execution', $key))
{
$tmpValue = explode('|', $value['link']);
$subMenu->{$key}['name'] = $tmpValue[0];
$subMenu->{$key}['module'] = $tmpValue[1];
$subMenu->{$key}['method'] = $tmpValue[2];
$subMenu->{$key}['vars'] = $tmpValue[3];
}
else
{
unset($subMenu->$key);
}
}
$TRActions = '';
$TRActions .= "<div class='btn-group dropdown'>";
$TRActions .= html::a("javascript:;", "<i class='icon icon-" . $this->lang->execution->icons[$currentMethod]."'> </i>" . $subMenu->{$currentMethod}['name'] . " <span class='caret'></span>", '', "class='btn btn-link' data-toggle='dropdown'");
@@ -37,8 +37,22 @@
</div>
<?php else:?>
<div class='kanban-cards'>
<?php
$kanbanview = 'kanban';
if($this->cookie->kanbanview)
{
$kanbanview = $this->cookie->kanbanview;
}
else
{
foreach (explode('|', 'kanban|task|calendar|gantt|tree|grouptask') as $view)
{
if(common::hasPriv('execution', $view)) $kanbanview = 'kanban';
}
}
?>
<?php foreach($kanbanList as $index => $kanban):?>
<div id="kanban-<?php echo $kanban->id;?>" class='kanban-card col' data-url='<?php echo $this->createLink('execution', $this->cookie->kanbanview ? $this->cookie->kanbanview : 'kanban', "kanbanID=$kanban->id");?>'>
<div id="kanban-<?php echo $kanban->id;?>" class='kanban-card col' data-url='<?php echo $this->createLink('execution', $kanbanview, "kanbanID=$kanban->id");?>'>
<div class="panel">
<div class="panel-heading">
<span class="label kanban-status-<?php echo $kanban->status;?>"><?php echo zget($lang->execution->statusList, $kanban->status);?></span>
+2
View File
@@ -23,6 +23,8 @@ include '../../common/view/header.lite.html.php';
$moduleName = isset($lang->$module->common) ? $lang->$module->common : $module;
$methodName = isset($lang->$module->$method) ? $lang->$module->$method : $method;
if($module == 'execution' && $method == 'gantt') $methodName = $methodName->common;
/* find method name if method is lowercase letter. */
if(!isset($lang->$module->$method))
{