diff --git a/forms/gridfield/GridFieldFooter.php b/forms/gridfield/GridFieldFooter.php index 8ef3d9f5a..c8e0846b6 100644 --- a/forms/gridfield/GridFieldFooter.php +++ b/forms/gridfield/GridFieldFooter.php @@ -21,15 +21,17 @@ class GridFieldFooter implements GridField_HTMLProvider { * @var string - a message to display in the footer */ protected $message = null; + protected $showrecordcount; /** * * @param string $message - a message to display in the footer */ - public function __construct($message = null) { + public function __construct($message = null, $showrecordcount = true) { if($message) { $this->message = $message; } + $this->showrecordcount = $showrecordcount; } @@ -37,6 +39,7 @@ class GridFieldFooter implements GridField_HTMLProvider { $count = $gridField->getList()->count(); $forTemplate = new ArrayData(array( + 'ShowRecordCount' => $this->showrecordcount, 'Message' => $this->message, 'FirstShownRecord' => 1, 'LastShownRecord' => $count, diff --git a/templates/Includes/GridFieldFooter.ss b/templates/Includes/GridFieldFooter.ss index 16c1dd18f..b85a70bb8 100644 --- a/templates/Includes/GridFieldFooter.ss +++ b/templates/Includes/GridFieldFooter.ss @@ -1,12 +1,13 @@