Skip to content

Commit

Permalink
ENHANCEMENT SSF-53: put a unlink button in the "Actions" column rathe…
Browse files Browse the repository at this point in the history
…r than holding a separate column for easy styling
  • Loading branch information
normann committed Mar 4, 2012
1 parent b242bfb commit 79d52a2
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions forms/gridfield/GridFieldRelationDelete.php
Expand Up @@ -14,7 +14,8 @@ class GridFieldRelationDelete implements GridField_ColumnProvider, GridField_Act
* @param array $columns
*/
public function augmentColumns($gridField, &$columns) {
$columns[] = 'UnlinkRelation';
if(!in_array('Actions', $columns))
$columns[] = 'Actions';
}

/**
Expand All @@ -37,7 +38,7 @@ public function getColumnAttributes($gridField, $record, $columnName) {
* @return array
*/
public function getColumnMetadata($gridField, $columnName) {
if($columnName == 'UnlinkRelation') {
if($columnName == 'Actions') {
return array('title' => '');
}
}
Expand All @@ -49,7 +50,7 @@ public function getColumnMetadata($gridField, $columnName) {
* @return type
*/
public function getColumnsHandled($gridField) {
return array('UnlinkRelation');
return array('Actions');
}

/**
Expand Down

0 comments on commit 79d52a2

Please sign in to comment.