{# vim: set ts=2 et sts=2 sw=2: #}
{% extends "base.html" %}
{% set title = readout.title %}
{% set scripts = ('wiki',) %}
{% set styles = ('wiki',) %}
{% set crumbs = [(url(main_dash_view), main_dash_title), (None, title)] %}
{# TODO: Move required dashboard styles/scripts out of wiki.css into their own or refactor up? #}

{% block content %}
  <article class="main dashboards dashboards-detail">
    <h1>{{ readout.title }}</h1>
    <ul class="readout-modes" data-slug="{{ readout.slug }}">
      {% for key, name in readout.modes %}
        <li class="mode{% if loop.first %} active{% endif %}" data-url="{{ url('dashboards.wiki_rows', readout.slug)|urlparams(mode=key, locale=locale) }}">
          <a href="#">{{ name }}</a>
        </li>
      {% endfor %}
    </ul>

    <table class="documents" id="{{ readout.slug }}-table">
      {{ readout.render()|safe }}
    </table>
  </article>
{% endblock %}
