fix: [ui:migrateMetaFields] Fixed total number of items displayed
parent
27673b54c9
commit
03b6de68e1
|
@ -29,7 +29,7 @@ foreach ($entities as $entity) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if ($amountOfEntitiesToUpdate > 10) {
|
if ($amountOfEntitiesToUpdate > 10) {
|
||||||
$bodyHtml .= sprintf('<li class="list-inline-item fw-light fs-7">%s</li>', __('{0} more entities', h(10 - $amountOfEntitiesToUpdate)));
|
$bodyHtml .= sprintf('<li class="list-inline-item fw-light fs-7">%s</li>', __('{0} more entities', $amountOfEntitiesToUpdate - 10));
|
||||||
}
|
}
|
||||||
$bodyHtml .= '</ul>';
|
$bodyHtml .= '</ul>';
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ if (empty($conflictingEntities)) {
|
||||||
'dismissible' => false,
|
'dismissible' => false,
|
||||||
]);
|
]);
|
||||||
$bodyHtml .= '<ul>';
|
$bodyHtml .= '<ul>';
|
||||||
foreach ($conflictingEntities as $entity) {
|
foreach ($conflictingEntities as $i => $entity) {
|
||||||
$url = Router::url([
|
$url = Router::url([
|
||||||
'controller' => 'metaTemplates',
|
'controller' => 'metaTemplates',
|
||||||
'action' => 'migrateOldMetaTemplateToNewestVersionForEntity',
|
'action' => 'migrateOldMetaTemplateToNewestVersionForEntity',
|
||||||
|
@ -46,9 +46,10 @@ if (empty($conflictingEntities)) {
|
||||||
__('{0}::{1}', h(Inflector::humanize($oldMetaTemplate->scope)), $entity->id),
|
__('{0}::{1}', h(Inflector::humanize($oldMetaTemplate->scope)), $entity->id),
|
||||||
__('has {0} meta-fields to update', count($entity->meta_fields))
|
__('has {0} meta-fields to update', count($entity->meta_fields))
|
||||||
);
|
);
|
||||||
|
if ($i >= 9) {
|
||||||
|
$bodyHtml .= sprintf('<li class="list-inline-item fw-light fs-7">%s</li>', __('{0} more entities', count($conflictingEntities) - 10));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (count($conflictingEntities) > 10) {
|
|
||||||
$bodyHtml .= sprintf('<li class="list-inline-item fw-light fs-7">%s</li>', __('{0} more entities', h(10 - count($conflictingEntities))));
|
|
||||||
}
|
}
|
||||||
$bodyHtml .= '</ul>';
|
$bodyHtml .= '</ul>';
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue