N°5905 - Harmonize how linksets are displayed part I

* Always display a table and its actions to ease link creation
* Display linkset description in an alert block
This commit is contained in:
Molkobain
2023-01-24 21:10:53 +01:00
parent 3775ccea74
commit a10ac7fdcb
6 changed files with 34 additions and 57 deletions

View File

@@ -9,7 +9,7 @@ namespace Combodo\iTop\Application\UI\Links;
use ApplicationException;
use ArchivedObjectException;
use AttributeLinkedSet;
use Combodo\iTop\Application\UI\Base\Component\MedallionIcon\MedallionIcon;
use Combodo\iTop\Application\UI\Base\Component\Alert\AlertUIBlockFactory;
use Combodo\iTop\Application\UI\Base\Layout\UIContentBlock;
use CoreException;
use CoreWarning;
@@ -121,10 +121,11 @@ abstract class AbstractBlockLinksViewTable extends UIContentBlock
*/
private function InitHeader()
{
// MedallionIcon
$oClassIcon = new MedallionIcon(MetaModel::GetClassIcon($this->sTargetClass, false));
$oClassIcon->SetDescription($this->oAttDef->GetDescription())->AddCSSClass('ibo-block-list--medallion');
$this->AddSubBlock($oClassIcon);
$sDescription = $this->oAttDef->GetDescription();
if (utils::IsNotNullOrEmptyString($sDescription)) {
$oAlert = AlertUIBlockFactory::MakeForInformation('', $sDescription);
$this->AddSubBlock($oAlert);
}
}
/**