<div class="col-lg-12 form-group">
    <label class="control-label col-sm-3" for="grupo">GRUPOS:</label>
    <div class="col-sm-9">
        <select id="grupo" name="grupo" class="form-control input-sm" onchange="buscar(this.value)">
            <option value="default">Selecciona</option>
            {% if grupos is defined %}
                {% for g in grupos %}
                    {% if g.semestre == 0 %}
                        <option value="{{g.ideGru}}">{{g.grupo}}: CUA {{g.cuatrimestre}}: PER {{g.periodo.periodo}}</option>
                    {% else %}
                        <option value="{{g.ideGru}}">{{g.grupo}}: SEM {{g.semestre}}: PER {{g.periodo.periodo}}</option>
                    {% endif %}
                {% else %}
                    <option value="default" style="color: red;font-weight: bold;">NO HAY REGISTROS</option>
                {% endfor %}
            {% endif %}
        </select>
    </div>
</div>
<div class="col-lg-12">
    <h5><b>HORARIOS DISPONIBLES</b></h5>
</div>
<div class="col-lg-12 table-responsive">
    <table class="table table-condensed table-bordered table-striped table-sobre table-utm" style="font-size: xx-small;">
        <thead>
            <tr style="background-color: #00FF00;font-weight: bolder;">
                <th>N.C.</th>
                <th>GRUPO</th>
                <th>ASIGNATURA</th>
                <th>DOCENTE</th>
                <th>HORARIO</th>
            </tr>
        </thead>
        <tbody>
            {% for h in horarios %}
                <tr>
                    <td class="text-right" style="vertical-align: middle;">
                        {{loop.index}}
                    </td>
                    <td style="vertical-align: middle;">{{h.cveGru.grupo}}</td>
                    <td style="vertical-align: middle;"><b>{{h.cveCur.clave}}</b>:{{h.cveCur.nomAsignatura}}</td>
                    <td style="vertical-align: middle;">
                        {{h.cvePro.apePat}} {{h.cvePro.apeMat}} <i style="font-weight: bold;">{{h.cvePro.nomPro}}</i>
                    </td>
                    <td class="text-left" style="vertical-align: middle;">
                        {{h.horaInicio | date('h:i a')}} - {{h.horaFin | date('h:i a')}}
                    </td>
                </tr>
            {% else %}
                <tr style="background-color: red;font-weight: bolder;color: white;">
                    <td colspan="5" class="text-center">NO HAY HORARIOS DISPONIBLES</td>
                </tr>
            {% endfor %}
        </tbody>
    </table>
</div>
<div class="col-sm-12 table-responsive">
    <table class="table table-condensed table-striped table-hover table-bordered table-sobre table-utm" style="font-size: xx-small;">
        <thead>
            <tr style="background-color: #00FF00;font-weight: bolder;">
                <th class="text-center">No. </th>
                <th class="text-center">CVE CONTROL</th>
                <th class="text-center">NOMBRE</th>
                <th>.</th>
            </tr>
        </thead>
        <tbody>
            {% if alumnos is defined %}
                {% for a in alumnos %}
                    <tr>
                        <td style="vertical-align: middle;" class="text-right">{{loop.index}}</td>
                        <td style="vertical-align: middle;">
                            <a href="{{path('consulta_alumno_dos', {ideAlu: a.ideAlu} )}}" target="_blank" style="color: black;font-weight: bolder;">{{a.cveCtl}}</a>
                        </td>
                        <td style="vertical-align: middle;">{{a.apePat}} {{a.apeMat}} <i style="font-weight: bolder;">{{a.nomAlu}}</i></td>
                        <td class="text-center" style="vertical-align: middle;">
                            <input type="checkbox" id="{{a.ideAlu}}" class="alu" onclick="agregar(this.id)">
                        </td>
                    </tr>
                {% else %}
                    <tr style="background-color: red;font-weight: bolder;color: white;">
                        <td colspan="4" class="text-center">NO HAY ALUMNOS REGISTRADOS</td>
                    </tr>
                {% endfor %}
            {% endif %}
        </tbody>
    </table>
</div>
