index.html 7.88 KB
Newer Older
1 2 3 4 5 6 7 8 9
{% extends 'base.html' %}

{% load static %}



{% block content %}

<div class="row">
legton's avatar
legton committed
10
    <div class="col-md-12">
11

12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
        <h1>
            Listagem dos Alunos
            <a tabindex="0" class="fa fa-info-circle" data-toggler="popover" data-html="true" 
            data-content="Para o cálculo do IRA, somente as situações consideradas como <b>Aprovação</b> ou <b>Reprovação</b> são consideradas.<br>
            <br>
            Situações consideradas como <b>Aprovação:</b><br>
            {% for x in situations_pass %}
            {{x}}<br>
            {% endfor %}
            <br>
            Situações consideradas como <b>Reprovação:</b><br>
            {% for x in situations_fail %}
            {{x}}<br>
            {% endfor %}
            "></a>
        </h1>
legton's avatar
legton committed
28 29 30 31 32 33 34 35 36 37 38
        <div class="nav nav-tabs" role="tablist">
            <a class="nav-item nav-link active" href="#sem_evasao" aria-controls="sem_evasao" data-toggle="tab">Sem Evasão</a>
            <a class="nav-item nav-link" href="#formados" aria-controls="formados" data-toggle="tab">Formados</a>
            <a class="nav-item nav-link" href="#abandono" aria-controls="abandono" data-toggle="tab">Abandono</a>
            <a class="nav-item nav-link" href="#desistencia" aria-controls="desistencia" data-toggle="tab">Desistência</a>
            <a class="nav-item nav-link" href="#outras" aria-controls="outras" data-toggle="tab">Outras Formas de Evasão</a>
        </div>
        <br>
        
        <div class="tab-content">
                <div role="tabpanel" class="tab-pane active" id="sem_evasao">
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
                    <table class="table table-striped table-bordered" id="sem_evasao_table">
                        <thead>
                            <tr>
                                <th class="col-md-2">GRR</th>
                                <th class="col-md-4">Nome</th>
                                <th class="col-md-2">IRA</th>
                                <th class="col-md-2">Forma evasão</th>
                            </tr>
                        </thead>
                        <tbody>
                            {% for l in sem_evasao %}
                            <tr>
                            <td class="col-md-2"><a href="{% url 'student:detail' grr=l.grr submission_id=submission.id %}">{{ l.grr }}</a></td>
                            <td class="col-md-4">{{ l.nome }}</td>
                            <td class="col-md-2">{{ l.ira|floatformat:2 }}</td>
                            <td class="col-md-2">{{ l.forma_evasao }}</td>
                            </tr>
                            {% endfor %}
                        </tbody>
58
                    </table>
legton's avatar
legton committed
59 60 61
                </div>
                <div role="tabpanel" class="tab-pane" id="formados">
                    <table class="table table-striped table-bordered" id="formados_table">
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
                        <thead>
                            <tr>
                                <th class="col-md-2">GRR</th>
                                <th class="col-md-4">Nome</th>
                                <th class="col-md-2">IRA</th>
                                <th class="col-md-2">Forma evasão</th>
                            </tr>
                        </thead>
                        <tbody>
                            {% for l in formatura %}
                            <tr>
                            <td class="col-md-2"><a href="{% url 'student:detail' grr=l.grr submission_id=submission.id %}">{{ l.grr }}</a></td>
                            <td class="col-md-4">{{ l.nome }}</td>
                            <td class="col-md-2">{{ l.ira|floatformat:2 }}</td>
                            <td class="col-md-2">{{ l.forma_evasao }}</td>
                            </tr>
                            {% endfor %}
                        </tbody>
legton's avatar
legton committed
80 81 82 83
                    </table>
                </div>
                <div role="tabpanel" class="tab-pane" id="abandono">
                    <table class="table table-striped table-bordered" id="abandono_table">
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101
                        <thead>
                            <tr>
                                <th class="col-md-2">GRR</th>
                                <th class="col-md-4">Nome</th>
                                <th class="col-md-2">IRA</th>
                                <th class="col-md-2">Forma evasão</th>
                            </tr>
                        </thead>
                        <tbody>
                            {% for l in abandono %}
                            <tr>
                                <td class="col-md-2"><a href="{% url 'student:detail' grr=l.grr submission_id=submission.id %}">{{ l.grr }}</a></td>
                                <td class="col-md-4">{{ l.nome }}</td>
                                <td class="col-md-2">{{ l.ira|floatformat:2 }}</td>
                                <td class="col-md-2">{{ l.forma_evasao }}</td>
                            </tr>
                            {% endfor %}
                        </tbody>
legton's avatar
legton committed
102 103 104 105
                    </table>
                </div>
                <div role="tabpanel" class="tab-pane" id="desistencia">
                    <table class="table table-striped table-bordered" id="desistencia_table">
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123
                        <thead>
                            <tr>
                                <th class="col-md-2">GRR</th>
                                <th class="col-md-4">Nome</th>
                                <th class="col-md-2">IRA</th>
                                <th class="col-md-2">Forma evasão</th>
                            </tr>
                        </thead>
                        <tbody>
                            {% for l in desistencia %}
                            <tr>
                                <td class="col-md-2"><a href="{% url 'student:detail' grr=l.grr submission_id=submission.id %}">{{ l.grr }}</a></td>
                                <td class="col-md-4">{{ l.nome }}</td>
                                <td class="col-md-2">{{ l.ira|floatformat:2 }}</td>
                                <td class="col-md-2">{{ l.forma_evasao }}</td>
                            </tr>
                            {% endfor %}
                        </tbody>
legton's avatar
legton committed
124 125 126 127
                    </table>
                </div>
                <div role="tabpanel" class="tab-pane" id="outras">
                    <table class="table table-striped table-bordered" id="outros_table">
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
                        <thead>
                            <tr>
                                <th class="col-md-2">GRR</th>
                                <th class="col-md-4">Nome</th>
                                <th class="col-md-2">IRA</th>
                                <th class="col-md-2">Forma evasão</th>
                            </tr>
                        </thead>
                        <tbody>
                            {% for l in outros %}
                            <tr>
                                <td class="col-md-2"><a href="{% url 'student:detail' grr=l.grr submission_id=submission.id %}">{{ l.grr }}</a></td>
                                <td class="col-md-4">{{ l.nome }}</td>
                                <td class="col-md-2">{{ l.ira|floatformat:2 }}</td>
                                <td class="col-md-2">{{ l.forma_evasao }}</td>
                            </tr>
                            {% endfor %}
                        </tbody>
legton's avatar
legton committed
146 147 148 149
                    </table>
                </div>
        </div>
    </div>
150
</div>
151 152
{% endblock content %}

153

154 155
{% block js-foot %}
<script>
legton's avatar
legton committed
156 157 158 159 160 161 162 163
    var table_names = [
        $("#sem_evasao_table"),
        $("#formados_table"),
        $("#abandono_table"),
        $("#desistencia_table"),
        $("#outros_table")
    ];
    $(table_names).each(function(i,x){
164
        var t = x.dataTable({
legton's avatar
legton committed
165 166 167 168 169 170 171
            "bPaginate": true,
            "aaSorting": [[ 1, "desc" ]],
            "responsive": true
        });
    });
    
    
172
</script>
legton's avatar
legton committed
173
    
174
{% endblock js-foot %}