{% extends "tx_highered/app_base.html" %}
{% load layout_helpers humanize instachart cheat %}


{% block head_title %}The Top 10 Percent Rule{% endblock %}
{% block page_title %}Top 10% Rule{% endblock %}


{% block main %}
  <table class="table">
    <thead>
      <tr>
        <th>Year</th>
        {% for object in object_list %}
          <th data-tablebars=1><a href="{{ object.get_absolute_url }}">{{ object.name }}</a></th>
        {% endfor %}
      </tr>
    </thead>
    <tbody>
      {% for year in year_range %}
        <tr>
          <td>{{ year }}</td>
          {% for object in object_list %}
            <td>{{ object.data|keyvalue:year }}%</td>
          {% endfor %}
        </tr>
      {% endfor %}
    </tbody>
  </table>
{% endblock %}


{% block extra_script %}{{ block.super }}
<script>
$(window).load(function(){
  $('table').tablebars();
});
</script>
{% endblock %}
