Merge branch '3'

This commit is contained in:
Daniel Hensby 2016-07-18 13:02:20 +01:00
commit c876a21669
No known key found for this signature in database
GPG Key ID: B00D1E9767F0B06E
2 changed files with 6 additions and 11 deletions

View File

@ -159,10 +159,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
);
}
@ -264,10 +264,6 @@ class SS_Report extends ViewableData
{
$fields = new FieldList();
if($title = $this->title()) {
$fields->push(new LiteralField('ReportTitle', "<h3>{$title}</h3>"));
}
if($description = $this->description()) {
$fields->push(new LiteralField('ReportDescription', "<p>" . $description . "</p>"));
}
@ -316,7 +312,6 @@ class SS_Report extends ViewableData
$items = $this->sourceRecords($params, null, null);
$gridFieldConfig = GridFieldConfig::create()->addComponents(
new GridFieldToolbarHeader(),
new GridFieldSortableHeader(),
new GridFieldDataColumns(),
new GridFieldPaginator(),
@ -324,7 +319,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();

View File

@ -8,7 +8,7 @@ use SilverStripe\ORM\ArrayList;
*/
class ReportTest extends SapphireTest
{
protected $usesDatabase = true;
protected $usesDatabase = true;
public function testGetReports()
{