Hide current parent for merge options

This commit is contained in:
Christopher Pitt 2015-04-23 16:47:54 +12:00
parent 5130ed4e28
commit 97498cc3f6

View File

@ -65,7 +65,7 @@ class GridFieldMergeAction implements GridField_ColumnProvider, GridField_Action
*/ */
public function getColumnContent($gridField, $record, $columnName) { public function getColumnContent($gridField, $record, $columnName) {
if($columnName === 'MergeAction') { 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); $prefix = strtolower($this->parentMethod . '-' . $this->childMethod);