<div class="row">
    <div class="col-lg-12 table-responsive">
        <table class="table table-condensed table-bordered table-sobre table-utm small">
            <thead>
                <tr style="background-color: cadetblue;color: white;">
                    <th class="text-center" style="border: solid 1px cadetblue;">N.P.</th>
                    <th class="text-center" style="border: solid 1px cadetblue;">MATRICULA</th>
                    <th class="text-center" style="border: solid 1px cadetblue;">ALUMNO</th>
                    <th class="text-center" style="border: solid 1px cadetblue;">GRUPO</th>
                    <th colspan="50" style="border: solid 1px cadetblue;">CALIFICACIONES</th>
                </tr>
            </thead>
            <tbody>
                {% for d in datos %}
                    <tr>
                        <td class="text-right" style="border: solid 1px cadetblue;">{{ loop.index }}</td>
                        {% if d[0].cveAlu.estatus.ideEst == 1 %}
                            {# ALUMNO ACTIVO #}
                            <td class="text-center" style="border: solid 1px cadetblue;background-color: green;">
                                <a href="{{path('consulta_alumno_dos', {ideAlu: d[0].cveAlu.ideAlu} )}}" target="_blank" style="color: black;font-weight: bolder;">{{d[0].cveAlu.cveCtl}}</a>
                            </td>
                        {% elseif d[0].cveAlu.estatus.ideEst == 6 %}
                            {# ALUMNO BAJA DEFINITIVA #}
                            <td class="text-center" style="border: solid 1px cadetblue;background-color: red;">
                                <a href="{{path('consulta_alumno_dos', {ideAlu: d[0].cveAlu.ideAlu} )}}" target="_blank" style="color: black;font-weight: bolder;">{{d[0].cveAlu.cveCtl}}</a>
                            </td>
                        {% elseif d[0].cveAlu.estatus.ideEst == 9 %}
                            {# ALUMNO PENDIENTE #}
                            <td class="text-center" style="border: solid 1px cadetblue;background-color: yellow;">
                                <a href="{{path('consulta_alumno_dos', {ideAlu: d[0].cveAlu.ideAlu} )}}" target="_blank" style="color: black;font-weight: bolder;">{{d[0].cveAlu.cveCtl}}</a>
                            </td>
                        {% elseif d[0].cveAlu.estatus.ideEst == 10 %}
                            {# ALUMNO BAJA TEMPORAL #}
                            <td class="text-center" style="border: solid 1px cadetblue;background-color: orange;">
                                <a href="{{path('consulta_alumno_dos', {ideAlu: d[0].cveAlu.ideAlu} )}}" target="_blank" style="color: black;font-weight: bolder;">{{d[0].cveAlu.cveCtl}}</a>
                            </td>
                        {% elseif d[0].cveAlu.estatus.ideEst == 11 %}
                            {# ALUMNO SIN REINSCRIPCIÓN #}
                            <td class="text-center" style="border: solid 1px cadetblue;background-color: purple;">
                                <a href="{{path('consulta_alumno_dos', {ideAlu: d[0].cveAlu.ideAlu} )}}" target="_blank" style="color: black;font-weight: bolder;">{{d[0].cveAlu.cveCtl}}</a>
                            </td>
                        {% elseif d[0].cveAlu.estatus.ideEst == 12 %}
                            {# ALUMNO EGRESADO #}
                            <td class="text-center" style="border: solid 1px cadetblue;background-color: lightgoldenrodyellow;">
                                <a href="{{path('consulta_alumno_dos', {ideAlu: d[0].cveAlu.ideAlu} )}}" target="_blank" style="color: black;font-weight: bolder;">{{d[0].cveAlu.cveCtl}}</a>
                            </td>

                        {% elseif d[0].cveAlu.estatus.ideEst == 14 %}
                            {# ALUMNO PREINSCRITO #}
                            <td class="text-center" style="border: solid 1px cadetblue;background-color: gray;">
                                <a href="{{path('consulta_alumno_dos', {ideAlu: d[0].cveAlu.ideAlu} )}}" target="_blank" style="color: black;font-weight: bolder;">{{d[0].cveAlu.cveCtl}}</a>
                            </td>
                        {% endif %}

                        <td class="text-left" style="border: solid 1px cadetblue;">{{ d[0].cveAlu.apePat }} {{ d[0].cveAlu.apeMat }} {{ d[0].cveAlu.nomAlu }}</td>
                        <td class="text-left" style="border: solid 1px cadetblue;">{{ d[0].cveGru.grupo }}</td>
                        {% set numPeriodo = "" %}
                        {% for key, c in d[1] %}
                            {% if numPeriodo == c.periodo %}
                            {% else %}
                                {% set numPeriodo = c.periodo %}
                                <td class="text-center" style="vertical-align: middle;border: solid 1px cadetblue;color: #000;background-color: #C0C0C0;">
                                    <i><b>{{ c.periodo }}</b></i>
                                </td>
                            {% endif %}

                            <td class="text-center" style="vertical-align: middle;border: solid 1px cadetblue;">
                                {% if c.indicador == "O" %}
                                    <b style="color: blue;">{{ c.calFinal }}</b>
                                {% elseif c.indicador == "E" %}
                                    <b style="color: orange;">{{ c.calFinal }}</b>
                                {% elseif c.indicador == "T" %}
                                    <b style="color: purple;">{{ c.calFinal }}</b>
                                {% else %}
                                    <i>{{ c.calFinal }}</i>
                                {% endif %}
                            </td>
                        {% else %}
                            <td colspan="50" class="text-left" style="vertical-align: middle;border: solid 1px cadetblue;color: red;">
                                AÚN NO ESTÁ ASOCIADO A UN PLAN DE ESTUDIOS
                            </td>
                        {% endfor %}

                    </tr>
                {% else %}
                    <tr>
                        <td colspan="50" class="text-left" style="border: solid 1px cadetblue;">SIN DATOS</td>
                    </tr>
                {% endfor %}
            </tbody>
        </table>
    </div><!-- FIN col-lg-12 -->
</div><!-- FIN row -->