⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

setActionButton not working -> GroceryCrud Enterprise v2.8.7



aserfozo

aserfozo
  • profile picture
  • Member

Posted 02 January 2021 - 03:14 AM

Hello

 

I have been working in a new project and using GC Enterprise. The issue that has arisen is that the setActionButton function does not render a button. I am using the given example from the online documentation as is but there is not Avatar button showing after a browser cache clear  and page refresh. The table works flawlessly otherwise. 

 

The code used is directly copied from the example as: $crud->setActionButton('Avatar', 'fa fa-user', function ($row) { return '/view_avatar/' . $row->url; }, true);

 

The only thing I get on the page in the table rows is the edit, more -> view, delete buttons. 

 

complete code is as follows in Codeigniter class

 

$crud = $this->engineModel->getGCE('app');
$crud->setActionButton('Avatar', 'fa fa-user', function ($row) { return '/demo_view_avatar/' . $row->employeeNumber;}, true);
$crud->setApiUrlPath('getInventory');
 
$output = $crud->render();

$this->loadGcView($outputt);

 

using bootstrap v4 theme

 

 

Can anyone help with this please?

Thank You

Andras


aserfozo

aserfozo
  • profile picture
  • Member

Posted 04 January 2021 - 01:38 AM

Issue resolved. I was adding the button to the incorrect class.. All is working as normal.