Skip to content

Commit

Permalink
[Admin] Templates - fix buttons style
Browse files Browse the repository at this point in the history
  • Loading branch information
ottaviano committed Sep 20, 2024
1 parent 4393393 commit 304029b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Admin/Email/TransactionalEmailTemplateAdmin.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ protected function configureListFields(ListMapper $list): void
{
$list
->add('id', null, ['label' => '#'])
->add('identifier', 'url', ['label' => 'Identifiant', 'route' => ['name' => 'admin_app_email_transactionalemailtemplate_content', 'identifier_parameter_name' => 'id']])
->add('messageClass', 'url', ['label' => 'Identifiant', 'route' => ['name' => 'admin_app_email_transactionalemailtemplate_content', 'identifier_parameter_name' => 'id']])
->add('subject', null, ['label' => 'Objet'])
->add('parent', 'url', ['label' => 'Parent', 'route' => ['name' => 'admin_app_email_transactionalemailtemplate_content', 'identifier_parameter_name' => 'id']])
->add('updatedAt', null, ['label' => 'Modifié le'])
Expand Down
7 changes: 7 additions & 0 deletions src/Entity/Email/TransactionalEmailTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,13 @@ public function __clone()
$this->identifier .= '-copy';
}

public function getMessageClass(): string
{
$parts = explode('\\', $this->identifier);

return end($parts);
}

public function updateFrom(UpdateTransactionalEmailTemplateCommand $command): void
{
$this->identifier = $command->identifier;
Expand Down
4 changes: 2 additions & 2 deletions templates/admin/email/list_preview.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
overflow: initial;
}
.table-responsive {
overflow-x: initial;
.sonata-ba-list-field-actions div.btn-group {
display: flex;
}
</style>
<div class="btn-group">
Expand Down

0 comments on commit 304029b

Please sign in to comment.