From b63600c392022bb8175b5d010acc319073735585 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 10 May 2016 22:24:40 +1200 Subject: [PATCH 1/4] Remove triple report titles --- code/Report.php | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/code/Report.php b/code/Report.php index 79995047..184291cc 100644 --- a/code/Report.php +++ b/code/Report.php @@ -219,10 +219,6 @@ class SS_Report extends ViewableData { */ public function getCMSFields() { $fields = new FieldList(); - - if($title = $this->title()) { - $fields->push(new LiteralField('ReportTitle', "

{$title}

")); - } if($description = $this->description()) { $fields->push(new LiteralField('ReportDescription', "

" . $description . "

")); @@ -270,7 +266,6 @@ class SS_Report extends ViewableData { $items = $this->sourceRecords($params, null, null); $gridFieldConfig = GridFieldConfig::create()->addComponents( - new GridFieldToolbarHeader(), new GridFieldSortableHeader(), new GridFieldDataColumns(), new GridFieldPaginator(), @@ -278,7 +273,7 @@ class SS_Report extends ViewableData { new GridFieldPrintButton('buttons-after-left'), new GridFieldExportButton('buttons-after-left') ); - $gridField = new GridField('Report',$this->title(), $items, $gridFieldConfig); + $gridField = new GridField('Report',null, $items, $gridFieldConfig); $columns = $gridField->getConfig()->getComponentByType('GridFieldDataColumns'); $displayFields = array(); $fieldCasting = array(); From 68d9533542ad59f0f6717cc28275ae4e5c1c1ecd Mon Sep 17 00:00:00 2001 From: Damian Mooyman Date: Thu, 19 May 2016 16:14:08 +1200 Subject: [PATCH 2/4] Alias 3 as 3.5 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 90d5a3f9..f585dfce 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ }, "extra": { "branch-alias": { - "3.x-dev": "3.4.x-dev" + "3.x-dev": "3.5.x-dev" } }, "require-dev": { From 68c40402999894d267e49674585913be1e913458 Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Thu, 9 Jun 2016 13:40:29 +0100 Subject: [PATCH 3/4] FIX No longer hardcoding admin links --- code/Report.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/code/Report.php b/code/Report.php index 184291cc..56e8561e 100644 --- a/code/Report.php +++ b/code/Report.php @@ -144,10 +144,10 @@ class SS_Report extends ViewableData { public function getLink($action = null) { return Controller::join_links( - 'admin/reports/', - "$this->class", - '/', // trailing slash needed if $action is null! - "$action" + Config::inst()->get('AdminRootController', 'url_base'), + Config::inst()->get('ReportAdmin', 'url_segment'), + get_class($this), + $action ); } From 3bb32eb013d5d12a1ba39e934181b92e75e38eab Mon Sep 17 00:00:00 2001 From: Daniel Hensby Date: Thu, 9 Jun 2016 14:25:01 +0100 Subject: [PATCH 4/4] FIX Tests need the DB --- tests/ReportTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/ReportTest.php b/tests/ReportTest.php index 2df30585..9193e604 100644 --- a/tests/ReportTest.php +++ b/tests/ReportTest.php @@ -6,6 +6,8 @@ */ class ReportTest extends SapphireTest { + protected $usesDatabase = true; + public function testGetReports() { $reports = SS_Report::get_reports(); $this->assertNotNull($reports, "Reports returned");