{% extends "layout/base.html" %}

{% block title -%}
    {{- explorer_instance_title or 'ODC' }} Metadata Types
{%- endblock %}

{% block head %}
    {{ super() }}
    <style>
        .panel.odd > h3 {
            margin-bottom: 10px;
        }
    </style>
{% endblock %}


{% block content %}
    <div class="panel highlight">
    <h2 class="followed lonesome">{{ datacube_metadata_types | count }} Metadata Types</h2>
        <div class="header-follow">
            <a href="{{ url_for('product.metadata_type_list_text') }}"
               class="badge header-badge">
                Text <i class="fa-solid fa-file-text" aria-hidden="true"></i>
            </a>
            <a href="{{ url_for('product.raw_all_metadata_types_doc') }}"
               class="badge header-badge">
                Yaml <i class="fa-solid fa-file-text" aria-hidden="true"></i>
            </a>
        </div>
        <table class="data-table">
            <thead>
                <tr class="section-header">
                    <th colspan="2" class="group-name">{{ group_name }}</th>
                </tr>
            </thead>
            <tbody>
                {% for metadata_type in datacube_metadata_types %}
                    <tr>
                        <td>
                            <a href="{{ url_for('product.metadata_type_page', name=metadata_type.name) }}">
                                {{ metadata_type.name }}
                            </a>
                        </td>
                        <td>{{ metadata_type.definition.description }}</td>
                    </tr>
                {% else %}
                    <tr><td>No metadata types</td></tr>
                {% endfor %}
            </tbody>
    </table>

    </div>
{% endblock %}
