⚠ 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

Add button/action in header



mephi
  • profile picture
  • Member

Posted 21 January 2013 - 11:08 AM

Hello guys,

I would like to add couple of buttons to the header (where Add, Export to Excel, Print) buttons are.

Is there any way to do such thing?

Reasons for needing these buttons are:
1. Add a "Back" to X controller/action link
2. Add Export to PDF action (for whole grid, not for grid rows as add_action)

Is this possible? and if so, how can I achieve that?

Thanks for helping!

goFrendiAsgard
  • profile picture
  • Member

Posted 21 January 2013 - 12:40 PM

It is possible by using javascript
Add this code to your view:

<script type="text/javascript">
$(document).ready(function(){
$('.tDiv3').append('<a id="my_button" href="#">new button</a>');
});
</script>

mephi
  • profile picture
  • Member

Posted 22 January 2013 - 07:37 AM

Thanks for the reply! I will try it out today.