{{ catalog.render_assets() }} {% set columns = [ {'name':'id', 'data':'id', 'title': 'ID'}, {'name':'name', 'data':'name', 'title': 'Name'}, {'name':'email', 'data':'email', 'title': 'Email'}, {'name':'age', 'data':'age', 'title': 'Age'}, ]%} {% set csv_button = {'text': 'Download Csv', 'extend': 'csv'} %} {% set xsl_button = {'text': 'Download Excel', 'extend': 'excel'} %} {% set pdf_button = {'text': 'Download PDF', 'extend': 'pdf', 'orientation':'landscape' } %} {% set export_button = {'text': 'Export', 'extend': 'collection', 'align':'button-right', 'autoClose':True, 'background': False, 'popoverTitle': 'Export', 'buttons': [ csv_button, xsl_button, pdf_button], 'className':'test-export-menu' } %} {% set age_20 = {'text': 'Age 20-29', 'extend': 'filter', 'column': 'age:name', 'search':'2[0-9]', 'regex': True, 'className':'test-filter-age-20'} %} {% set age_30 = {'text': 'Age 30-39', 'extend': 'filter', 'column': 'age:name', 'search':'3[0-9]', 'regex': True, 'className':'test-filter-age-30'} %} {% set age_40 = {'text': 'Age 40-49', 'extend': 'filter', 'column': 'age:name', 'search':'4[0-9]', 'regex': True, 'className':'test-filter-age-40'} %} {% set collection_filter = {'text': 'Age' , 'extend': 'collectionfilter', 'popoverTitle': 'Age', 'buttons': [age_20, age_30, age_40], 'column': 'age:name', 'className':'test-filter-menu' } %} {% set buttons = [ collection_filter, export_button, {'text': "Reset" , 'extend': 'reset'}, ] %} {% set layout = { 'top': 'buttons', } %}