ENHANCMENT: Link pages in reports to cms edit

This commit is contained in:
Andrew O'Neil 2012-04-10 11:53:57 +12:00
parent 8df5cd74fc
commit 9888f980aa

View File

@ -170,6 +170,11 @@ class ReportAdmin extends LeftAndMain implements PermissionProvider {
if(isset($info['csvFormatting'])) $csvFieldFormatting[$source] = $info['csvFormatting']; if(isset($info['csvFormatting'])) $csvFieldFormatting[$source] = $info['csvFormatting'];
if(isset($info['casting'])) $fieldCasting[$source] = $info['casting']; if(isset($info['casting'])) $fieldCasting[$source] = $info['casting'];
if(isset($info['link']) && $info['link']) {
$link = singleton('CMSPageEditController')->Link('show');
$fieldFormatting[$source] = '<a href=\"' . $link . '/$ID\">$value</a>';
}
$displayFields[$source] = isset($info['title']) ? $info['title'] : $source; $displayFields[$source] = isset($info['title']) ? $info['title'] : $source;
} }
$gridField->setDisplayFields($displayFields); $gridField->setDisplayFields($displayFields);