ENHANCEMENT: SSF-168 adding breadcrumbs to ReportAdmin

This commit is contained in:
Julian Seidenberg 2012-04-05 13:19:17 +12:00
parent b1e286cb23
commit 44e64344f0

View File

@ -100,9 +100,22 @@ class ReportAdmin extends LeftAndMain implements PermissionProvider {
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() {