* code for task #49356.
This commit is contained in:
@@ -246,6 +246,7 @@ $filter->program->ajaxgetdropmenu->cookie['showClosed'] = 'code';
|
||||
$filter->project->default->cookie['lastProject'] = 'int';
|
||||
$filter->project->default->cookie['lastPRJ'] = 'int';
|
||||
$filter->project->default->cookie['projectMode'] = 'code';
|
||||
$filter->project->default->cookie['kanbanview'] = 'code';
|
||||
$filter->project->browse->cookie['involved'] = 'code';
|
||||
$filter->project->browse->cookie['projectType'] = 'code';
|
||||
$filter->project->story->cookie['storyModuleParam'] = 'int';
|
||||
|
||||
@@ -12,6 +12,9 @@ class myExecution extends execution
|
||||
$this->loadModel('project')->setMenu($execution->project);
|
||||
$this->lang->kanban->menu->execution['subMenu'] = new stdClass();
|
||||
|
||||
$this->session->set('kanbanview', $currentMethod);
|
||||
setcookie('kanbanview', $currentMethod, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
|
||||
/* change subMenu to sub select menu */
|
||||
$TRActions = $this->execution->getTRActions($currentMethod);
|
||||
|
||||
|
||||
@@ -29,8 +29,18 @@ public function setMenu($executionID, $buildID = 0, $extra = '')
|
||||
}
|
||||
$modulePageNav .= "</ul></div></div>";
|
||||
|
||||
if(in_array($this->app->rawMethod, array('task', 'calendar', 'gantt', 'tree', 'grouptask'))) $this->lang->TRActions = $this->getTRActions($this->app->rawMethod);
|
||||
if(in_array($this->app->rawMethod, array('relation', 'maintainrelation'))) $this->lang->TRActions = $this->getTRActions('gantt');
|
||||
$lowerModule = strtolower($this->app->rawModule);
|
||||
$lowerMethod = strtolower($this->app->rawMethod);
|
||||
|
||||
if($lowerModule == 'execution' and strpos('|kanban|task|calendar|gantt|tree|grouptask|', "|{$lowerMethod}|") !== false)
|
||||
{
|
||||
$this->session->set('kanbanview', $lowerMethod);
|
||||
setcookie('kanbanview', $lowerMethod, $this->config->cookieLife, $this->config->webRoot, '', false, true);
|
||||
}
|
||||
|
||||
if(strpos('|task|calendar|gantt|tree|grouptask|', "|{$lowerMethod}|") !== false) $this->lang->TRActions = $this->getTRActions($lowerMethod);
|
||||
if(strpos('|relation|maintainrelation|', "|{$lowerMethod}|") !== false) $this->lang->TRActions = $this->getTRActions('gantt');
|
||||
if($lowerModule == 'task' || ($lowerModule == 'execution' and strpos('|kanban|task|calendar|gantt|tree|grouptask|', "|{$lowerMethod}|") === false)) $this->lang->TRActions = $this->getTRActions($this->session->kanbanview);
|
||||
|
||||
$this->lang->modulePageNav = $modulePageNav;
|
||||
}
|
||||
@@ -94,12 +104,14 @@ public function getTRActions($currentMethod)
|
||||
}
|
||||
|
||||
$TRActions = '';
|
||||
$TRActions .= "<div class='dropdown'>";
|
||||
$TRActions .= html::a('javascript:;', "<i class='icon icon-" . $this->lang->execution->icons[$currentMethod]."'></i> " . $subMenu->{$currentMethod}['name'] . "<span class='caret'></span>", '', "data-toggle='dropdown' class='btn btn-link'");
|
||||
$TRActions .= "<div class='btn-group dropdown'>";
|
||||
$TRActions .= html::a(helper::createLink('execution', $subMenu->{$currentMethod}['method'], $subMenu->{$currentMethod}['vars']), "<i class='icon icon-" . $this->lang->execution->icons[$currentMethod]."'> </i>" . $subMenu->{$currentMethod}['name'], '', "class='btn btn-link'");
|
||||
$TRActions .= "<button type='button' class='btn btn-link dropdown-toggle' data-toggle='dropdown'><span class='caret'></span></button>";
|
||||
$TRActions .= "<ul class='dropdown-menu pull-right'>";
|
||||
foreach($subMenu as $subKey => $subName)
|
||||
{
|
||||
$TRActions .= '<li>' . html::a(helper::createLink('execution', $subName['method'], $subName['vars']), "<i class='icon icon-" . $this->lang->execution->icons[$subName['method']] . "'></i> " . $subName['name']) . '</li>';
|
||||
$active = $this->session->kanbanview == $subKey ? "class='active'" : '';
|
||||
$TRActions .= "<li $active>" . html::a(helper::createLink('execution', $subName['method'], $subName['vars']), "<i class='icon icon-" . $this->lang->execution->icons[$subName['method']] . "'></i> " . $subName['name']) . '</li>';
|
||||
}
|
||||
|
||||
$TRActions .= "</ul></div>";
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
<?php else:?>
|
||||
<div class='kanban-cards'>
|
||||
<?php foreach($kanbanList as $index => $kanban):?>
|
||||
<div id="kanban-<?php echo $kanban->id;?>" class='kanban-card col' data-url='<?php echo $this->createLink('execution', 'kanban', "kanbanID=$kanban->id");?>'>
|
||||
<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 class="panel">
|
||||
<div class="panel-heading">
|
||||
<span class="label kanban-status-<?php echo $kanban->status;?>"><?php echo zget($lang->execution->statusList, $kanban->status);?></span>
|
||||
|
||||
@@ -80,8 +80,10 @@
|
||||
<td class='text-left<?php echo zget($visibleFields, 'dept', ' hidden')?>' style='overflow:visible'><?php echo html::select("dept[$i]", $depts, $i > 0 ? 'ditto' : $deptID, "class='form-control chosen'");?></td>
|
||||
<td><?php echo html::input("account[$i]", '', "class='form-control account_$i' onchange='changeEmail($i)'");?></td>
|
||||
<td><?php echo html::input("realname[$i]", '', "class='form-control'");?></td>
|
||||
<td class="<?php echo $config->systemMode == 'new' ? 'text-left' : 'text-center';?>"><?php echo $config->systemMode == 'new' ? html::select("visions[$i][]", $visionList, $i > 0 ? 'ditto' : key($visionList), "class='form-control chosen' multiple") : $visionList['rnd'];?></td>
|
||||
<?php if($config->systemMode == 'classic') echo html::hidden("visions[$i][]", 'rnd');?>
|
||||
<td class="<?php echo $config->systemMode == 'new' ? 'text-left' : 'text-center';?>">
|
||||
<?php if($config->systemMode == 'new') echo html::select("visions[$i][]", $visionList, $i > 0 ? 'ditto' : (isset($visionList[$this->config->vision]) ? $this->config->vision : key($visionList)), "class='form-control chosen' multiple");?>
|
||||
<?php if($config->systemMode == 'classic') echo $visionList['rnd'] . html::hidden("visions[$i][]", 'rnd');?>
|
||||
</td>
|
||||
<td><?php echo html::select("role[$i]", $lang->user->roleList, $i > 0 ? 'ditto' : '', "class='form-control' onchange='changeGroup(this.value, $i)'");?></td>
|
||||
<td class='text-left' style='overflow:visible'><?php echo html::select("group[$i]", $groupList, $i > 0 ? 'ditto' : '', "class='form-control chosen'");?></td>
|
||||
<td <?php echo zget($visibleFields, 'email', "class='hidden'")?>><?php echo html::input("email[$i]", '', "class='form-control email_$i' onchange='setDefaultEmail($i)'");?></td>
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
<tr>
|
||||
<th><?php echo $lang->user->visions;?></th>
|
||||
<?php $visionList = $this->user->getVisionList();?>
|
||||
<td><?php echo html::checkbox('visions', $visionList, key($visionList), "class='form-control'");?></td>
|
||||
<td><?php echo html::checkbox('visions', $visionList, isset($visionList[$this->config->vision]) ? $this->config->vision : key($visionList), "class='form-control'");?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th><?php echo $lang->user->realname;?></th>
|
||||
|
||||
Reference in New Issue
Block a user