{% extends 'model_list.html' %}
{% block table_init %}
    <script type="text/javascript">
        function table_init_dict() {
            return {
                stateSave: true,
                "dom": 'lfrtp<"left"T>',
                "deferRender": true,
                /* hide pk column */
                "columnDefs": [
                    {
                        "targets": 0,
                        "visible": false,
                        "searchable": false
                    },
                    {
                        // specialized render for total dilution row
                        // format float into something with only a couple
                        // of decimal places
                        'targets': 5,
                        'render': function (data, type, row, meta) {
                            var trimmedFloat = parseFloat(data).toFixed(1);
                            if (isNaN(trimmedFloat))
                                return data;
                            else
                                return trimmedFloat;
                        }

                    }
                ]
            };

        }
    </script>
{% endblock table_init %}