{% load custom_tags_and_filters %}
{% csrf_token %}
{% button type="save" submit=False value="Update" onclick="load_usage_data('"|concat:tool_id|concat:"');" icon="glyphicon-refresh" %}
{% if run_data_table.rows or pre_run_data_table.rows %}
{% button type="export" value="Export" onclick="load_usage_data('"|concat:tool_id|concat:"', 'pre-run');" %}
{% if pre_run_data_table.rows %} {% for header in pre_run_data_table.flat_headers %}{% endfor %} {% for row in pre_run_data_table.flat_rows %} {% for item in row %} {% endfor %} {% endfor %}
{{ header }}
{% if item|class_name == "list" %} {{ item|join:", " }} {% else %} {{ item|default_if_none:"" }} {% endif %}
{% else %} No pre-run data was found between these dates {% endif %}
{% button type="export" value="Export" onclick="load_usage_data('"|concat:tool_id|concat:"', 'run');" %}
{% if run_data_table.rows %} {% for header in run_data_table.flat_headers %}{% endfor %} {% for row in run_data_table.flat_rows %} {% for item in row %} {% endfor %} {% endfor %}
{{ header }}
{% if item|class_name == "list" %} {{ item|join:", " }} {% else %} {{ item|default_if_none:"" }} {% endif %}
{% else %} No run data was found between these dates {% endif %}
{% else %} No usage data was found between these dates {% endif %}