Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PRESIDECMS-2990 Ensure related record table buildViewRecordLink includes the record #1557

Open
wants to merge 2 commits into
base: stable
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions system/handlers/admin/DataHelpers.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,6 @@ component extends="preside.system.base.adminHandler" {
} ]
} );

prc.viewRecordLink = event.buildAdminLink( objectName=relatedObject, recordId="{id}" );

runEvent(
event = "admin.DataManager._getObjectRecordsForAjaxDataTables"
, prePostExempt = true
Expand All @@ -233,11 +231,12 @@ component extends="preside.system.base.adminHandler" {
}

private string function relatedRecordTableActions( event, rc, prc, args={} ) {
if ( Len( Trim( prc.viewRecordLink ?: "" ) ) ) {
args.viewRecordLink = prc.viewRecordLink.replace( "{id}", ( args.id ?: "" ) );
if ( !isEmptyString( args.objectName ?: "" ) && !isEmptyString( args.id ?: "" ) ) {
args.viewRecordLink = event.buildAdminLink( objectName=args.objectName, recordId=args.id );

return renderView( view="/admin/dataHelpers/relatedRecordTableActions", args=args );
}

return "";
}

Expand Down
Loading