diff options
| author | Mitsuo Tokumori <rtokumori@pucp.edu.pe> | 2023-10-29 18:47:23 -0500 |
|---|---|---|
| committer | Mitsuo Tokumori <rtokumori@pucp.edu.pe> | 2023-10-29 18:47:23 -0500 |
| commit | 7550b896ce360a998da788beae4b4c6f734f473e (patch) | |
| tree | 1f354a1d906c856282e471056ff37ba4b40c5b2d /ustayml/templates/students | |
| parent | 3b22586890425c8b8e555bce649649228b26c02b (diff) | |
Add filtering and pagination to bp.estudiantes
Diffstat (limited to 'ustayml/templates/students')
| -rw-r--r-- | ustayml/templates/students/index.html | 83 |
1 files changed, 49 insertions, 34 deletions
diff --git a/ustayml/templates/students/index.html b/ustayml/templates/students/index.html index 74c1847..6fb5312 100644 --- a/ustayml/templates/students/index.html +++ b/ustayml/templates/students/index.html @@ -7,45 +7,58 @@ {% endblock %} {% block content %} - <div class="filters"> - {# <h3>Filtros</h3> #} - <form class="filters-list" method="post"> - <label for="pucp_unit">Unidad: + <div class="filter-criteria"> + <form class="filters" method="get"> + <fieldset class="filters-list"> + <div> + <label for="pucp_unit">Unidad:</label> <select name="pucp_unit" id="pucp_unit"> - <option>Mostrar todas</option> - <option>Facultad de Ciencias e Ingenieria</option> - <option>EEGGCC</option> + <option value="0">Mostrar todas</option> + {% for e in pucp_unit %} + <option value="{{e['id']}}" {% if e['id'] == fc['pucp_unit'] %} selected {% endif %}>{{ e['name'] }}</option> + {% endfor %} </select> - </label> - <label for="semester">Semestre: + </div> + <div> + <label for="semester">Semestre: </label> <select name="semester" id="semester"> - <option>Mostrar todos</option> - <option>2023-2</option> - <option>2023-1</option> - <option>2022-2</option> - <option>2022-1</option> - <option>2021-2</option> - <option>2021-1</option> - <option>2020-2</option> - <option>2020-1</option> - <option>2019-2</option> - <option>2019-1</option> - <option>2018-2</option> - <option>2018-1</option> - <option>2017-2</option> - <option>2017-1</option> + <option value="0">Mostrar todos</option> + {% for e in semester %} + <option value="{{e['id']}}" {% if e['id'] == fc['semester'] %} selected {% endif %}>{{ e['name'] }}</option> + {% endfor %} </select> - </label> - <label for="dessertion_risk">Riesgo deserción: - <select name="dessertion_risk" id="dessertion_risk"> - <option>Mostrar todos</option> - <option>Alto</option> - <option>Medio</option> - <option>Bajo</option> + </div> + <div> + <label for="desertion_risk_class">Riesgo deserción: </label> + <select name="desertion_risk_class" id="desertion_risk_class"> + <option value="0">Mostrar todos</option> + {% for e in desertion_risk_class %} + <option value="{{e['id']}}" {% if e['id'] == fc['desertion_risk_class'] %} selected {% endif %}>{{ e['name'] }}</option> + {% endfor %} </select> - </label> + </div> + <div> + <label for="page">Página: </label> + <select name="page" id="page"> + {% for i in range(pagination['n_pages'])%} + <option value="{{i}}">{{ i + 1 }}</option> + {% endfor %} + </select> + </div> + <div> + <label></label> + <input type="submit" value="Aplicar filtros"> + </div> + </fieldset> </form> - <input type="submit" value="Aplicar filtros"> + </div> + <div class="table-pagination"> + <span> {{ pagination['rowcount'] }} estudiantes encontrados. Página {{ pagination['page'] + 1 }} de {{ pagination['n_pages'] }}.</span> + <div class="page-list"> + {% for i in range(pagination['n_pages'])%} + <a href="#">{{ i + 1 }}</a> + {% endfor %} + </div> </div> <table class="students-table"> <thead> @@ -54,6 +67,7 @@ <th>nombre</th> <th>email</th> <th>distrito</th> + <th>facultad</th> <th>asistencia</th> <th>CRAEst</th> <th>PPNE3</th> @@ -69,12 +83,13 @@ <td>{{ student['fullname'] }}</td> <td>{{ student['email'] }}</td> <td>{{ student['district'] }}</td> + <td>{{ student['pucp_unit'] }}</td> <td>{{ student['current_attendance'] }}</td> <td>{{ student['current_craest'] }}</td> <td>{{ student['current_ppne3'] }}</td> <td>{{ student['current_merit'] }}</td> <td>{{ student['est_study_length'] }}</td> - <td>{{ student['est_dessertion_risk'] }}</td> + <td>{{ student['est_desertion_risk_class'] }}</td> </tr> {% endfor %} </tbody> |
