<?php if ($tab_jour): ?>
<div class="list-group text-start">
  <?php foreach ($tab_jour as $key => $jour): ?>
    <?php if (count($jour)>0): ?>
      <?php foreach ($jour as $key2 => $rdv): ?>
        <a href="javascript:detailsRDV(<?=$rdv['id'];?>);" class="list-group-item list-group-item-action icon-user" style="background-color:<?=$rdv['bg_color'];?>;">
           <div style="float:right;">
             <button type="button" class="btn btn-sm btn-info icon-arrow-left p-0 px-1" onclick="javascript:makeNotEffectuee(<?=$rdv['id'];?>);return false;"> rebasculer</button>
           </div>
           <?=$rdv['patient']['nom'];?> <?=$rdv['patient']['prenom'];?>
           <?php if ($rdv['patient']['prescription']['acte']): ?>
             <div class="" style="font-size:0.7em;line-height:1;">
               <?php
                 // if($rdv['petit_matin']>0) echo "<span class=\"text-primary icon-alarm\" title=\"PETIT MATIN\"></span>" ;
                 // if($rdv['mms']>0) echo "<span class=\"text-success icon-loop2\" title=\"MATIN MIDI SOIR\"></span>" ;
               ?>
               <?php if ($rdv['petit_matin']>0): ?>
                 <span class="p-0 px-1 rounded m-1 icon-alarm" style="border:1px solid #42f2f5;background-color:#42f2f5;font-size:1.3em;color:#000000;"> Petit matin</span>
               <?php endif; ?>
               <?php if ($rdv['matin']>0): ?>
                 <span class="p-0 px-1 rounded m-1 icon-alarm" style="border:1px solid #42b9f5;color:#42b9f5;"> Matin</span>
               <?php endif; ?>
               <?php if ($rdv['midi']>0): ?>
                 <span class="p-0 px-1 rounded m-1 icon-alarm" style="border:1px solid #9ec2e8;color:#9ec2e8;"> Midi</span>
               <?php endif; ?>
               <?php if ($rdv['soir']>0): ?>
                 <span class="p-0 px-1 rounded m-1 icon-alarm" style="border:1px solid #e4cdf7;color:#e4cdf7;"> Soir</span>
               <?php endif; ?>
              <span class="p-0 px-1 rounded m-1" style="<?=((null!==$rdv['patient']['prescription']['acte']['couleur'] && $rdv['patient']['prescription']['acte']['couleur']!="")?"color:".$rdv['patient']['prescription']['acte']['couleur'].";border:1px solid ".$rdv['patient']['prescription']['acte']['couleur'].";":"border:1px solid #000000;color:#000000;");?>"><?=$rdv['patient']['prescription']['acte']['abrev'];?></span>
              <?php if ($rdv['frequence']!==null): ?>
                <span style="color:#fc0307;">F: <?=$rdv['frequence']['libel'];?></span>
              <?php endif; ?>
             </div>
           <?php endif; ?>

           <?php if (null!==$rdv['horaire_souhaite'] && $rdv['horaire_souhaite']!=""): ?>
             <div class="form-text text-warning">
               <?=nl2br($rdv["horaire_souhaite"]);?>
             </div>
           <?php endif; ?>

        </a>
      <?php endforeach; ?>
    <?php else: ?>
      <p>Aucun RDV effectué ce jour</p>
    <?php endif; ?>
  <?php endforeach; ?>
</div>
<?php endif; ?>
