{% extends "base.html" %}

{% block title %}OPeNDAP pydap: Index of {{ location }}{% endblock %}

{% block breadcrumbs %}
    <p>
        <span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
            <a itemprop="url" href="{{ root }}"><span itemprop="title">Home</span></a>
        </span>
        {% for crumb in breadcrumbs %}
        /<span itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
            <a itemprop="url" href="{{ crumb.url }}/"><span itemprop="title">{{ crumb.title }}</span></a>
        </span>
        {% endfor %}
    </p>
{% endblock %}
{% block content %}
<table>
    <thead>
        <tr>
            <th>Name</th>
            <th>Size</th>
            <th>Last modified</th>
            <th>DAP Response Links</th>
        </tr>
    </thead>

    <tbody>
        {% if breadcrumbs %}
        <tr>
            <td><a href="..">..</a></td>
            <td>&ndash;</td>
            <td>&ndash;</td>
            <td>&ndash;</td>
        </tr>
        {% endif %}
        {% for directory in directories %}
        <tr>
            <td><a href="{{ directory.name }}/">{{ directory.name }}/</a></td>
            <td>&ndash;</td>
            <td>{{ directory.last_modified|datetimeformat }}</td>
            <td>&ndash;</td>
        </tr>
        {% endfor %}
        {% for file in files %}
        <tr>
            {% if file.supported %}
            <td><a title="Inspect and filter data" href="{{ file.name }}.html">{{ file.name }}</a></td>
            {% elif file.name.endswith(".html") %}
            <td><a href="{{ file.name }}">{{ file.name }}</a>
            </td>
            {% else %}
            <td>{{ file.name }}</td>
            {% endif %}
            <td><a title="Download file" href="{{ file.name }}">{{ file.size|filesizeformat}}</a></td>
            <td>{{ file.last_modified|datetimeformat }}</td>
            {% if file.supported %}
            <td><a title="View the DDS response" href="{{ file.name }}.dds">dds</a> | <a title="View the DAS response" href="{{ file.name }}.das">das</a> | <a title="View the DMR response" href="{{ file.name }}.dmr">dmr</a></td>
            {% else %}
            <td>&ndash;</td>
            {% endif %}
        </tr>
        {% endfor %}
    </tbody>
</table>
</p>
<a href="{{ location }}catalog.xml" title="THREDDS Catalog XML">THREDDS Catalog XML</a>
{% endblock %}
