Hi,
I would like to congratulate and thank you for such good CRUD.
I am been playing around with php/ci for a while and your library is the best one I have found and used it in a few of my projects.
I would like you to kindly advise me regarding adding a footer to the table.
My present project shows something like annual salary details of an employee and I need to show the total of whole year on bottom of the table.
I have made a few changes in the following files like:
In grocery_crud.php
at class declaration added
protected $footer = false;
at function showList added
$data->footer = $this->footer;
A new function is added in class
/**
* sets the footer in the list
*
* @return void
*/
public function footer($str="")
{
$this->footer = $str;
return $this;
}
added following lines in datatables theme file grocery_crud\themes\datatables\views\list.php
<?php if($footer)
echo $footer ?>
And used these lines to add the footer contents to the table by adding
$this->grocery_crud->footer($this->_gen_income_total_table());
the above function outputs similar to
<tfoot><tr><th></th></tr></tfoot>
This is working fine for me but I wish to know if this is the way to do it.
I also need some advise in how to handle bulky data in your crud.
Thanks again.
Regards.