Skip to content

CFM-274_Breadcrumbs_fixes_delete_action #172

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Fix breadcrumb bug for delete action
Ioannis committed Mar 12, 2024
commit cefe3df9a37852974be9b4fa462d2cdf5fe34b6c
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