mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Fix link formatting
This commit is contained in:
parent
d2142f252e
commit
c54b8b5a6c
@ -343,8 +343,14 @@ class SS_Report extends ViewableData
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isset($info['link']) && $info['link']) {
|
if (isset($info['link']) && $info['link']) {
|
||||||
$link = singleton('CMSPageEditController')->Link('show');
|
$fieldFormatting[$source] = function($value, $item) {
|
||||||
$fieldFormatting[$source] = '<a class=\"grid-field__link-block\" href=\"' . $link . '/$ID\">$value</a>';
|
/** @var CMSPreviewable $item */
|
||||||
|
return sprintf(
|
||||||
|
'<a class="grid-field__link-block" href="%s">%s</a>',
|
||||||
|
Convert::raw2att($item->CMSEditLink()),
|
||||||
|
Convert::raw2xml($value)
|
||||||
|
);
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
$displayFields[$source] = isset($info['title']) ? $info['title'] : $source;
|
$displayFields[$source] = isset($info['title']) ? $info['title'] : $source;
|
||||||
|
Loading…
Reference in New Issue
Block a user