mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
Merge branch '3'
This commit is contained in:
commit
c876a21669
@ -159,10 +159,10 @@ class SS_Report extends ViewableData
|
|||||||
public function getLink($action = null)
|
public function getLink($action = null)
|
||||||
{
|
{
|
||||||
return Controller::join_links(
|
return Controller::join_links(
|
||||||
'admin/reports/',
|
Config::inst()->get('AdminRootController', 'url_base'),
|
||||||
"$this->class",
|
Config::inst()->get('ReportAdmin', 'url_segment'),
|
||||||
'/', // trailing slash needed if $action is null!
|
get_class($this),
|
||||||
"$action"
|
$action
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -264,10 +264,6 @@ class SS_Report extends ViewableData
|
|||||||
{
|
{
|
||||||
$fields = new FieldList();
|
$fields = new FieldList();
|
||||||
|
|
||||||
if($title = $this->title()) {
|
|
||||||
$fields->push(new LiteralField('ReportTitle', "<h3>{$title}</h3>"));
|
|
||||||
}
|
|
||||||
|
|
||||||
if($description = $this->description()) {
|
if($description = $this->description()) {
|
||||||
$fields->push(new LiteralField('ReportDescription', "<p>" . $description . "</p>"));
|
$fields->push(new LiteralField('ReportDescription', "<p>" . $description . "</p>"));
|
||||||
}
|
}
|
||||||
@ -316,7 +312,6 @@ class SS_Report extends ViewableData
|
|||||||
$items = $this->sourceRecords($params, null, null);
|
$items = $this->sourceRecords($params, null, null);
|
||||||
|
|
||||||
$gridFieldConfig = GridFieldConfig::create()->addComponents(
|
$gridFieldConfig = GridFieldConfig::create()->addComponents(
|
||||||
new GridFieldToolbarHeader(),
|
|
||||||
new GridFieldSortableHeader(),
|
new GridFieldSortableHeader(),
|
||||||
new GridFieldDataColumns(),
|
new GridFieldDataColumns(),
|
||||||
new GridFieldPaginator(),
|
new GridFieldPaginator(),
|
||||||
@ -324,7 +319,7 @@ class SS_Report extends ViewableData
|
|||||||
new GridFieldPrintButton('buttons-after-left'),
|
new GridFieldPrintButton('buttons-after-left'),
|
||||||
new GridFieldExportButton('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');
|
$columns = $gridField->getConfig()->getComponentByType('GridFieldDataColumns');
|
||||||
$displayFields = array();
|
$displayFields = array();
|
||||||
$fieldCasting = array();
|
$fieldCasting = array();
|
||||||
|
Loading…
Reference in New Issue
Block a user