{% if pages is not empty %}
    {% if sc_multi %}
        <div class="alert alert-warning py-1" role="alert">
            <i class="fas fa-exclamation-triangle mr-2"></i> Dieser Shortcode wird auf einer Seite mehrfach verwendet. Dies kann zu Problemen beim Speichern führen.
        </div>
    {% endif %}
    <table class="table table-striped table-hover">
        <thead>
            <th scope="col">Post-ID</th>
            <th scope="col">Titel</th>
            <th scope="col">Post-Typ</th>
            <th scope="col">Vorkommen</th>
            <th scope="col">&nbsp;</th>
        </thead>
        <tbody>
            {% for page in pages %}
            <tr>
                <td class="align-middle">
                    {{page.id}}
                </td>
                <td class="align-middle">
                    <a href="{{page.url|raw}}"class="card-link"  title="{{page.title}}" target="_blank">
                        {{page.title}}
                    </a>
                </td>
                <td class="align-middle">
                    {{page.type}}
                </td>
                <td class="align-middle text-center">
                    {{page.count_sc}}
                    {% if page.count_sc > 1 %}
                        <i class="ml-2 fas fa-exclamation-triangle text-warning"></i>
                    {% endif %}
                </td>
                <td class="align-middle text-center">
                    <a href="{{page.edit_url|raw}}" target="_blank" class="btn btn-secondary btn-sm" title="{{post.title}} Bearbeiten">
                        <i class="fas fa-edit"></i>
                    </a>
                </td>
            </tr>
        {% endfor %}
        </tbody>
    </table>
{% else %}
<div class="d-flex">
    <div class="alert alert-info mb-0" role="alert">
        <h5><i class="fas fa-info-circle"></i>&nbsp;Hinweis</h5>
        <p>
            Dieses Formular wird momentan auf keiner Seite verwendet.
        </p>
    </div>
</div>
{% endif %}