mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Merge remote-tracking branch 'origin/support/3.2' into develop
# Conflicts: # .doc/itop-version-history.md
This commit is contained in:
@@ -1686,19 +1686,16 @@ JS
|
||||
$aRes = CMDBSource::QueryToArray($sSql);
|
||||
$oContext = new ApplicationContext();
|
||||
$sContextParam = $oContext->GetForLink();
|
||||
/** @var AttributeDefinition $oGroupByAttDef */
|
||||
$oGroupByAttDef = $aGroupBy["grouped_by_1"]->GetAttDef();
|
||||
|
||||
$iTotalCount = 0;
|
||||
$aURLs = array();
|
||||
|
||||
foreach ($aRes as $iRow => $aRow) {
|
||||
$sValue = $aRow['grouped_by_1'];
|
||||
$sPlainTextValue = $oGroupByAttDef->GetValueLabel($sValue);
|
||||
$sHtmlValue = utils::EscapeHtml($sPlainTextValue);
|
||||
$sHtmlValue = $oGroupByExp->MakeValueLabel($this->m_oFilter, $sValue, $sValue);
|
||||
$iTotalCount += $aRow['_itop_count_'];
|
||||
$aValues[] = array(
|
||||
'label' => $sPlainTextValue,
|
||||
'label' => html_entity_decode(strip_tags($sHtmlValue), ENT_QUOTES, 'UTF-8'),
|
||||
'label_html' => $sHtmlValue,
|
||||
'value' => (float)$aRow[$sFctVar],
|
||||
);
|
||||
|
||||
@@ -52,12 +52,13 @@ class LoginTwigContext
|
||||
/**
|
||||
* Set the absolute path on disk of the folder containing the twig templates
|
||||
*
|
||||
* @param string $sPath absolute path of twig templates directory
|
||||
* @api
|
||||
*
|
||||
*@param string $sAbsPath Absolute path of twig templates directory
|
||||
*/
|
||||
public function SetLoaderPath($sPath)
|
||||
public function SetLoaderPath($sAbsPath)
|
||||
{
|
||||
$this->sTwigLoaderPath = $sPath;
|
||||
$this->sTwigLoaderPath = $sAbsPath;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -84,24 +85,27 @@ class LoginTwigContext
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the URL of a CSS file to link to the login screen
|
||||
* Add the absolute URL of a CSS file to link to the login screen
|
||||
*
|
||||
* @param string $sFile URL of the CSS file to link
|
||||
* @api
|
||||
*
|
||||
* @param string $sFileAbsURL Absolute URL of the CSS file to link
|
||||
*/
|
||||
public function AddCSSFile($sFile)
|
||||
public function AddCSSFile($sFileAbsURL)
|
||||
{
|
||||
$this->aCSSFiles[] = $sFile;
|
||||
$this->aCSSFiles[] = $sFileAbsURL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the URL of a javascript file to link to the login screen
|
||||
* @param string $sFile URL of the javascript file to link
|
||||
* Add the absolute URL of a javascript file to link to the login screen
|
||||
*
|
||||
* @api
|
||||
*
|
||||
* @param string $sFileAbsURL Absolute URL of the javascript file to link
|
||||
*/
|
||||
public function AddJsFile($sFile)
|
||||
public function AddJsFile($sFileAbsURL)
|
||||
{
|
||||
$this->aJsFiles[] = $sFile;
|
||||
$this->aJsFiles[] = $sFileAbsURL;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -133,7 +137,7 @@ class LoginTwigContext
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return array Absolute URLs of the CSS files
|
||||
*/
|
||||
public function GetCSSFiles()
|
||||
{
|
||||
@@ -141,7 +145,7 @@ class LoginTwigContext
|
||||
}
|
||||
|
||||
/**
|
||||
* @return array
|
||||
* @return array Absolute URLs of the JS files
|
||||
*/
|
||||
public function GetJsFiles()
|
||||
{
|
||||
@@ -274,12 +278,12 @@ class LoginTwigRenderer
|
||||
$aCSSFiles = $oFormData->GetCSSFiles();
|
||||
foreach ($aCSSFiles as $sCSSFile)
|
||||
{
|
||||
$oPage->add_linked_stylesheet($sCSSFile);
|
||||
$oPage->LinkStylesheetFromURI($sCSSFile);
|
||||
}
|
||||
$aJsFiles = $oFormData->GetJsFiles();
|
||||
foreach ($aJsFiles as $sJsFile)
|
||||
{
|
||||
$oPage->add_linked_script($sJsFile);
|
||||
$oPage->LinkScriptFromURI($sJsFile);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user