sonata-project/SonataAdminBundle — pull request #2467 by JDruery (2014-10-03 13:37:41+00:00)
Title: Update base_list.html.twig

The additional blocks will allow adding attributes and additional classes to

and	tags without needed to make a copy the whole view. I'm interested in this because I'd like to use the FooTable.js library, which uses data attributes to set the auto-show/hide for each column (for responsive tables).

If it's of interest, I could create a pull request with the templating code that I'm adding into the	tags. It allows the attributes on the tag to be set per field by specifying as an option within the Admin class. I.e., 'th_attributes' => array('name' => 'value', ...)

Here's the additional code that could be included within the	tag: {% if field_description.options.th_attributes is defined %}{% for th_attribute, th_attribute_value in field_description.options.th_attributes %}{{ th_attribute }}={{th_attribute_value}}{% endfor %}{% endif %}