{% extends 'core/wide.html' %}
{% load staticfiles %}
{% load compress %}
{% load i18n %}
{% load core_tags %}

{% block bodyargs %}ng-app="table" ng-controller="TableController"{% endblock %}

{% block headextra %}
    {% vendor 'angular' %}

    {% compress css %}
    <link rel="stylesheet" type="text/x-scss" href="{% static 'core/css/browser.scss' %}" />
    <link rel="stylesheet" type="text/x-scss" href="{% static 'core/css/table.scss' %}" />
    <link rel="stylesheet" type="text/x-scss" href="{% static 'serve/css/table.scss' %}" />
    {% endcompress css %}

    {% compress js %}
    <script type="text/javascript" src="{% static 'core/js/core.js' %}" ></script>
    <script type="text/javascript" src="{% static 'core/js/byNumber.js' %}" ></script>
    <script type="text/javascript" src="{% static 'core/js/table.js' %}" ></script>

    <script type="text/javascript" src="{% static 'serve/js/table.js' %}" ></script>
    {% endcompress js %}

    <script type="text/javascript" src="{% url 'javascript-catalog' %}"></script>
{% endblock %}

{% block wide %}

    <h1>{{ database }}.{{ table }}</h1>

    <div daiquiri-table
        data-rows-url="serve/api/rows/"
        data-columns-url="serve/api/columns/"
        data-files-url="files/api/files/"
        data-params="{database: '{{ database }}', table: '{{ table }}'}">
    </div>

{% endblock %}
