Conjunto de cambios 39b8a44 en sapic para explicacion_situacional/templates/caracterizacion.politica.html
- Fecha y hora:
- 10/09/2018 09:44:04 (hace 6 años)
- Branches:
- master
- Children:
- 8837872
- Parents:
- 1901d86
- git-author:
- Manuel Zambrano <mzambrano595@…> (10/09/18 09:38:13)
- git-committer:
- Manuel Zambrano <mzambrano595@…> (10/09/18 09:44:04)
- Fichero:
-
- 1 editado
Leyenda
- No modificado
- Añadido
- Eliminado
-
explicacion_situacional/templates/caracterizacion.politica.html
r1901d86 r39b8a44 3 3 {% load i18n %} 4 4 {% block titulo %}_-=SAPIC-Caracterización PolÃtica=-_{% endblock titulo %} 5 {% block extracss %} 6 <link rel="stylesheet" type="text/css" href="{% static "DataTables/media/css/jquery.dataTables.min.css" %}"> 7 <link rel="stylesheet" type="text/css" href="{% static "DataTables/media/css/jquery.dataTables.min.css" %}"> 8 <link rel="stylesheet" type="text/css" href="{% static "DataTables/extensions/Buttons/css/buttons.dataTables.min.css" %}"> 9 <link rel="stylesheet" type="text/css" href="{% static "DataTables/extensions/Select/css/select.dataTables.min.css" %}"> 10 <link rel="stylesheet" type="text/css" href="{% static "DataTables/extensions/Responsive/css/responsive.dataTables.min.css" %}"> 11 <link rel="stylesheet" type="text/css" href="https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css"> 12 {% endblock extracss %} 13 {% block extrajs %} 14 <script type="text/javascript" language="javascript" src="{% static "DataTables/media/js/jquery.dataTables.min.js" %}"></script> 15 <script type="text/javascript" language="javascript" src="{% static "DataTables/extensions/Buttons/js/dataTables.buttons.min.js" %}"></script> 16 <script type="text/javascript" language="javascript" src="{% static "DataTables/extensions/Buttons/js/buttons.print.min.js" %}"></script> 17 <script type="text/javascript" language="javascript" src="{% static "DataTables/extensions/Buttons/js/buttons.jqueryui.js" %}"></script> 18 <script type="text/javascript" language="javascript" src="{% static "DataTables/extensions/Buttons/js/buttons.html5.min.js" %}"></script> 19 20 <script type="text/javascript"> 21 function abrir_modal(url) 22 { 23 $('#popup').load(url, function() 24 { 25 $(this).modal('show'); 26 }); 27 return false; 28 } 29 30 function cerrar_modal() 31 { 32 $('#popup').modal('hide'); 33 return false; 34 } 35 36 37 $(function() { 38 var table = $('#tabla-participacion').DataTable({ 39 "columnDefs": [ 40 { width: '20%', targets: 2 }, 41 ], 42 initComplete: function () { 43 this.api().columns([2]).every( function () { 44 var column = this; 45 var select = $('#select_filter') 46 .on( 'change', function () { 47 var val = $.fn.dataTable.util.escapeRegex( 48 $(this).val() 49 ); 50 51 column 52 .search( val ? '^'+val+'$' : '', true, false ) 53 .draw(); 54 } ); 55 56 column.data().unique().sort().each( function ( d, j ) { 57 select.append( '<option value="'+d+'">'+d+'</option>' ) 58 } ); 59 } ); 60 }, 61 "language": { 62 url: "//cdn.datatables.net/plug-ins/1.10.16/i18n/Spanish.json" 63 }, 64 "lengthMenu": [ [10, 50, 100, -1], [10, 50, 100, "Todo"] ], 65 66 67 "scrollX": true, 68 "fixedColumns": true , 69 "dom": 'lfrtBSip', 70 "buttons": ['copy', 'csv', 'print'] 71 }); 72 }); 73 74 </script> 75 {% endblock extrajs %} 76 77 5 78 {% block contenido_principal %} 6 79 <div class="col-xs-12"> … … 13 86 </section> 14 87 {% if consultas %} 15 {% endif %} 16 <section class="content"> 88 <select id="select_filter" style="color:#000"><option value="">Consulta</option></select> 89 <table id="tabla-participacion" class="display "> 90 <thead> 91 <tr> 92 <th>Pregunta</th> 93 <th>Respuesta</th> 94 <th>Consulta</th> 95 <th>Accion</th> 96 </tr> 97 </thead> 98 <tbody> 99 {% for respuesta in si_no %} 100 {% if respuesta.respuesta %} 101 <tr> 102 <td>{{ respuesta.pregunta }}</td> 103 <td>Si</td> 104 <td>{{ respuesta.pregunta.consulta.nombre_consulta | cut:"Información sobre la " | cut:"información sobre las " | cut:"Información sobre " | title}}</td> 105 <td><a class="btn" onclick="return abrir_modal('{% url 'explicacion:modificar_respuesta_' respuesta.pregunta.tipo_pregunta.pk respuesta.pk %}')"><i class="glyphicon glyphicon-edit"></i></a></td> 106 </tr> 107 {% else %} 108 <tr> 109 <td> {{respuesta.pregunta}} </td> 110 {% for justificacion in abierta %} 111 {% if justificacion.es_justificacion and justificacion.pregunta.pk == respuesta.pregunta.pk %} 112 <td>No,{{justificacion.texto_respuesta}} </td> 113 {% endif %} 114 {% endfor %} 115 <td>{{ respuesta.pregunta.consulta.nombre_consulta | cut:"Información sobre la " | cut:"información sobre las " | cut:"Información sobre " | title}}</td> 116 <td><a class="btn" onclick="return abrir_modal('{% url 'explicacion:modificar_respuesta_' respuesta.pregunta.tipo_pregunta.pk respuesta.pk %}')" ><i class="glyphicon glyphicon-edit"></i></a></td> 117 </tr> 118 {% endif %} 119 120 {% endfor %} 121 122 {% for respuesta in opciones %} 123 <tr> 124 <td>{{ respuesta.opcion.pregunta }}</td> 125 <td>{{ respuesta.opcion }}</td> 126 <td>{{ respuesta.opcion.pregunta.consulta.nombre_consulta | cut:"Información sobre la " | cut:"información sobre las " | cut:"Información sobre " | title}}</td> 127 <td><a class="btn" onclick="return abrir_modal('{% url 'explicacion:modificar_respuesta_' respuesta.opcion.pregunta.tipo_pregunta.pk respuesta.pk %}')"><i class="glyphicon glyphicon-edit"></i></a></td> 128 </tr> 129 {% endfor %} 130 {% for respuesta in abierta %} 131 132 {% if not respuesta.es_justificacion %} 133 <tr> 134 <td>{{ respuesta.pregunta }}</td> 135 <td>{{ respuesta.texto_respuesta }}</td> 136 <td>{{ respuesta.pregunta.consulta.nombre_consulta | cut:"Información sobre la " | cut:"información sobre las " | cut:"Información sobre " | title}}</td> 137 <td><a class="btn" onclick="return abrir_modal('{% url 'explicacion:modificar_respuesta_' respuesta.pregunta.tipo_pregunta.pk respuesta.pk %}')"><i class="glyphicon glyphicon-edit"></i></a></td> 138 </tr> 139 {% endif %} 140 141 {% endfor %} 142 {% for respuesta in ubicacion %} 143 <tr> 144 <td>{{ respuesta.pregunta }}</td> 145 <td>{{ respuesta.coordenadas }}</td> 146 <td>{{ respuesta.pregunta.consulta.nombre_consulta }}</td> 147 <td><a class="btn" href="#"><i class="icon"></i></a></td> 148 </tr> 149 {% endfor %} 150 </tbody> 151 152 </table> 153 {% endif %} 154 <div id="popup" class="modal fade" role="dialog"></div> 155 {% if not 19 in consultas %} 156 <section class="content"> 17 157 <div class="col-lg-12 col-xs-12"> 18 158 <!-- small box --> … … 30 170 </div> 31 171 </section> 32 <section class="content"> 172 {% endif %} 173 {% if not 20 in consultas %} 174 <section class="content"> 33 175 <div class="col-lg-12 col-xs-12"> 34 176 <!-- small box --> … … 46 188 </div> 47 189 </section> 48 <section class="content"> 190 {% endif %} 191 {% if not 21 in consultas %} 192 <section class="content"> 49 193 <div class="col-lg-12 col-xs-12"> 50 194 <!-- small box --> … … 62 206 </div> 63 207 </section> 64 <section class="content"> 208 {% endif %} 209 {% if not 22 in consultas %} 210 <section class="content"> 65 211 <div class="col-lg-12 col-xs-12"> 66 212 <!-- small box --> … … 78 224 </div> 79 225 </section> 80 <section class="content"> 226 {% endif %} 227 {% if not 23 in consultas %} 228 <section class="content"> 81 229 <div class="col-lg-12 col-xs-12"> 82 230 <!-- small box --> … … 94 242 </div> 95 243 </section> 96 <section class="content"> 244 {% endif %} 245 {% if not 24 in consultas %} 246 <section class="content"> 97 247 <div class="col-lg-12 col-xs-12"> 98 248 <!-- small box --> … … 110 260 </div> 111 261 </section> 262 {% endif %} 112 263 </div> 113 264 </div> 114 <script type="text/javascript"> 115 function abrir_modal(url) 116 { 117 $('#popup').load(url, function() 118 { 119 $(this).modal('show'); 120 }); 121 return false; 122 } 123 124 function cerrar_modal() 125 { 126 $('#popup').modal('hide'); 127 return false; 128 } 129 130 </script> 265 131 266 {% endblock contenido_principal %}
Nota: Vea TracChangeset
para ayuda en el uso del visor de conjuntos de cambios.