2012-05-11 20:25:55 +00:00

74 lines
2.2 KiB
PHTML

<style>
.color {
background-color:#DEDEDE;
}
#criteres {
border: 1px solid;
padding:10px 0;
}
#criteres tr td {
border-left: 1px solid black;
border-right: 1px solid black;
padding-left:5px;
}
</style>
<h2 style="text-align:center; background-color:#182838; padding:5px; color:white;">Résumé de vos critères</h2>
<div id="criteres">
<?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);} ?>
<div style="width:100%;" class="clearfix<?php echo ((($color%2) == 0) ? ' color' : ''); $color++; ?>">
<div style="float:left; margin:2px 0;">
<?=$label['label'];?>
<?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; ?>
</div>
<div style="height:16px; width:16px; float:right;">
<a class="remove" href="index/remove/critere/<?=$critere;?>">
<img src="/themes/default/images/cross.png" />
</a>
</div>
</div>
<?php endif;?>
<?php endforeach;?>
</div>
<div style="text-align:center; border:1px solid #ffffff; background-color:#182838; padding:5px;">
<a style="color:white; text-decoration:none;" href="/comptage/reset">Initialiser les critères</a>
</div>
<div style="text-align:center; border:1px solid #ffffff; background-color:#182838; padding:5px;">
<a style="color:white; text-decoration:none;" class="saveciblage" href="/comptage/savedialog">Sauvegarder</a>
</div>
<div style="text-align:center; border:1px solid #ffffff; background-color:#182838; padding:5px;">
<a style="color:white; text-decoration:none;" class="previsualisation" href="/comptage/previsualisation">Prévisualisation</a>
</div>