{% extends 'ndr_core/admin_views/base.html' %}

{% block content %}
    <h2><i class="fa-regular fa-question"></i> NDR Core Help</h2>
    <div class="card-deck">
    <div class="card bg-light mb-3">
            <div class="card-body">
                <h5 class="card-title">General</h5>
                <div class="list-group">
                    <a href="{% url 'ndr_core:help_chapter' 'about' %}" class="list-group-item small list-group-item-action py-2{% if "/help/about/" in request.path %} active{% endif %}">
                        About NDR Core
                    </a>
                    <a href="{% url 'ndr_core:help_chapter' 'pages' %}" class="list-group-item small list-group-item-action py-2{% if "/help/pages/" in request.path %} active{% endif %}">
                        NDR Core Pages
                    </a>
                    <a href="{% url 'ndr_core:help_chapter' 'settings' %}" class="list-group-item small list-group-item-action py-2{% if "/help/settings/" in request.path %} active{% endif %}">
                        Settings
                    </a>
                    <a href="{% url 'ndr_core:help_chapter' 'advanced' %}" class="list-group-item small list-group-item-action py-2{% if "/help/advanced/" in request.path %} active{% endif %}">
                        Advanced Editing
                    </a>
                </div>
            </div>
        </div>

        <div class="card bg-light mb-3">
            <div class="card-body">
                <h5 class="card-title">API & Search</h5>
                <div class="list-group">
                    <a href="{% url 'ndr_core:help_chapter' 'search' %}" class="list-group-item small list-group-item-action py-2{% if "/help/search/" in request.path %} active{% endif %}">
                        API & Search Configuration
                    </a>
                    <a href="{% url 'ndr_core:help_chapter' 'apis' %}" class="list-group-item small list-group-item-action py-2{% if "/help/apis/" in request.path %} active{% endif %}">
                        API Implementations
                    </a>
                    <a href="{% url 'ndr_core:help_chapter' 'results' %}" class="list-group-item small list-group-item-action py-2{% if "/help/results/" in request.path %} active{% endif %}">
                        Result Rendering
                    </a>
                    <a href="{% url 'ndr_core:help_chapter' 'test' %}" class="list-group-item small list-group-item-action py-2{% if "/help/test/" in request.path %} active{% endif %}">
                        Test Search
                    </a>
                </div>
            </div>
        </div>

        <div class="card bg-light mb-3">
            <div class="card-body">
                <h5 class="card-title">UI & Resources</h5>
                <div class="list-group">
                    <a href="{% url 'ndr_core:help_chapter' 'ui_style' %}" class="list-group-item small list-group-item-action py-2{% if "/help/ui_style/" in request.path %} active{% endif %}">
                        UI Style & Colors
                    </a>
                    <a href="{% url 'ndr_core:help_chapter' 'ui_elements' %}" class="list-group-item small list-group-item-action py-2{% if "/help/ui_elements/" in request.path %} active{% endif %}">
                        UI Elements
                    </a>
                    <a href="{% url 'ndr_core:help_chapter' 'images' %}" class="list-group-item small list-group-item-action py-2{% if "/help/images/" in request.path %} active{% endif %}">
                        Images
                    </a>
                    <a href="{% url 'ndr_core:help_chapter' 'files' %}" class="list-group-item small list-group-item-action py-2{% if "/help/files/" in request.path %} active{% endif %}">
                        Files
                    </a>
                    <a href="{% url 'ndr_core:help_chapter' 'translations' %}" class="list-group-item small list-group-item-action py-2{% if "/help/translations/" in request.path %} active{% endif %}">
                        Translations
                    </a>
                </div>
            </div>
        </div>

        <div class="card bg-light mb-3">
            <div class="card-body">
                <h5 class="card-title">Maintenance</h5>
                <div class="list-group">
                    <a href="{% url 'ndr_core:help_chapter' 'messages' %}" class="list-group-item small list-group-item-action py-2{% if "/help/messages/" in request.path %} active{% endif %}">
                        Your Inbox
                    </a>
                    <a href="{% url 'ndr_core:help_chapter' 'corrections' %}" class="list-group-item small list-group-item-action py-2{% if "/help/corrections/" in request.path %} active{% endif %}">
                        Corrections
                    </a>
                    <a href="{% url 'ndr_core:help_chapter' 'statistics' %}" class="list-group-item small list-group-item-action py-2{% if "/help/none/" in request.path %} active{% endif %}">
                        Search Statistics
                    </a>
                </div>
            </div>
        </div>
    </div>

    {% if chapter %}
        {% include 'ndr_core/admin_views/help/'|add:chapter|add:".html" %}
    {% else %}
        <div class="card-deck">
            <div class="card bg-light mb-3">
                <div class="card-body">
                    <h5 class="card-title">NDR Core Help</h5>
                    <p class="card-text">
                        Welcome to the NDR Core help pages. Choose a topic above.
                    </p>
                </div>
            </div>
        </div>
    {% endif %}


{% endblock %}