This page requires java-script to be enabled. Please adjust your browser-settings.
export tables ...
Although this solution would work it is not very nice:
It causes too much additional code that has to be updated.
It's works indepent to the rendering of lists (ignores sorting, filtering, etc.)
There is no preview - the result might look different
I would prefer this approach:
On pages featuring one list only (e.g. projViewTasks, companyList, projectList etc.) add an "Export as CSV" link below the table. This link would use the same url as the page with the additional parameter "format=csv"
In renderPage(), renderList(), renderBlock() etc. evaluate this format
to check the format parameter and probably ignore the html rendering of columns and render public fields of each object in the list.
This would have following benefits:
You can use the html-interface to customize the exported list
This approach is open for other formats like RSS. XML etc.
It does not require additional code for each object type / list:
There only has to be a generic ListBlock::renderCSV() which is called by
For all lists that overwrite
(there are some) this function has to be called if appropriate. Maybe we should turn
into a wrapper function and place its old content into a new function `Block::renderListHtml()´
illustrates a similar behavior very well.