Merge pull request #202 from assertchris/hide-current-parent-for-merge-options

Hide current parent for merge options
This commit is contained in:
Damian Mooyman 2015-04-23 17:12:43 +12:00
commit 0fd7f5fe8b
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ class GridFieldMergeAction implements GridField_ColumnProvider, GridField_Action
*/
public function getColumnContent($gridField, $record, $columnName) {
if($columnName === 'MergeAction') {
$dropdown = new DropdownField('Target', 'Target', $this->records->map());
$dropdown = new DropdownField('Target', 'Target', $this->records->exclude('ID', $record->ID)->map());
$prefix = strtolower($this->parentMethod . '-' . $this->childMethod);