{% set current_theme = current_theme() %} {% import "learning/resources/type_macros.html" as r_macros %} {% set
permitir_docente = docente_asignado(id_curso=curso.codigo) %} {% set permitir_moderador =
moderador_asignado(id_curso=curso.codigo) %} {% set permitir_estudiante = estudiante_asignado(id_curso=curso.codigo) %} {% set
permitir_editar = current_user.tipo == "admin" or permitir_docente %}

<!doctype html>
<html lang="{{ current_locale() }}" class="h-100">
    <head>
        {{ current_theme.headertags() }}
        <title>{{ curso.codigo | upper }} - {{ curso.nombre | title }}</title>

        {{ current_theme.local_style() }}
    </head>

    <body>
        {{ current_theme.navbar() }}

        <main>
            {{ current_theme.notify() }}

            <div class="container px-0 py-3" id="icon-grid">
                <h4 class="pb-2 border-bottom">
                    <nav aria-label="breadcrumb">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item">
                                <a class="text-reset text-decoration-none link-dark" href="{{ url_for('home.panel') }}"
                                    >{{ _("Inicio") }}</a
                                >
                            </li>
                            <li class="breadcrumb-item">
                                <a
                                    class="text-reset text-decoration-none link-dark"
                                    href="{{ url_for('course.curso', course_code=curso.codigo) }}"
                                    >{{ curso.nombre }}</a
                                >
                            </li>
                            <li class="breadcrumb-item">Seleccione un recurso.</li>
                        </ol>
                    </nav>
                </h4>

                <div class="row">
                    <div class="col-sm-8">
                        <ul class="list-group list-group-flush">
                            {% for recurso in recursos %}{% if recurso.requerido == 3 or recurso.requerido == "3" or
                            recurso.requerido == "substitute" %}
                            <li class="list-group-item">
                                <div class="d-flex justify-content-between">
                                    <a
                                        class="link-dark"
                                        href="{{ url_for('course.pagina_recurso', curso_id=recurso.curso, resource_type=recurso.tipo, codigo=recurso.id) }} "
                                    >
                                        <div class="fw-bold">
                                            <i class="{{ iconos_recursos[recurso.tipo] }}" aria-hidden="true"></i> {{
                                            recurso.nombre }}
                                        </div>
                                    </a>
                                </div>
                            </li>
                            {% endif %}{% endfor %}
                        </ul>

                        <!-- AdSense Ad after resource list for free courses -->
                        {% if adsense_enabled() and not curso.pagado %} {% set ad_code = ad_large_rectangle() %} {% if ad_code
                        %}
                        <div class="mt-4 mb-4" style="text-align: center">
                            <small class="text-muted">Publicidad</small>
                            {{ ad_code | safe }}}
                        </div>
                        {% endif %} {% endif %}
                    </div>

                    <div class="col-sm-4">
                        {{ r_macros.resource_nav(recursos=recursos, secciones=secciones, user_progress=user_progress,
                        evaluaciones=evaluaciones, evaluation_attempts=evaluation_attempts) }}
                    </div>
                </div>
            </div>
        </main>
    </body>
</html>
