mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 22:34:24 +02:00
Use EmptyState(Bar)
classes where applicable
This commit is contained in:
parent
13569a34b7
commit
821a6812ae
@ -11,7 +11,7 @@ use Icinga\Application\MigrationManager;
|
|||||||
use Icinga\Forms\MigrationForm;
|
use Icinga\Forms\MigrationForm;
|
||||||
use ipl\I18n\Translation;
|
use ipl\I18n\Translation;
|
||||||
use ipl\Web\Common\BaseItemList;
|
use ipl\Web\Common\BaseItemList;
|
||||||
use ipl\Web\Widget\EmptyState;
|
use ipl\Web\Widget\EmptyStateBar;
|
||||||
|
|
||||||
class MigrationList extends BaseItemList
|
class MigrationList extends BaseItemList
|
||||||
{
|
{
|
||||||
@ -127,7 +127,7 @@ class MigrationList extends BaseItemList
|
|||||||
|
|
||||||
if ($this->isEmpty()) {
|
if ($this->isEmpty()) {
|
||||||
$this->setTag('div');
|
$this->setTag('div');
|
||||||
$this->addHtml(new EmptyState(t('No items found.')));
|
$this->addHtml(new EmptyStateBar(t('No items found.')));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,6 +13,7 @@ use ipl\Html\HtmlString;
|
|||||||
use ipl\Html\Text;
|
use ipl\Html\Text;
|
||||||
use ipl\I18n\Translation;
|
use ipl\I18n\Translation;
|
||||||
use ipl\Web\Common\BaseListItem;
|
use ipl\Web\Common\BaseListItem;
|
||||||
|
use ipl\Web\Widget\EmptyState;
|
||||||
use ipl\Web\Widget\Icon;
|
use ipl\Web\Widget\Icon;
|
||||||
|
|
||||||
class MigrationListItem extends BaseListItem
|
class MigrationListItem extends BaseListItem
|
||||||
@ -67,8 +68,7 @@ class MigrationListItem extends BaseListItem
|
|||||||
if ($this->item->getDescription()) {
|
if ($this->item->getDescription()) {
|
||||||
$caption->addHtml(Text::create($this->item->getDescription()));
|
$caption->addHtml(Text::create($this->item->getDescription()));
|
||||||
} else {
|
} else {
|
||||||
$caption->getAttributes()->add('class', 'empty-state');
|
$caption->addHtml(new EmptyState(Text::create($this->translate('No description provided.'))));
|
||||||
$caption->addHtml(Text::create($this->translate('No description provided.')));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,6 +17,7 @@ use ipl\Html\Text;
|
|||||||
use ipl\I18n\Translation;
|
use ipl\I18n\Translation;
|
||||||
use ipl\Web\Common\BaseListItem;
|
use ipl\Web\Common\BaseListItem;
|
||||||
use ipl\Web\Url;
|
use ipl\Web\Url;
|
||||||
|
use ipl\Web\Widget\EmptyState;
|
||||||
use ipl\Web\Widget\Icon;
|
use ipl\Web\Widget\Icon;
|
||||||
use ipl\Web\Widget\Link;
|
use ipl\Web\Widget\Link;
|
||||||
use LogicException;
|
use LogicException;
|
||||||
@ -74,8 +75,7 @@ class MigrationListItemMinimal extends BaseListItem
|
|||||||
if ($migration->getDescription()) {
|
if ($migration->getDescription()) {
|
||||||
$caption->addHtml(Text::create($migration->getDescription()));
|
$caption->addHtml(Text::create($migration->getDescription()));
|
||||||
} else {
|
} else {
|
||||||
$caption->getAttributes()->add('class', 'empty-state');
|
$caption->addHtml(new EmptyState(Text::create($this->translate('No description provided.'))));
|
||||||
$caption->addHtml(Text::create($this->translate('No description provided.')));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$scriptPath = $migration->getScriptPath();
|
$scriptPath = $migration->getScriptPath();
|
||||||
|
@ -25,10 +25,6 @@
|
|||||||
color: @state-critical;
|
color: @state-critical;
|
||||||
}
|
}
|
||||||
|
|
||||||
.caption.empty-state {
|
|
||||||
color: @gray-semilight;
|
|
||||||
}
|
|
||||||
|
|
||||||
span.version {
|
span.version {
|
||||||
color: @text-color;
|
color: @text-color;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user