N°2847 Add vertical tab options to object details

This commit is contained in:
Stephen Abello
2020-10-07 16:42:47 +02:00
parent 3adcee6da8
commit 7770cb31fb
6 changed files with 67 additions and 3 deletions

View File

@@ -20,6 +20,7 @@
namespace Combodo\iTop\Application\UI\Layout\TabContainer;
use appUserPreferences;
use Combodo\iTop\Application\UI\iUIBlock;
use Combodo\iTop\Application\UI\Layout\iUIContentBlock;
use Combodo\iTop\Application\UI\Layout\TabContainer\Tab\AjaxTab;
@@ -42,15 +43,23 @@ class TabContainer extends UIContentBlock
public const JS_FILES_REL_PATH = [
'js/layouts/tab-container.js'
];
/** @var string $sName */
private $sName;
/** @var string $sPrefix */
private $sPrefix;
/** @var string $sLayout */
private $sLayout;
/**
* TabContainer constructor.
*
* @param $sName
* @param $sPrefix
*
* @throws \CoreException
* @throws \CoreUnexpectedValue
* @throws \MySQLException
*/
public function __construct($sName, $sPrefix)
{
@@ -58,6 +67,7 @@ class TabContainer extends UIContentBlock
$this->sName = $sName;
$this->sPrefix = $sPrefix;
$this->sLayout = appUserPreferences::GetPref('tab_layout', 'horizontal');
}
/**
@@ -145,4 +155,12 @@ class TabContainer extends UIContentBlock
'aTabs' => $aTabs
];
}
/**
* @return string
*/
public function GetLayout(): string {
return $this->sLayout;
}
}