Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

ENHANCEMENT: SSF-168 adding breadcrumbs to ReportAdmin

  • Loading branch information...
commit 44e64344f05e76613f62a3eb12d61f6eecaaed20 1 parent b1e286c
@candidasa candidasa authored
Showing with 17 additions and 4 deletions.
  1. +17 −4 code/controllers/ReportAdmin.php
View
21 code/controllers/ReportAdmin.php
@@ -99,10 +99,23 @@ public function Reports() {
public static function has_reports() {
return sizeof(SS_Report::get_reports()) > 0;
}
-
- public function updatereport() {
- // FormResponse::load_form($this->EditForm()->forTemplate());
- // return FormResponse::respond();
+
+ /**
+ * Returns the Breadcrumbs for the ReportAdmin
+ * @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() {
Please sign in to comment.
Something went wrong with that request. Please try again.