
<label class="control-label col-sm-6" for="cveGru">Grupo:</label>
<div class="col-sm-6">
    {% set banGrupos = 0 %}
    {% for g in grupos %}
        {% set banGrupos = 1 %}
    {% else %}
        {% set banGrupos = 0 %}
    {% endfor %}
    {% if banGrupos == 0 %}
        <select id="cveGru" name="cveGru" class="form-control input-sm" style="color: red;">
        {% elseif banGrupos == 1 %}
            <select id="cveGru" name="cveGru" class="form-control input-sm" style="color: green;">
            {% endif %}

            <option value="default">Selecciona</option>
            {% if grupos is defined %}
                {% for g in grupos %}
                    <option value="{{g.ideGru}}">{{g.grupo}} : Periodo={{g.periodo.periodo}}</option>
                {% else %}
                    <option value="default">No hay grupos disponibles</option>
                {% endfor %}
            {% endif %}
        </select>
</div>

<div class="col-lg-12 table-responsive" style="margin-top: 10px;">
    <table class="col-lg-12 table table-bordered table-striped table-condensed table-sobre table-responsive" style="font-size: smaller;">
        <thead>
            <tr>
                <th class="text-center">#</th>
                <th class="text-center">CVE</th>
                <th class="text-center">ASIGNATURA</th>
                <th class="text-center">HI</th>
                <th class="text-center">HF</th>
                <th class="text-center">DOCENTE</th>
                <th class="text-center">*</th>
            </tr>
        </thead>
        <tbody>
            {% if curriculas is defined %}
                {% for c in curriculas %}
                    <tr>
                        <td style="vertical-align: middle;">{{loop.index}}</td>
                        <td style="vertical-align: middle;">{{c.clave}}</td>
                        <td style="vertical-align: middle;">{{c.nomAsignatura}}</td>
                        <td>
                            <input type="time" value="" id="hi{{c.ideCur}}" name="hi{{c.ideCur}}" class="form-control input-sm">
                        </td>
                        <td>
                            <input type="time" value="" id="hf{{c.ideCur}}" name="hf{{c.ideCur}}" class="form-control input-sm">
                        </td>
                        <td>
                            {% set banGrupos = 0 %}
                            {% for p in profesores %}
                                {% set banGrupos = 1 %}
                            {% else %}
                                {% set banGrupos = 0 %}
                            {% endfor %}
                            {% if banGrupos == 0 %}
                                <select class="form-control input-sm profe" data-live-search="true" id="pro{{c.ideCur}}" name="pro{{c.ideCur}}" style="color: red;">
                                {% elseif banGrupos == 1 %}
                                    <select class="form-control input-sm profe" data-live-search="true" id="pro{{c.ideCur}}" name="pro{{c.ideCur}}" style="color: green;">
                                    {% endif %}

                                    <option value="default">Selecciona</option>
                                    {% for p in profesores %}
                                        <option value="{{p.idePro}}">{{p.apePat}} {{p.apeMat}} {{p.nomPro}} : {{p.rfc}}</option>
                                    {% else %}
                                        <option value="default">No hay registro de profesores</option>
                                    {% endfor %}
                                </select>
                        </td>
                        <td style="vertical-align: middle;" id="save{{c.ideCur}}">
                            <button type="button" class="btn btn-success btn-xs save-time" onclick="guardarHorario({{c.ideCur}})" id="save{{c.ideCur}}">
                                <i class="fa fa-save fw"></i>
                            </button>
                        </td>
                    </tr>
                {% else %}
                    <tr class="text-center" style="color: red;">
                        <td colspan="7">NO HAY ASIGNATURAS REGISTRADAS</td>
                    </tr>
                {% endfor %}
            {% endif %}
        </tbody>
    </table>
</div>