{% include "header.html" %}
<nav aria-label="breadcrumb">
    <ol class="breadcrumb bg-light">
        <li class="breadcrumb-item active" aria-current="page"><a href="../?f=html">Home</a></li>
        <li class="ms-auto json-link"><a target="_blank" href="./?f=json">JSON</a></li>
    </ol>
</nav>
<h1>MapServer Mapfile Landing Page</h1>
<ul>
    <li><b>Title:</b> {{response.title}}</li>
    <li><b>Layer Count:</b> {{response.layer-count}}</li>
    <li><b>Map Name:</b> {{response.name}}</li>
</ul>
<p>
    Below are all the services available for this Mapfile.
</p>
<div class="table-responsive">
    <table class="table" style="width:100%;">
        <thead class="thead-light">
            <tr>
                <th>#</th>
                <th>Type</th>
                <th>Service</th>
                <th>Title</th>
            </tr>
        </thead>
        <tbody>
            {% set index = 1 -%}
            {% for link in response.linkset -%}
            {% if existsIn(link, "service-doc") -%}
            {% for service in link.service-doc -%}
            <tr>
                <td>{{ index }}</td>
                <td>{{ service.service }}</td>
                <td><a href="{{ service.href }}">{{ service.title }}</a></td>
                <td>{{ link.title }}</td>
            </tr>
            {% set index = index + 1 -%}
            {% endfor -%}
            {% endif -%}
            {% if existsIn(link, "service-desc") -%}
            {% for service in link.service-desc -%}
            <tr>
                <td>{{ index }}</td>
                <td>{{ service.service }}</td>
                <td><a href="{{ service.href }}">{{ service.title }}</a></td>
                <td>{{ link.title }}</td>
            </tr>
            {% set index = index + 1 -%}
            {% endfor -%}
            {% endif -%}
            {% endfor -%}
        </tbody>
    </table>
</div>
{% include "footer.html" -%}