mirror of
https://github.com/silverstripe/silverstripe-reports
synced 2024-10-22 11:05:53 +02:00
ENHANCEMENT: SSF-168 adding breadcrumbs to ReportAdmin
This commit is contained in:
parent
b1e286cb23
commit
44e64344f0
@ -99,10 +99,23 @@ class ReportAdmin extends LeftAndMain implements PermissionProvider {
|
|||||||
public static function has_reports() {
|
public static function has_reports() {
|
||||||
return sizeof(SS_Report::get_reports()) > 0;
|
return sizeof(SS_Report::get_reports()) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updatereport() {
|
/**
|
||||||
// FormResponse::load_form($this->EditForm()->forTemplate());
|
* Returns the Breadcrumbs for the ReportAdmin
|
||||||
// return FormResponse::respond();
|
* @return ArrayList
|
||||||
|
*/
|
||||||
|
public function Breadcrumbs() {
|
||||||
|
$items = parent::Breadcrumbs();
|
||||||
|
|
||||||
|
if ($this->reportObject) {
|
||||||
|
//build breadcrumb trail to the current report
|
||||||
|
$items->push(new ArrayData(array(
|
||||||
|
'Title' => $this->reportObject->title(),
|
||||||
|
'Link' => Controller::join_links($this->Link(), '?' . http_build_query(array('q' => $this->request->requestVar('q'))))
|
||||||
|
)));
|
||||||
|
}
|
||||||
|
|
||||||
|
return $items;
|
||||||
}
|
}
|
||||||
|
|
||||||
function providePermissions() {
|
function providePermissions() {
|
||||||
|
Loading…
Reference in New Issue
Block a user