70 lines
2.0 KiB
PHTML

<style>
.color {
background-color:#DEDEDE;
}
a
{
text-decoration: none;
}
#criteres_ra
{
width:93%;
font-size: 11px;
}
#criteres_ra tr td {
border-left: 1px solid black;
border-right: 1px solid black;
padding-left:5px;
}
</style>
<table id="criteres_ra" style="margin:10px">
<tr>
<td class="Valide" style="text-align: center" colspan="3">
<a class="previsualisation" href="/comptage/previsualisation">Prévisualisation</a>
</td>
</tr>
<?php $color = 0;foreach($this->criteres as $critere => $valeur):?>
<?php $label = $this->field->get($critere); ?>
<?php if($valeur != 'tous' and $valeur != null and $valeur != 'null' and $valeur != ',' and !empty($valeur)):?>
<?php if(!is_array($valeur)) {$valeur = explode(',', $valeur);} ?>
<tr <?php echo ((($color%2) == 0)?'class="color"':''); $color++;?>>
<td valign="top" style="padding:5px;width:150px">
<?php echo $label['label'];?>
</td>
<td>
<?php if(is_array($valeur)):?>
<?php $i=0; foreach ($valeur as $val):?>
<?php if($i>5)break; ?>
<?php if($label['type'] != 'textarea' and $label['type'] != 'interval' and $label['type'] != 'intervalSelect') :?>
<?php echo $label['fields'][$label['type']]['value'][$val];?> <?php (($i%3 == 0)?'<br />':''); $i++;?>
<?php else :?>
<?php
if($label['type'] == 'interval') {
if(empty($val)) {
echo '-';
} else
echo $val;
} else
echo $val.', ';
?>
<?php $i++; endif;?>
<?php endforeach;?>
<?php else: ?>
<?php echo $val;?>
<?php endif; ?>
</td>
<td style="text-align: center">
<a class="remove" href="index/remove/critere/<?php echo $critere;?>">
<img width="14px;" src="/themes/default/images/cross.png" />
</a>
<img src="/themes/default/images/help.png" />
</td>
</tr>
<?php endif;?>
<?php endforeach;?>
<tr>
<td class="Valide" style="text-align: center" colspan="3">
<a class="saveciblage" href="/comptage/savedialog">Valider mon comptage</a></td>
</tr>
</table>