Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix breadcrumb bug for delete action
Ioannis committed Mar 12, 2024
1 parent a541a50 commit cefe3df
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/src/Controller/Component/BreadcrumbComponent.php
@@ -241,8 +241,8 @@ public function injectPrimaryLink(object $link, bool $index=true, string $linkLa
$mappedRequestAction;

// We specifically need to check for the add action
if($mappedRequestAction == 'add') {
$breadcrumbAction = 'add';
if($mappedRequestAction == 'add' || $mappedRequestAction == 'delete') {
$breadcrumbAction = $mappedRequestAction;
}


3 changes: 2 additions & 1 deletion app/src/Lib/Util/StringUtilities.php
@@ -183,7 +183,8 @@ public static function entityAndActionToTitle($entity,
// The MVEA Models have a entityId. The one from the parent model.
// We need to have a condition for this and exclude it.
if($entity->id !== null
&& $action != 'add'
&& $action !== 'add'
&& $action !== 'delete'
&& method_exists($linkTable, 'generateDisplayField')) {
// We don't use a trait for this since each table will implement different logic

0 comments on commit cefe3df

Please sign in to comment.