Defferentiate migrations with no provided descriptions

This commit is contained in:
Yonas Habteab 2023-09-11 15:06:25 +02:00 committed by Johannes Meyer
parent d186604b62
commit fb33a2097a
3 changed files with 13 additions and 1 deletions

View File

@ -62,6 +62,9 @@ class MigrationListItem extends BaseListItem
{
if ($this->item->getDescription()) {
$caption->addHtml(Text::create($this->item->getDescription()));
} else {
$caption->getAttributes()->add('class', 'empty-state');
$caption->addHtml(Text::create($this->translate('No description provided.')));
}
}

View File

@ -71,7 +71,12 @@ class MigrationListItemMinimal extends BaseListItem
/** @var DbMigration $migration */
$migration = array_shift($migrations);
if ($migration->getLastState()) {
$caption->addHtml(Text::create($migration->getDescription()));
if ($migration->getDescription()) {
$caption->addHtml(Text::create($migration->getDescription()));
} else {
$caption->getAttributes()->add('class', 'empty-state');
$caption->addHtml(Text::create($this->translate('No description provided.')));
}
$wrapper = new HtmlElement(
'div',

View File

@ -18,6 +18,10 @@
.visual.upgrade-failed, span.upgrade-failed, .errors-section > i {
color: @state-critical;
}
.caption.empty-state {
color: @gray-semilight;
}
}
.migration-form {