initial commit of code
This commit is contained in:
parent
9b00433142
commit
17d2c64f66
13 changed files with 1928 additions and 0 deletions
56
templates/bazar/trajets-demandes.tpl.html
Normal file
56
templates/bazar/trajets-demandes.tpl.html
Normal file
|
@ -0,0 +1,56 @@
|
|||
<?php
|
||||
setlocale(LC_ALL, 'fr_FR.UTF8', 'fr_FR','fr','fr','fra','fr_FR@euro');
|
||||
setlocale(LC_TIME, "fr_FR");
|
||||
if (count($fiches) > 0) : ?>
|
||||
<?php echo '<h4>Des demandes de trajets sont en cours !</h4>'; ?>
|
||||
<?php
|
||||
echo '<div class="panel-group" id="accordion-demandes" role="tablist" aria-multiselectable="true">';
|
||||
foreach ($fiches as $fiche): ?>
|
||||
<?php
|
||||
$dateOuverture = date(DATE_W3C, strtotime($fiche['date_souhaitee']));
|
||||
$dateFin = date(DATE_W3C, strtotime($fiche['date_souhaitee_fin']));
|
||||
$dateJour = date(DATE_W3C);
|
||||
if ($dateJour<$dateFin) {
|
||||
$statut = 'Ouvert';
|
||||
}
|
||||
if ($statut== 'Ouvert' ) {
|
||||
// récuperer la fiche producteur
|
||||
$producteur = baz_valeurs_fiche($fiche['listefiche8producteur']);
|
||||
|
||||
$dateTimeObj = new DateTime($fiche['date_souhaitee'], new DateTimeZone('Europe/Paris'));
|
||||
$date_souhaitee =
|
||||
str_replace(' à 0:00', '', IntlDateFormatter::formatObject(
|
||||
$dateTimeObj,
|
||||
'eeee d MMMM y à HH:mm',
|
||||
'fr'
|
||||
));
|
||||
$dateTimeObj = new DateTime($fiche['date_souhaitee_fin'], new DateTimeZone('Europe/Paris'));
|
||||
$date_souhaitee_fin =
|
||||
str_replace(' à 0:00', '', IntlDateFormatter::formatObject(
|
||||
$dateTimeObj,
|
||||
'eeee d MMMM y à HH:mm',
|
||||
'fr'
|
||||
));
|
||||
|
||||
echo '<div class="bazar-entry panel panel-default collapsed" '.$fiche['html_data'].'>
|
||||
<div class="panel-heading collapsed"
|
||||
data-target="#collapse'.$fiche['id_fiche'].'"
|
||||
data-toggle="collapse">
|
||||
<h4 class="panel-title">
|
||||
Trajet demandé pour '.$producteur['bf_titre'].'<br /><span style="color:#222">du '.$date_souhaitee.' au '.$date_souhaitee_fin.'</span>
|
||||
</h4>
|
||||
</div>
|
||||
<div id="collapse'.$fiche['id_fiche'].'" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading'.$fiche['id_fiche'].'">
|
||||
<div class="panel-body">
|
||||
'.baz_voir_fiche(true, $fiche).'
|
||||
</div>
|
||||
</div>
|
||||
</div>';
|
||||
?>
|
||||
<?php }
|
||||
endforeach; ?>
|
||||
</div>
|
||||
<?php echo $pager_links; ?>
|
||||
<?php else: ?>
|
||||
<?php echo '<h4>Pour info, aucun habitant n\'a demandé un trajet particulier actuellement.</h4>'; ?>
|
||||
<?php endif; ?>
|
Loading…
Add table
Add a link
Reference in a new issue