{% load tables %} {% if column.visible %} { field: "{{ column.field }}", title: "{{ column.name }}", width: {{ column.width }}, autoHide: "{{ column.auto_hide }}" == "True", sortable: "{{ column.sortable }}" == "True", textAlign: "{{ column.align|default:'left' }}", template: function (data, i) { console.log(data) {% if not column.is_action %} try{ return get_{{column.field}}_html(data); } catch(e) { return data.{{ column.field }}; } {% else %} let action = ""; {% for action in column.actions %} if(data.{{ action.identifier }}_show === true && data.{{ action.identifier }}_perm === true) { {% if not action.is_delete %} action += get_action_item({ url: data.{{ action.identifier }}_url, name: "{{ action.name }}", icon: "{{ action.icon }}", id: data.DT_RowId }); {% else %} action += get_delete_item({ name: "{{ action.name }}", url: data.{{ action.identifier }}_url, icon: "{{ action.icon }}", id: data.DT_RowId }) {% endif %} } {% endfor %} action = ``; return ``; {% endif %} } }, {% endif %}