Permalink
Browse files

MINOR: SFF-106 Gridfield changes to make styling easier

  • Loading branch information...
1 parent 0ab43cd commit fce5487e59bc7f5bd612dc642ce88c144010dd74 @andrewandante andrewandante committed Mar 1, 2012
Showing with 5 additions and 7 deletions.
  1. +4 −6 forms/gridfield/GridFieldFilter.php
  2. +1 −1 forms/gridfield/GridFieldSortableHeader.php
@@ -72,19 +72,17 @@ public function getHTMLFragments($gridField) {
}
$field = new TextField('filter['.$columnField.']', '', $value);
$field->addExtraClass('ss-gridfield-sort');
- } else {
- $field = new LiteralField('', '');
- }
-
- if($columnField != 'Actions') {
+
$field = new FieldGroup(
$field,
$filterbutton = new GridField_Action($gridField, 'filter', _t('GridField.Filter', "Filter"), 'filter', null),
$resetbutton = new GridField_Action($gridField, 'reset', _t('GridField.ResetFilter', "Reset"), 'reset', null)
- );
+ );
$filterbutton->addExtraClass('ss-gridfield-button-filter');
$resetbutton->addExtraClass('ss-gridfield-button-reset');
+ } else {
+ $field = new LiteralField('', '');
}
$field->iteratorProperties($currentColumn-1, count($columns));
@@ -40,7 +40,7 @@ public function getHTMLFragments($gridField) {
$field->addExtraClass('ss-gridfield-sorted-desc');
}
} else {
- $field = new LiteralField($columnField, $title);
+ $field = new LiteralField($columnField, '<span class="non-sortable">' . $title . '</span>');
}
$forTemplate->Fields->push($field);
}

0 comments on commit fce5487

Please sign in to comment.