mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 10:38:45 +02:00
Fix class icon being too big in displaybarerelations
This commit is contained in:
@@ -628,8 +628,11 @@ EOF
|
||||
{
|
||||
$sTargetClass = $sLinkedClass;
|
||||
}
|
||||
$oPage->p(MetaModel::GetClassIcon($sTargetClass)." ".$oAttDef->GetDescription().'<span id="busy_'.$sInputId.'"></span>');
|
||||
|
||||
$oClassIcon = new Combodo\iTop\Application\UI\Base\Component\MedallionIcon\MedallionIcon(MetaModel::GetClassIcon($sTargetClass, false));
|
||||
$oClassIcon->SetDescription($oAttDef->GetDescription())->AddCSSClass('ibo-blocklist--medallion');
|
||||
$oPage->AddUiBlock($oClassIcon);
|
||||
|
||||
$sDisplayValue = ''; // not used
|
||||
$sHTMLValue = "<span id=\"field_{$sInputId}\">".self::GetFormElementForField($oPage, $sClass, $sAttCode,
|
||||
$oAttDef, $oLinkSet, $sDisplayValue, $sInputId, '', $iFlags, $aArgs).'</span>';
|
||||
@@ -663,8 +666,7 @@ EOF
|
||||
'table_id' => $sClass.'_'.$sAttCode,
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
else {
|
||||
// n:n links
|
||||
$oLinkingAttDef = MetaModel::GetAttributeDef($sLinkedClass, $oAttDef->GetExtKeyToRemote());
|
||||
$sLinkingAttCode = $oLinkingAttDef->GetCode();
|
||||
@@ -678,8 +680,7 @@ EOF
|
||||
},
|
||||
$aLnkAttDefsToDisplay
|
||||
);
|
||||
if (!in_array(ormLinkSet::LINK_ALIAS.'.'.$sLinkingAttCode, $aLnkAttCodesToDisplay))
|
||||
{
|
||||
if (!in_array(ormLinkSet::LINK_ALIAS.'.'.$sLinkingAttCode, $aLnkAttCodesToDisplay)) {
|
||||
// we need to display a link to the remote class instance !
|
||||
$aLnkAttCodesToDisplay[] = ormLinkSet::LINK_ALIAS.'.'.$sLinkingAttCode;
|
||||
}
|
||||
@@ -706,7 +707,9 @@ EOF
|
||||
'extra_fields' => $sAttCodesToDisplay,
|
||||
);
|
||||
}
|
||||
$oPage->p(MetaModel::GetClassIcon($sTargetClass)." ".$oAttDef->GetDescription());
|
||||
$oClassIcon = new Combodo\iTop\Application\UI\Base\Component\MedallionIcon\MedallionIcon(MetaModel::GetClassIcon($sTargetClass, false));
|
||||
$oClassIcon->SetDescription($oAttDef->GetDescription())->AddCSSClass('ibo-blocklist--medallion');
|
||||
$oPage->AddUiBlock($oClassIcon);
|
||||
$oBlock = new DisplayBlock($oLinkSet->GetFilter(), 'list', false);
|
||||
$oBlock->Display($oPage, 'rel_'.$sAttCode, $aParams);
|
||||
}
|
||||
@@ -777,7 +780,10 @@ EOF
|
||||
|
||||
foreach($aNotificationClasses as $sNotifClass)
|
||||
{
|
||||
$oPage->p(MetaModel::GetClassIcon($sNotifClass, true).' '.MetaModel::GetName($sNotifClass));
|
||||
$oClassIcon = new Combodo\iTop\Application\UI\Base\Component\MedallionIcon\MedallionIcon(MetaModel::GetClassIcon($sTargetClass, false));
|
||||
$oClassIcon->SetDescription($oAttDef->GetDescription())->AddCSSClass('ibo-blocklist--medallion');
|
||||
$oPage->AddUiBlock($oClassIcon);
|
||||
|
||||
$oBlock = new DisplayBlock($aNotifSearches[$sNotifClass], 'list', false);
|
||||
$oBlock->Display($oPage, 'notifications_'.$sNotifClass, array('menu' => false));
|
||||
}
|
||||
|
||||
19
css/backoffice/application/_all.scss
Normal file
19
css/backoffice/application/_all.scss
Normal file
@@ -0,0 +1,19 @@
|
||||
/*!
|
||||
* Copyright (C) 2013-2020 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
@import "display-block/all";
|
||||
19
css/backoffice/application/display-block/_all.scss
Normal file
19
css/backoffice/application/display-block/_all.scss
Normal file
@@ -0,0 +1,19 @@
|
||||
/*!
|
||||
* Copyright (C) 2013-2020 Combodo SARL
|
||||
*
|
||||
* This file is part of iTop.
|
||||
*
|
||||
* iTop is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* iTop is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
*/
|
||||
|
||||
@import "block-list";
|
||||
13
css/backoffice/application/display-block/_block-list.scss
Normal file
13
css/backoffice/application/display-block/_block-list.scss
Normal file
@@ -0,0 +1,13 @@
|
||||
|
||||
.ibo-blocklist--empty-text, .ibo-blocklist--create-new{
|
||||
text-align: center;
|
||||
}
|
||||
.ibo-blocklist--medallion{
|
||||
|
||||
> .ibo-medallion--image{
|
||||
margin: 0 auto;
|
||||
}
|
||||
> .ibo-medallion-icon--description{
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
@@ -22,5 +22,6 @@
|
||||
@import "components/all";
|
||||
@import "layout/all";
|
||||
@import "pages/all";
|
||||
@import "application/all";
|
||||
@import "themes/all";
|
||||
@import "shame";
|
||||
|
||||
@@ -3,15 +3,15 @@
|
||||
{% apply spaceless %}
|
||||
|
||||
{% if oUIBlock.bEmptySet or oUIBlock.bNotAuthorized %}
|
||||
<p>{{ 'UI:NoObjectToDisplay'|dict_s }}</p>
|
||||
<div class="ibo-blocklist--empty-text">{{ 'UI:NoObjectToDisplay'|dict_s }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% if oUIBlock.bCreateNew %}
|
||||
<p>
|
||||
<div class="ibo-blocklist--create-new">
|
||||
<a{{ oUIBlock.sLinkTarget }} href="{{ oUIBlock.sAbsoluteUrlAppRoot }}pages/UI.php?operation=new&class={{ oUIBlock.sClass }}&{{ oUIBlock.sParams }}{{ oUIBlock.sDefault }}">
|
||||
{{ 'UI:ClickToCreateNew'|dict_format(oUIBlock.sClassLabel) }}
|
||||
</a>
|
||||
</p>
|
||||
</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% for oSubBlock in oUIBlock.GetSubBlocks() %}
|
||||
|
||||
Reference in New Issue
Block a user