Skip to content
This repository
Browse code

ENHANCMENT: Link pages in reports to cms edit

  • Loading branch information...
commit 9888f980aae131599cea5a8afe6c3397ee29f55e 1 parent 8df5cd7
Andrew O'Neil authored April 10, 2012

Showing 1 changed file with 5 additions and 0 deletions. Show diff stats Hide diff stats

  1. 5  code/controllers/ReportAdmin.php
5  code/controllers/ReportAdmin.php
@@ -170,6 +170,11 @@ public function getEditForm($id = null, $fields = null) {
170 170
 				if(isset($info['csvFormatting'])) $csvFieldFormatting[$source] = $info['csvFormatting'];
171 171
 				if(isset($info['casting'])) $fieldCasting[$source] = $info['casting'];
172 172
 
  173
+				if(isset($info['link']) && $info['link']) {
  174
+					$link = singleton('CMSPageEditController')->Link('show');
  175
+					$fieldFormatting[$source] = '<a href=\"' . $link . '/$ID\">$value</a>';
  176
+				}
  177
+
173 178
 				$displayFields[$source] = isset($info['title']) ? $info['title'] : $source;
174 179
 			}
175 180
 			$gridField->setDisplayFields($displayFields);

0 notes on commit 9888f98

Please sign in to comment.
Something went wrong with that request. Please try again.