{% extends "layouts/content.html" %}
{% load django_tables2 %}
{% load i18n %}
{% load static %}

{% block styles %}
<link rel="stylesheet" type="text/css" href="{% static "lava_results_app/css/query.css" %}"/>
{% endblock %}

{% block content %}
<h1>LAVA Results Queries</h1>

{% if user_query_table %}

<h2>My Queries <small><a href="{% url 'lava.results.query_add' %}" class="btn btn-xs btn-info"><span
        class="glyphicon glyphicon-plus-sign"></span> Create</a></small></h2>

{% render_table user_query_table %}

{% else %}

<p>Please log in to see and manage your queries.</p>

{% endif %}

{% for name, group_table in group_tables.items %}
  <h2 id="{{ name }}">{{ name }}</h2>
  {% render_table group_table %}
{% endfor %}


<h2>Other Queries</h2>

{% render_table other_query_table %}

{% endblock %}

{% block scripts %}
<script src="{% static "lava_scheduler_app/js/tables.js" %}"></script>
<script src="{% static "lava_server/js/bootbox.js" %}"></script>
<script src="{% static "lava_results_app/js/bootbox.data.toggle.js" %}"></script>
<script>
$(document).ready(function () {
  add_bootbox_data_toggle();
});
</script>
{% endblock %}
