From 0bf70b90322a160503a7310b4fe3db7a6759426d Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Fri, 15 Oct 2010 02:33:58 +0000 Subject: [PATCH] BUGFIX: fixed select all link using incorrect function (from r105868) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/cms/trunk@112483 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- code/CommentAdmin.php | 5 ++++- templates/Includes/CommentTableField.ss | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/code/CommentAdmin.php b/code/CommentAdmin.php index ad7c0fa5..8027dc21 100644 --- a/code/CommentAdmin.php +++ b/code/CommentAdmin.php @@ -89,6 +89,7 @@ class CommentAdmin extends LeftAndMain { $idField = new HiddenField('ID', '', $section); $table = new CommentTableField($this, "Comments", "PageComment", $section, $tableFields, $popupFields, array($filter), 'Created DESC'); + $table->setParentClass(false); $table->setFieldCasting(array( 'Created' => 'SSDatetime->Full', @@ -96,7 +97,9 @@ class CommentAdmin extends LeftAndMain { )); $table->setPageSize(self::get_comments_per_page()); - + $table->addSelectOptions(array('all'=>'All', 'none'=>'None')); + $table->Markable = true; + $fields = new FieldSet( new LiteralField("Title", $title), $idField, diff --git a/templates/Includes/CommentTableField.ss b/templates/Includes/CommentTableField.ss index f7685f5a..3cecd72f 100644 --- a/templates/Includes/CommentTableField.ss +++ b/templates/Includes/CommentTableField.ss @@ -44,7 +44,7 @@ <% if Items %> <% control Items %> class="$HighlightClasses"<% end_if %>> - <% if Markable %>$MarkingCheckbox<% end_if %> + <% if Markable %>$MarkingCheckbox<% end_if %> <% control Fields %> $Value <% end_control %>