Commit b6b8670d authored by Jeroen's avatar Jeroen

Employee table will now be a list on mobile devices

parent 134c14cc
Pipeline #1347 passed with stage
in 1 second
@media all and (max-width: 995px) {
.employee-table{
display: none;
}
.employee-list{
display: block !important;
}
}
.employee-list{
display: none;
}
body{
background-color: white;
font-size: 17px;
......
......@@ -93,7 +93,7 @@
if(!empty($employees)){
?>
<table class="table">
<table class="table employee-table">
<tr>
<th><?php echo L::name ?></th>
<th><?php echo L::nickname ?></th>
......@@ -127,6 +127,36 @@
}
?>
</table>
<div class="employee-list">
<?php
foreach( $employees as $e ) {
$eMeta = $o->getEmployeeMeta($e);
$eMeta['expertise'] = array_map('ucfirst', $eMeta['expertise']);
$expertise = implode(', ', $eMeta['expertise']);
$email = $eMeta['info']['email'];
?>
<h4><?php echo $eMeta['info']['name'] ?></h4>
<ul>
<li><b><?php echo L::nickname ?>:</b> <?php
if ( $eMeta['info']['nickname'] !== '' ) {
echo $eMeta['info']['nickname'];
} else {
echo '';
}
?>
</li>
<li><b><?php echo L::email ?>: </b> <a href="mailto:<?php echo $email ?>"><?php echo $eMeta['info']['email']?></a></li>
<li><b><?php echo L::pgp_id ?>: </b><a href="https://pgp.mit.edu/pks/lookup?search=0x<?php echo $eMeta['info']['pgp_id']?>&op=index" target="_blank" rel="noopener noreferrer"><?php echo $eMeta['info']['pgp_id']?> </a></li>
<li><b><?php echo L::expertise ?>: </b><?php echo $expertise ?></li>
<li><b><?php echo L::contract_hours_per_week ?>: </b><?php echo $eMeta['info']['contract_hours_per_week'] ?></li>
<li><b><?php echo L::usual_hours_per_week ?>: </b><?php echo $eMeta['info']['usual_hours_per_week'] ?></li>
</ul>
<?php
}
?>
</div>
<?php
}else{
echo '<div class="alert alert-warning"><b>'.L::no_employees.'</b></div>';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment