File: /home/undanet/dump/data/PortalEmpleo/src/Views/ConvocatoriaListadoTribunalView.php
<html>
<head>
<title>Tribunal de evaluación por Convocatoria</title>
<!--<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous"> !-->
</head>
<body>
<?php
if(isset($data))
{
$_SERVER['HTTPS'] = $_SERVER['HTTPS'] == 'off' ? '' : $_SERVER['HTTPS'];
$root = (!empty($_SERVER['HTTPS']) ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/';
$rootwp = "";
if(isset($_GET['lang']))
{
switch($_GET['lang'])
{
case 'en':
case 'en_GB':
$lang = 'en';
break;
default:
$lang = 'es';
break;
}
}
else {
$lang = 'es';
}
if($lang=='en' || $lang=='en_GB')
{
echo '<label id="lblfiltrar" class="link" onclick ="toggle();">+ Filter</label>';
}
else
{
echo '<label id="lblfiltrar" class="link" onclick ="cambiar();">+ Filtrar</label>';
}
echo '<section id="no-more-tables"><div id="divFiltar" hidden="true">';
if($lang=='en' || $lang=='en_GB')
{
echo '<input id="txtBuscar" type="text" placeholder="Type something to filter" />';
}
else
{
echo '<input id="txtBuscar" type="text" placeholder="Escriba algo para filtrar" />';
}
echo '</div></section>';
echo '<table border="0" class="azul" id="tbResultados"><thead>';
if ( isset($nombreCombo) ){
unset ($nombreCombo);
}
if($lang == 'en')
{
echo '<tr><th>Role</th><th>Evaluator</th><th>Email</th><th class="centrado">Assumes Main Role</th></tr>';
}
else
{
echo '<tr><th>Rol</th><th>Evaluador</th><th>Email</th><th class="centrado">Asume Rol Principal</th></tr>';
}
echo '</thead><tbody>';
if($lang == 'en')
{
foreach ($data['ltribunal'] as $miembrotribunal)
{
echo '<tr class="cebra">';
//echo '<td>' . ($miembrotribunal->getCodigorol())->getRol() . '</td>';
if($miembrotribunal->getEssuplente())
{
echo '<td>Substitute for the ' . ($miembrotribunal->getCodigorol())->getRol() . '</td>';
}
else
{
echo '<td>' . ($miembrotribunal->getCodigorol())->getRol() . '</td>';
}
echo '<td>' . ($miembrotribunal->getCodigousuariowp())->getDisplayName() . '</td>';
echo '<td>' . ($miembrotribunal->getCodigousuariowp())->getUserEmail() . '</td>';
if($miembrotribunal->getAsumerolprincipal())
{
echo '<td class="centrado"><img id="chkAsumeRolPrincipal" name="chkAsumeRolPrincipal" value="chkAsumeRolPrincipal" src="' . $root . $rootwp . 'PortalEmpleo/img/' . 'Tick.gif' . '" width="25" height="25" alt="Assumes Main Rol"/></td>';
}
else
{
if($miembrotribunal->getEssuplente())
{
echo '<td class="centrado">-</td>';
}
else
{
echo '<td></td>';
}
}
echo '</tr>';
}
}
else
{
foreach ($data['ltribunal'] as $miembrotribunal)
{
echo '<tr class="cebra">';
//echo '<td>' . ($miembrotribunal->getCodigorol())->getRol() . '</td>';
if($miembrotribunal->getEssuplente())
{
echo '<td>Substituto/a de ' . ($miembrotribunal->getCodigorol())->getRol() . '</td>';
}
else
{
echo '<td>' . ($miembrotribunal->getCodigorol())->getRol() . '</td>';
}
echo '<td>' . ($miembrotribunal->getCodigousuariowp())->getDisplayName() . '</td>';
echo '<td>' . ($miembrotribunal->getCodigousuariowp())->getUserEmail() . '</td>';
if($miembrotribunal->getAsumerolprincipal())
{
//echo '<td><input type="checkbox" id="chkAsumeRolPrincipal" value="chkAsumeRolPrincipal" checked disabled></td>';
echo '<td class="centrado"><img id="chkAsumeRolPrincipal" name="chkAsumeRolPrincipal" value="chkAsumeRolPrincipal" src="' . $root . $rootwp . 'PortalEmpleo/img/' . 'Tick.gif' . '" width="25" height="25" alt="Asume Rol"/></td>';
}
else
{
//echo '<td><input type="checkbox" id="chkAsumeRolPrincipal" value="chkAsumeRolPrincipal" disabled></td>';
if($miembrotribunal->getEssuplente())
{
echo '<td class="centrado">-</td>';
}
else
{
echo '<td></td>';
}
}
echo '</tr>';
}
}
echo '</tbody></table>';
}
?>
<script language="javascript">
function toggle() {
var lbl = document.getElementById('lblfiltrar');
var divFiltrar = document.getElementById('divFiltar');
if(divFiltrar.hidden)
{
divFiltrar.hidden = false;
lbl.innerHTML = "- Filter";
}
else
{
divFiltrar.hidden = true;
lbl.innerHTML = "+ Filter";
}
}
function cambiar() {
var lbl = document.getElementById('lblfiltrar');
var divFiltrar = document.getElementById('divFiltar');
if(divFiltrar.hidden)
{
divFiltrar.hidden = false;
lbl.innerHTML = "- Filtrar";
}
else
{
divFiltrar.hidden = true;
lbl.innerHTML = "+ Filtrar";
}
}
var busqueda = document.getElementById('txtBuscar');
buscaTabla = function(){
var table = document.getElementById("tbResultados").tBodies[0];
texto = busqueda.value.toLowerCase();
var r=0;
while(row = table.rows[r++])
{
if ( row.innerText.toLowerCase().indexOf(texto) !== -1 )
row.style.display = null;
else
row.style.display = 'none';
}
}
busqueda.addEventListener('keyup', buscaTabla);
</script>
</body>
</html>