* Task#41216.
This commit is contained in:
@@ -337,7 +337,7 @@ $lang->doc->menu->my = array('link' => "{$lang->doc->my}|doc|browse|brows
|
||||
$lang->doc->menu->collect = array('link' => "{$lang->doc->favorite}|doc|browse|browseTyp=collectedbyme", 'alias' => 'collect');
|
||||
$lang->doc->menu->product = array('link' => "{$lang->doc->product}|doc|tableContents|type=product", 'alias' => 'showfiles,product');
|
||||
if($config->systemMode == 'new') $lang->doc->menu->project = array('link' => "{$lang->doc->project}|doc|tableContents|type=project", 'alias' => 'showfiles,project');
|
||||
if($config->systemMode == 'classic') $lang->doc->menu->execution = array('link' => "{$lang->doc->execution}|doc|tableContents|type=execution", 'alias' => 'showfiles,execution');
|
||||
$lang->doc->menu->execution = array('link' => "{$lang->doc->execution}|doc|tableContents|type=execution", 'alias' => 'showfiles,execution');
|
||||
$lang->doc->menu->custom = array('link' => "{$lang->doc->custom}|doc|tableContents|type=custom", 'alias' => 'custom');
|
||||
|
||||
$lang->doc->dividerMenu = ',product,';
|
||||
@@ -349,12 +349,12 @@ $lang->doc->menuOrder[15] = 'my';
|
||||
$lang->doc->menuOrder[20] = 'collect';
|
||||
$lang->doc->menuOrder[25] = 'product';
|
||||
if($config->systemMode == 'new') $lang->doc->menuOrder[30] = 'project';
|
||||
if($config->systemMode == 'classic') $lang->doc->menuOrder[30] = 'execution';
|
||||
$lang->doc->menuOrder[35] = 'custom';
|
||||
$lang->doc->menuOrder[35] = 'execution';
|
||||
$lang->doc->menuOrder[40] = 'custom';
|
||||
|
||||
$lang->doc->menu->product['subMenu'] = new stdclass();
|
||||
if($config->systemMode == 'new') $lang->doc->menu->project['subMenu'] = new stdclass();
|
||||
if($config->systemMode == 'classic') $lang->doc->menu->execution['subMenu'] = new stdclass();
|
||||
$lang->doc->menu->execution['subMenu'] = new stdclass();
|
||||
$lang->doc->menu->custom['subMenu'] = new stdclass();
|
||||
|
||||
/* Report menu.*/
|
||||
|
||||
@@ -168,9 +168,9 @@ class doc extends control
|
||||
}
|
||||
|
||||
$libTypeList = $this->lang->doc->libTypeList;
|
||||
if(empty($products)) unset($libTypeList['product']);
|
||||
if(empty($projects)) unset($libTypeList['project']);
|
||||
if(empty($executions) or ($this->config->systemMode == 'new' and $this->app->openApp == 'doc')) unset($libTypeList['execution']);
|
||||
if(empty($products)) unset($libTypeList['product']);
|
||||
if(empty($projects)) unset($libTypeList['project']);
|
||||
if(empty($executions)) unset($libTypeList['execution']);
|
||||
|
||||
$this->view->groups = $this->loadModel('group')->getPairs();
|
||||
$this->view->users = $this->user->getPairs('nocode');
|
||||
|
||||
+20
-19
@@ -1105,11 +1105,7 @@ class docModel extends model
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere($type)->eq($objectID)
|
||||
->beginIF(!empty($appendLib))->orWhere('id')->eq($appendLib)->fi()
|
||||
->beginIF($type == 'project')
|
||||
->andWhere('(execution')->eq(0)
|
||||
->orWhere('main')->eq(0)
|
||||
->markRight(1)
|
||||
->fi()
|
||||
->beginIF($type == 'project')->andWhere('execution')->eq(0)->fi()
|
||||
->orderBy('`order`, id')
|
||||
->fetchAll('id');
|
||||
}
|
||||
@@ -1206,6 +1202,8 @@ class docModel extends model
|
||||
}
|
||||
elseif($objectType == 'execution')
|
||||
{
|
||||
$projectPairs = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('type')->eq('project')->fetchPairs('id');
|
||||
|
||||
$executions = $this->dao->select('*')->from(TABLE_EXECUTION)
|
||||
->where('deleted')->eq(0)
|
||||
->andWhere('type')->in('sprint,stage')
|
||||
@@ -1216,6 +1214,8 @@ class docModel extends model
|
||||
$orderedExecutions = array();
|
||||
foreach($executions as $id => $execution)
|
||||
{
|
||||
$execution->name = zget($projectPairs, $execution->project) . '/' . $execution->name;
|
||||
|
||||
if($execution->status != 'done' and $execution->status != 'closed' and $execution->PM == $this->app->user->account)
|
||||
{
|
||||
$myObjects[$id] = $execution->name;
|
||||
@@ -2013,22 +2013,23 @@ class docModel extends model
|
||||
{
|
||||
if($type != 'custom' and $type != 'book' and empty($objects)) return '';
|
||||
|
||||
$output = '';
|
||||
$closedProjectsHtml = '';
|
||||
$closedProjects = array();
|
||||
$maxHeight = ($type == 'project' and $this->app->openApp == 'doc') ? '260px' : '290px';
|
||||
$class = ($type == 'project' and $this->app->openApp == 'doc') ? 'col-left' : '';
|
||||
$output = '';
|
||||
$closedObjectsHtml = '';
|
||||
$closedObjects = array();
|
||||
$maxHeight = (in_array($type, array('project','execution')) and $this->app->openApp == 'doc') ? '260px' : '290px';
|
||||
$class = (in_array($type, array('project','execution')) and $this->app->openApp == 'doc') ? 'col-left' : '';
|
||||
|
||||
$currentMethod = $this->app->getMethodName();
|
||||
$methodName = in_array($currentMethod, array('tablecontents', 'showfiles')) ? 'tablecontents' : 'objectLibs';
|
||||
$objectTitle = $type == 'execution' ? substr($objects[$objectID], strpos($objects[$objectID], '/') + 1) : $objects[$objectID];
|
||||
|
||||
if($this->app->openApp == 'doc' and $type != 'custom' and $type != 'book')
|
||||
{
|
||||
$output = <<<EOT
|
||||
<div class='btn-group angle-btn'>
|
||||
<div class='btn-group'>
|
||||
<button data-toggle='dropdown' type='button' class='btn btn-limit' id='currentItem' title='{$objects[$objectID]}'>
|
||||
<span class='text'>{$objects[$objectID]}</span>
|
||||
<button data-toggle='dropdown' type='button' class='btn btn-limit' id='currentItem' title='{$objectTitle}'>
|
||||
<span class='text'>{$objectTitle}</span>
|
||||
<span class='caret'></span>
|
||||
</button>
|
||||
<div id='dropMenu' class='dropdown-menu search-list load-indicator' data-ride='searchList'>
|
||||
@@ -2042,25 +2043,25 @@ class docModel extends model
|
||||
<div class='table-col $class'>
|
||||
<div class='list-group' style='max-height: $maxHeight'>
|
||||
EOT;
|
||||
if($type == 'project' and $this->app->openApp == 'doc')
|
||||
if(in_array($type, array('project','execution')) and $this->app->openApp == 'doc')
|
||||
{
|
||||
$closedProjects = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->in(array_keys($objects))->andWhere('status')->eq('closed')->fetchPairs();
|
||||
$closedObjects = $this->dao->select('id,name')->from(TABLE_PROJECT)->where('id')->in(array_keys($objects))->andWhere('status')->eq('closed')->fetchPairs();
|
||||
}
|
||||
|
||||
foreach($objects as $key => $object)
|
||||
{
|
||||
$selected = $key == $objectID ? 'selected' : '';
|
||||
if(isset($closedProjects[$key]))
|
||||
if(isset($closedObjects[$key]))
|
||||
{
|
||||
$closedProjectsHtml .= html::a(inlink($methodName, "type=$type&objectID=$key"), $object, '', "class='$selected' data-app='{$this->app->openApp}'");
|
||||
$closedObjectsHtml .= html::a(inlink($methodName, "type=$type&objectID=$key"), $object, '', "class='$selected' title='$object' data-app='{$this->app->openApp}'");
|
||||
if($selected == 'selected') $tabActive = 'closed';
|
||||
}
|
||||
else
|
||||
{
|
||||
$output .= html::a(inlink($methodName, "type=$type&objectID=$key"), $object, '', "class='$selected' data-app='{$this->app->openApp}'");
|
||||
$output .= html::a(inlink($methodName, "type=$type&objectID=$key"), $object, '', "class='$selected' title='$object' data-app='{$this->app->openApp}'");
|
||||
}
|
||||
}
|
||||
if($type == 'project' and $this->app->openApp == 'doc')
|
||||
if(in_array($type, array('project','execution')) and $this->app->openApp == 'doc')
|
||||
{
|
||||
$output .= <<<EOT
|
||||
</div>
|
||||
@@ -2069,7 +2070,7 @@ EOT;
|
||||
</div>
|
||||
</div>
|
||||
<div class='table-col col-right'>
|
||||
<div class='list-group'>$closedProjectsHtml</div>
|
||||
<div class='list-group'>$closedObjectsHtml</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user