mirror of https://github.com/interlegis/sapl.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
193 lines
6.5 KiB
193 lines
6.5 KiB
{% load i18n %}
|
|
{% load common_tags %}
|
|
{% load render_bundle from webpack_loader %}
|
|
{% load webpack_static from webpack_loader %}
|
|
|
|
<!DOCTYPE HTML>
|
|
<html lang="pt-br">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<title>{% block head_title %}{% trans 'SAPL - Sistema de Apoio ao Processo Legislativo' %}{% endblock %}</title>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
{% render_chunk_vendors 'css' %}
|
|
{% render_bundle 'global' 'css' %}
|
|
{% render_bundle 'painel' 'css' %}
|
|
|
|
<style type="text/css">
|
|
html, body {
|
|
max-width: 100%;
|
|
overflow-x: hidden;
|
|
}
|
|
@media screen {
|
|
body {
|
|
background: #1c1b1b;
|
|
}
|
|
ul, li {
|
|
list-style-type: none;
|
|
}
|
|
#date, #relogio, #resultado_votacao, #blocoprincipal, #blocoerro {
|
|
font-family: Verdana;
|
|
}
|
|
#votos
|
|
{
|
|
text-align:center;
|
|
}
|
|
#votosim, #votonao, #votoabstencao
|
|
{
|
|
display:inline;
|
|
}
|
|
|
|
#voltar {
|
|
margin-left: 5rem;
|
|
}
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
|
|
{% if not error_message %}
|
|
<div id="blocoprincipal" style="display:block">
|
|
<h1><b><font color="#4FA64D"><p align="center">{{sessao}}</p></font></b></h1>
|
|
<table style="width:90%">
|
|
<tr>
|
|
<td style="text-align:center"><font color="white" size="4">Data Início: {{data}}</font></td>
|
|
<td style="text-align:center"><font color="white" size="4">Hora Início: {{hora}}</font></td>
|
|
</tr>
|
|
|
|
<tr>
|
|
<td style="text-align:center"><font color="white" size="6"><span id="date"></span></font></td>
|
|
|
|
<td style="text-align:center"><font color="white" size="6"><span id="relogio"></span></font></td>
|
|
</tr>
|
|
</table>
|
|
|
|
</br>
|
|
</br>
|
|
<h2>
|
|
<font color="white">
|
|
<p align="center" style="font-family:Verdana">Voto:
|
|
{% if voto_parlamentar == "Sim" %}
|
|
<font color="#449d44">{{voto_parlamentar}}</font>
|
|
{% elif voto_parlamentar == "Não" %}
|
|
<font color="#d9534f">{{voto_parlamentar}}</font>
|
|
{% elif voto_parlamentar == "Abstenção" %}
|
|
<font color="#eaeaea">{{voto_parlamentar}}</font>
|
|
{% endif %}
|
|
</p>
|
|
</font>
|
|
</h2>
|
|
</br>
|
|
</br>
|
|
|
|
<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">
|
|
<tr><th style="text-align:center"><h4><font color="white" size="5">{{materia}}</font></h4></th></tr>
|
|
<tr><th style="text-align:center"><h4><font color="white">{{ementa}}</font></h4></th></tr>
|
|
<tr><th style="text-align:center"><font color="#45919D"><span id="resultado_votacao"></span></font></th></tr>
|
|
</table>
|
|
|
|
<br /><br />
|
|
<form method='POST'>
|
|
{% csrf_token %}
|
|
<div class="row container-detail clearfix" style="text-align:center">
|
|
<div class="row">
|
|
<div class="col-md-12" id="votos">
|
|
|
|
<div id="votosim"><input type="submit" class="btn btn-lg btn-success" id="voto" name="voto" type="submit" value="Sim" /></div>
|
|
|
|
<div id="votonao"><input type="submit" class="btn btn-lg btn-danger" id="voto" name="voto" type="submit" value="Não"/></div>
|
|
|
|
<div id="votoabstencao"><input type="submit" class="btn btn-lg btn-secondary" id="voto" name="voto" type="submit" value="Abstenção"/></div>
|
|
</div>
|
|
</br>
|
|
</br>
|
|
</br>
|
|
</br>
|
|
</br>
|
|
<div id='voltar'><center><button type="button" class="btn btn-lg btn-secondary" onclick="javascript:window.close()">Voltar</button></center></div>
|
|
</div>
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
{% else %}
|
|
<div id="blocoerro" style="display:block">
|
|
<h2><font color="red"><p align="center" style="font-family:Verdana">{{error_message}}</p></font></h2>
|
|
</br>
|
|
</br>
|
|
</br>
|
|
<center><table style="width:30%">
|
|
<tr>
|
|
<td style="text-align:center"><button type="button" class="btn btn-lg btn-primary" onclick="javascript:window.location.reload(true)">Atualizar</button></td>
|
|
<td style="text-align:center"><button type="button" class="btn btn-lg btn-secondary" onclick="javascript:window.close()">Sair</button></td>
|
|
</tr>
|
|
</table></center>
|
|
|
|
</div>
|
|
{% endif %}
|
|
</body>
|
|
</html>
|
|
|
|
{% render_chunk_vendors 'js' %}
|
|
{% render_bundle 'global' 'js' %}
|
|
{% render_bundle 'painel' 'js' %}
|
|
|
|
<script type="text/javascript">
|
|
var d = new Date();
|
|
var n = d.toLocaleDateString();
|
|
document.getElementById("date").innerHTML = n;
|
|
|
|
$(window).on('beforeunload', function () {
|
|
$("input[type=submit], input[type=button]").prop("disabled", "disabled");
|
|
});
|
|
$( "#votosim" ).mouseleave(function(){document.location.reload(true);});
|
|
$( "#votonao" ).mouseleave(function(){document.location.reload(true);});
|
|
$( "#votoabstencao" ).mouseleave(function(){document.location.reload(true);});
|
|
|
|
$(document).on('keyup', (e) => {
|
|
var tecla_press = e.keyCode;
|
|
switch (tecla_press) {
|
|
case 83: // 83 = valor da tecla S
|
|
document.querySelectorAll("#votosim input")[0].click();
|
|
break;
|
|
case 78: //78 = valor da tecla N
|
|
document.querySelectorAll("#votonao input")[0].click();
|
|
break;
|
|
case 65: //65 = valor da tecla A
|
|
document.querySelectorAll("#votoabstencao input")[0].click();
|
|
break;
|
|
case 86: //86 = valor da tecla V
|
|
document.querySelectorAll("#voltar button")[0].click();
|
|
break;
|
|
|
|
};
|
|
});
|
|
|
|
$(document).ready(
|
|
function(){
|
|
|
|
function checkTime(i) {
|
|
if (i<10) {i = "0" + i}; // add zero in front of numbers < 10
|
|
return i;
|
|
}
|
|
function startTime() {
|
|
var today=new Date();
|
|
var h=today.getHours();
|
|
var m=today.getMinutes();
|
|
var s=today.getSeconds();
|
|
m = checkTime(m);
|
|
s = checkTime(s);
|
|
$("#relogio").text(h+":"+m+":"+s)
|
|
var t = setTimeout(function(){
|
|
startTime()
|
|
}, 500);
|
|
}
|
|
startTime();
|
|
|
|
setTimeout(function() {
|
|
document.location.reload(true);
|
|
}, 30000)
|
|
});
|
|
|
|
</script>
|
|
|