Browse Source

Fix #1676

pull/1678/head
Mariana Mendes 8 years ago
parent
commit
bba8a7146b
  1. 4
      sapl/painel/views.py
  2. 14
      sapl/templates/painel/index.html

4
sapl/painel/views.py

@ -346,8 +346,7 @@ def get_presentes(pk, response, materia):
'tipo_resultado': materia.resultado, 'tipo_resultado': materia.resultado,
'observacao_materia': materia.observacao, 'observacao_materia': materia.observacao,
'tipo_votacao': tipo_votacao, 'tipo_votacao': tipo_votacao,
'materia_legislativa_texto': str(materia.materia), 'materia_legislativa_texto': str(materia.materia)
'oradores': oradores_list
}) })
presentes_list = sort_lista_chave(presentes_list, 'nome') presentes_list = sort_lista_chave(presentes_list, 'nome')
@ -355,6 +354,7 @@ def get_presentes(pk, response, materia):
response.update({ response.update({
'presentes': presentes_list, 'presentes': presentes_list,
'num_presentes': num_presentes, 'num_presentes': num_presentes,
'oradores': oradores_list,
'msg_painel': str(_('Votação aberta!')), 'msg_painel': str(_('Votação aberta!')),
}) })

14
sapl/templates/painel/index.html

@ -71,9 +71,9 @@
</table> </table>
</div> </div>
<div class="row container-detail clearfix" id="aparecer_oradores"> <div class="row container-detail clearfix">
<div class="row-fluid"> <div class="row-fluid">
<div class="col-md-4"> <div class="col-md-4" id="aparecer_oradores">
<h2><font color="#459170"><p align="center" style="font-family:Verdana">Oradores</p></b></font></h2> <h2><font color="#459170"><p align="center" style="font-family:Verdana">Oradores</p></b></font></h2>
<table align="center"> <table align="center">
<tr> <tr>
@ -81,9 +81,6 @@
</tr> </tr>
</table> </table>
</div> </div>
</div>
</div>
<div class="col-md-3"> <div class="col-md-3">
<h2><font color="#459170"><p align="center" style="font-family:Verdana">Cronômetros</p></font></h2> <h2><font color="#459170"><p align="center" style="font-family:Verdana">Cronômetros</p></font></h2>
@ -111,12 +108,14 @@
</br> </br>
<div class="col-md-4">
<h2><font color="#459170"><p align="center" style="font-family:Verdana">Matéria em Votação</p></font></h2> <h2><font color="#459170"><p align="center" style="font-family:Verdana">Matéria em Votação</p></font></h2>
<table style="width:75%; border:1px;" align="center"> <table style="width:75%; border:1px;" align="center">
<tr><th style="text-align:center"><h4><font color="white"><span id="materia_legislativa_texto"></span></font></h4></th></tr> <tr><th style="text-align:center"><h4><font color="white"><span id="materia_legislativa_texto"></span></font></h4></th></tr>
<tr><th style="text-align:center"><h4><font color="white"><span id="observacao_materia"></span></font></h4></th></tr> <tr><th style="text-align:center"><h4><font color="white"><span id="observacao_materia"></span></font></h4></th></tr>
<tr><th style="text-align:center"><h2><font color="#45919D"><span id="resultado_votacao"></span></font></h2></th></tr> <tr><th style="text-align:center"><h2><font color="#45919D"><span id="resultado_votacao"></span></font></h2></th></tr>
</table> </table>
</div>
</body> </body>
<script type="text/javascript"> <script type="text/javascript">
@ -229,7 +228,8 @@
}); });
presentes.append('</table>') presentes.append('</table>')
if (oradores_list.length > 0){ if (data["oradores"].length > 0){
$('#aparecer_oradores').show();
oradores.append('<table id="oradores_list">'); oradores.append('<table id="oradores_list">');
jQuery.each(oradores_list, function (index, orador) { jQuery.each(oradores_list, function (index, orador) {
$('#oradores_list').append('<tr><td style="padding-right:20px; color:white" >' + $('#oradores_list').append('<tr><td style="padding-right:20px; color:white" >' +
@ -239,7 +239,7 @@
oradores.append('</table>'); oradores.append('</table>');
} }
else { else {
$("#aparecer_oradores").hide(); $('#aparecer_oradores').hide();
} }
} }
else{ else{

Loading…
Cancel
Save