mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 23:32:17 +02:00
N°3566 Hub connector migrate to UiBlock : deployed extensions page
Change layout when no Hub extension present Use warning alert for the no extension message, split the corersponding dict key
This commit is contained in:
@@ -60,7 +60,6 @@ try {
|
||||
*/
|
||||
$oFieldsetRemote = FieldSetUIBlockFactory::MakeStandard(Dict::S('iTopHub:ExtensionCategory:Remote'));
|
||||
$oPage->AddUiBlock($oFieldsetRemote);
|
||||
$oFieldsetRemote->AddHtml(Dict::S('iTopHub:ExtensionCategory:Remote+'));
|
||||
|
||||
$aRemotelyDeployedExt = array_filter($oExtensionsMap->GetAllExtensions(), static function ($oExtension) {
|
||||
return ($oExtension->sSource === iTopExtension::SOURCE_REMOTE);
|
||||
@@ -68,8 +67,13 @@ try {
|
||||
$iRemotelyDeployedExtCount = count($aRemotelyDeployedExt);
|
||||
|
||||
if ($iRemotelyDeployedExtCount === 0) {
|
||||
$oFieldsetRemote->AddHtml('<p>'.Dict::S('iTopHub:NoExtensionInThisCategory').'</p>');
|
||||
$oFieldsetRemote->AddSubBlock(
|
||||
AlertUIBlockFactory::MakeForWarning(Dict::S('iTopHub:NoExtensionInThisCategory'), Dict::S('iTopHub:NoExtensionInThisCategory+'))
|
||||
->SetIsClosable(false)
|
||||
->SetIsCollapsible(false)
|
||||
);
|
||||
} else {
|
||||
$oFieldsetRemote->AddHtml('<p>'.Dict::S('iTopHub:ExtensionCategory:Remote+').'</p>');
|
||||
foreach ($aRemotelyDeployedExt as $oExtension) {
|
||||
$oFieldsetRemote->AddSubBlock(GetExtensionInfoComponent($oExtension));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user