{% 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/chart.css" %}"/>
{% endblock %}

{% block content %}
<h1>LAVA Charts</h1>

{% if user_chart_table %}

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

{% render_table user_chart_table %}

{% else %}

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

{% endif %}

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


<h2>Other Charts</h2>

{% render_table other_chart_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 %}
