<table class="table table-condensed table-bordered table-sobre" style="font-size: small;">
    <thead>
    <tr>
        <th class="text-center">#</th>
        <th class="text-center">Periodo</th>
        <th class="text-center">Clave</th>
        <th class="text-center">Asignatura</th>
        <th class="text-center">*</th>
        <th class="text-center">*</th>
        <th class="text-center">*</th>
    </tr>
    </thead>
    <tbody>
    {% if asignaturas is defined %}
        {% set numero = 0 %}
        {% set bandera = 0 %}
        {% for c in asignaturas %}
            {% if c.modalidad == 0 %}
                {% if numero == c.numCua %}

                {% else %}
                    {% set numero = c.numCua %}
                    {% if bandera == 0 %}
                        {% set bandera = 1 %}
                    {% else %}
                        {% set bandera = 0 %}
                    {% endif %}

                {% endif %}
            {% elseif c.modalidad == 1 %}

                {% if numero == c.numSem %}
                {% else %}
                    {% set numero = c.numSem %}
                    {% if bandera == 0 %}
                        {% set bandera = 1 %}
                    {% else %}
                        {% set bandera = 0 %}
                    {% endif %}
                {% endif %}
            {% endif %}

            {% if bandera == 0 %}
                <tr style="background-color: lightgrey;">
            {% elseif bandera == 1 %}
                <tr style="background-color: #FFF;">
            {% endif %}


            <td>{{ loop.index }}</td>
            {% if c.modalidad == 0 %}
                <td>{{ c.numCua }}</td>
            {% elseif c.modalidad == 1 %}
                <td>{{ c.numSem }}</td>
            {% endif %}

            <td>
                <input type="text" value="{{ c.clave }}" id="claveAsignatura_{{ c.ideCur }}"
                       name="claveAsignatura_{{ c.ideCur }}" style="width: 75%;">
            </td>
            <td>
                <input type="text" value="{{ c.nomAsignatura }}" id="nombreAsignatura_{{ c.ideCur }}"
                       name="nombreAsignatura_{{ c.ideCur }}" style="width: 100%;border-radius: 5px;">
            </td>
            <td>
                <a class="btn btn-warning btn-xs" onclick="actualizarDatosAsignatura({{ c.ideCur }});">
                    <i class="fa fa-upload fw"></i>
                </a>
            </td>
            <td id="cont-ideCur_{{ c.ideCur }}">
            </td>
            <td>
                <a class="btn btn-danger btn-xs"><i class="fa fa-trash fw"></i></a></td>
            </tr>
        {% else %}
            <tr class="text-center">
                <td colspan="6"><i style="color: red;">NO HAY DATOS</i></td>
            </tr>
        {% endfor %}
    {% endif %}
    </tbody>
</table>
