Skip to content

Commit

Permalink
Merge pull request #3 from mdeveloper20/master
Browse files Browse the repository at this point in the history
fixed:send width of action column to View/Elements/table/grid_headers.ctp.
  • Loading branch information
zoghal committed Jun 11, 2014
2 parents 6b1a726 + 65fd911 commit c2cffe7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions View/Helper/GridHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,19 @@ function addColumn($title, $valuePath, array $options = array()){
* @author Robert Ross
*/
function addAction($name, array $url, array $trailingParams = array(), array $options = array()){

$this->__actions[$name] = array(
'url' => $url,
'trailingParams' => $trailingParams,
'options' => $options
);

if(!isset($this->__columns['actions'])){
$this->addColumn('Actions', null, array('type' => 'actions'));
if(isset($options['width'])) {
$this->addColumn('Actions', null, array('type' => 'actions','width'=>$options['width']));
} else {
$this->addColumn('Actions', null, array('type' => 'actions'));
}
}

return true;
Expand Down Expand Up @@ -456,4 +461,4 @@ private function _View() {



}
}

0 comments on commit c2cffe7

Please sign in to comment.