I'm trying to add a custom action using the following code:
$crud->add_action('Vorschau', '', 'banner/preview');
However, for some reason the added Action does not show up.
What did I do wrong?
⚠ 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. ⚠
Posted 17 August 2012 - 09:08 AM
$crud->add_action('Vorschau', '', 'banner/preview');
Posted 17 August 2012 - 09:58 AM
$crud->add_action('Vorschau', '/images/preview.png', 'banner/preview');
Posted 17 August 2012 - 12:01 PM
Posted 17 August 2012 - 12:15 PM
$crud->add_action('Vorschau', site_url('/assets/images/preview.png', 'banner/preview'));
Posted 18 August 2012 - 08:55 AM
$crud->add_action('Vorschau', site_url('/assets/images/preview.png', 'banner/preview'));
$crud->add_action('Vorschau', site_url('/assets/images/preview.png'), 'banner/preview');
$crud->add_action('Vorschau', base_url('/assets/images/preview.png'), 'banner/preview');
Posted 20 August 2012 - 11:31 AM
Posted 20 August 2012 - 18:16 PM
Posted 29 October 2013 - 19:48 PM
If you are using the default flexigrid theme you have to use an image as the second parameter to make it work. For example:
$crud->add_action('Vorschau', '/images/preview.png', 'banner/preview');The examples at the website without a second parameter I think is only for datatables theme but not sure about it.
Tried the above. It does not work. Here's what flexigrid creates for delete button:
<a href='http://localhost/codeigniter/administer/people/delete/02' title='Delete Student' class="delete-row" ><span class='delete-icon'></span></a>
Note the SPAN tag above where the flexigrid class is called where the image is called as a background image (what a convoluted way to do this). I see no way to replicate that using add_action. Has anyone successfully does this recently?
Thanks.
Posted 30 October 2013 - 22:33 PM
welll.. u can do it - in the assets/grocery_crud/themes/flexigrid/views/list.php
there is the code to add extra buttons in for the action. You can customize it - i did it for my own :)
Else other way around - add a column and make a column callback and create a button of your own choice / taste :)
Happy GCIng