From f04975c64efaaa4cd8e42e3193730700f3d2b551 Mon Sep 17 00:00:00 2001 From: Paul Clarke Date: Mon, 11 Jul 2016 18:02:25 +1200 Subject: [PATCH] Remove additional title and move actions to top --- code/Report.php | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/code/Report.php b/code/Report.php index b922d960..1e48a221 100644 --- a/code/Report.php +++ b/code/Report.php @@ -312,12 +312,14 @@ class SS_Report extends ViewableData $items = $this->sourceRecords($params, null, null); $gridFieldConfig = GridFieldConfig::create()->addComponents( + + new GridFieldButtonRow('before'), + new GridFieldPrintButton('buttons-before-left'), + new GridFieldExportButton('buttons-before-left'), + new GridFieldToolbarHeader(), new GridFieldSortableHeader(), new GridFieldDataColumns(), - new GridFieldPaginator(), - new GridFieldButtonRow('after'), - new GridFieldPrintButton('buttons-after-left'), - new GridFieldExportButton('buttons-after-left') + new GridFieldPaginator() ); $gridField = new GridField('Report',null, $items, $gridFieldConfig); $columns = $gridField->getConfig()->getComponentByType('GridFieldDataColumns'); @@ -343,7 +345,7 @@ class SS_Report extends ViewableData if(isset($info['link']) && $info['link']) { $link = singleton('CMSPageEditController')->Link('show'); - $fieldFormatting[$source] = '$value'; + $fieldFormatting[$source] = '$value'; } $displayFields[$source] = isset($info['title']) ? $info['title'] : $source;