feat date contrainte

This commit is contained in:
Florian Schmitt 2024-12-02 12:16:30 +03:00
parent 425050bcc7
commit b1033943a5

View file

@ -18,9 +18,19 @@ if (count($fiches) > 0) {
'fr' 'fr'
)); ));
$foundFiche = true; $foundFiche = true;
//$date = str_replace(' à 0:00', '', strftime("%A %d %B %Y à %k:%M", strtotime($fiche['date_du_trajet'])));
echo '<h2 class="entry-title"><a class="modalbox" title="'.htmlspecialchars('Trajet du '.$date).'" href="'.$GLOBALS['wiki']->href('', $fiche['id_fiche']).'">Trajet du '.$dateFormatted.'</a> par '.$fiche['owner'].'</h2>'."\n"; echo '<h2 class="entry-title"><a class="modalbox" title="'.htmlspecialchars('Trajet du '.$date).'" href="'.$GLOBALS['wiki']->href('', $fiche['id_fiche']).'">Trajet du '.$dateFormatted.'</a> par '.$fiche['owner'].'</h2>'."\n";
echo '<h4>Producteur concerné</h4>'."\n"; echo '<h4>Producteur concerné</h4>'."\n";
if (!empty($fiche['bf_contrainte_date'])) {
$dateTimeObjContrainte = new DateTime($fiche['bf_contrainte_date'], new DateTimeZone('Europe/Paris'));
$dateContrainte =
str_replace(' à 0:00', '', IntlDateFormatter::formatObject(
$dateTimeObjContrainte,
'eeee d MMMM y à HH:mm',
'fr'
));
echo '<div class="alert alert-warning">Pour laisser le temps au producteur de préparer les commandes, ce trajet sera fermé le '.$dateContrainte.'.</div>';
}
echo '<p class="producteur"><strong>'.$producteur['bf_titre'].'</strong></p>'; echo '<p class="producteur"><strong>'.$producteur['bf_titre'].'</strong></p>';
echo '<p class="nature"><strong>Produits possibles</strong> : '.str_replace(',', ', ', $producteur['checkboxListeProduitsVendusproduits_vendus']).'</p>'; echo '<p class="nature"><strong>Produits possibles</strong> : '.str_replace(',', ', ', $producteur['checkboxListeProduitsVendusproduits_vendus']).'</p>';