Example #1
0
    $length = CMbDT::minutesRelative($_astreinte->start, $_astreinte->end);
    //not in the current group
    $_astreinte->loadRefUser();
    $_astreinte->loadRefColor();
    $libelle = "<span style=\"text-align:center;\">";
    $libelle .= $_astreinte->libelle ? "<strong>{$_astreinte->libelle}</strong><br/>" : null;
    $libelle .= $_astreinte->_ref_user . '<br/>' . $_astreinte->phone_astreinte . "</span>";
    $libelle = CMbString::purifyHTML($libelle);
    $plage = new CPlanningEvent($_astreinte->_guid, $_astreinte->start, $length, $libelle, "#" . $_astreinte->_color, true, 'astreinte', false, false);
    $plage->setObject($_astreinte);
    $plage->plage["id"] = $_astreinte->_id;
    $plage->type = $_astreinte->type;
    $plage->end = $_astreinte->end;
    $plage->display_hours = true;
    if ($_astreinte->getPerm(PERM_EDIT)) {
        $plage->addMenuItem("edit", utf8_encode("Modifier l'astreinte"));
    }
    //add the event to the planning
    $calendar->addEvent($plage);
}
$calendar->hour_min = "00";
$calendar->rearrange();
//smarty
$smarty = new CSmartyDP();
$smarty->assign("date", $date);
$smarty->assign("next", $date_next);
$smarty->assign("prev", $date_prev);
$smarty->assign("planning", $calendar);
$smarty->assign("height_planning_astreinte", CAppUI::pref("planning_resa_height", 1500));
$smarty->assign("mode", $mode);
$smarty->display("vw_calendar.tpl");
        $_plage->loadRefChir()->loadRefFunction();
        $_plage->loadRefSpec();
        $_plage->loadRefAnesth()->loadRefFunction();
        $debut = "{$i} " . CMbDT::time($_plage->debut);
        $duree = CMbDT::minutesRelative(CMbDT::time($_plage->debut), CMbDT::time($_plage->fin));
        //fetch
        $smarty = new CSmartyDP("modules/reservation");
        $smarty->assign("plageop", $_plage);
        $smarty_plageop = $smarty->fetch("inc_planning/libelle_plageop.tpl");
        $smarty_plageop = htmlspecialchars_decode(CMbString::htmlEntities($smarty_plageop, ENT_NOQUOTES), ENT_NOQUOTES);
        $event = new CPlanningEvent($_plage->_guid, $debut, $duree, $smarty_plageop, "#efbf99", true, null, $_plage->_guid, false);
        $event->below = true;
        $event->type = "plage_planning";
        $event->plage["id"] = $_plage->_id;
        if ($can_edit) {
            $event->addMenuItem("edit", CMbString::htmlEntities("Modifier cette plage"));
            $event->addMenuItem("list", CMbString::htmlEntities("Gestion des interventions"));
        }
        $planning->addEvent($event);
    }
}
$m = $save_m;
$planning->rearrange(true);
//ReArrange the planning
$bank_holidays = CMbDate::getHolidays($date_planning);
$smarty = new CSmartyDP();
$smarty->assign("planning", $planning);
$smarty->assign("salles", $salles);
$smarty->assign("salles_ids", $salles_ids);
$smarty->assign("date_planning", $date_planning);
$smarty->assign("scroll_top", $scroll_top);
 $event->plage["id"] = $_plage->_id;
 $event->plage["consult_id"] = $_consult->_id;
 if ($_plage->locked == 1) {
     $event->disabled = true;
 }
 $_consult->loadRefCategorie();
 if ($_consult->categorie_id) {
     $event->icon = "./modules/dPcabinet/images/categories/" . $_consult->_ref_categorie->nom_icone;
     $event->icon_desc = CMbString::htmlEntities($_consult->_ref_categorie->nom_categorie);
 }
 if ($_consult->_id) {
     $event->draggable = $can_edit;
     $freq = $_plage->freq ? CMbDT::transform($_plage->freq, null, "%M") : 1;
     $event->hour_divider = 60 / $freq;
     if ($can_edit) {
         $event->addMenuItem("copy", "Copier cette consultation");
         $event->addMenuItem("cut", "Couper cette consultation");
         if ($_consult->patient_id) {
             $event->addMenuItem("add", "Ajouter une consultation");
             if ($_consult->chrono == CConsultation::PLANIFIE) {
                 $event->addMenuItem("tick", CMbString::htmlEntities("Notifier l'arrivée"));
             }
             if ($_consult->chrono == CConsultation::PATIENT_ARRIVE) {
                 $event->addMenuItem("tick_cancel", CMbString::htmlEntities("Annuler l'arrivée"));
             }
         }
     }
 }
 //Ajout de l'évènement au planning
 $event->plage["color"] = $_plage->color;
 $event->below = 0;
Example #4
0
     } elseif ($_plage->remplacant_id && !$_plage->remplacant_ok) {
         $color = "#FDA";
     } elseif ($_plage->remplacant_id && $_plage->remplacant_ok) {
         $color = "#BFB";
     }
 } elseif ($_plage->pour_compte_id) {
     $color = "#EDC";
 }
 $class = null;
 if ($_plage->pour_tiers) {
     $class = "pour_tiers";
 }
 $event = new CPlanningEvent($_plage->_guid, $debute, CMbDT::minutesRelative($_plage->debut, $_plage->fin), $libelle, $color, true, $class, null);
 $event->useHeight = true;
 //Menu des évènements
 $event->addMenuItem("list", "Voir le contenu de la plage");
 $nonRemplace = !$_plage->remplacant_id || $_plage->remplacant_id != $chirSel || $_plage->remplacant_id == $chirSel && $_plage->chir_id == $chirSel;
 $nonDelegue = !$_plage->pour_compte_id || $_plage->pour_compte_id != $chirSel || $_plage->pour_compte_id == $chirSel && $_plage->chir_id == $chirSel;
 if ($nonRemplace && $nonDelegue && $_plage->getPerm(PERM_EDIT)) {
     $event->addMenuItem("edit", "Modifier cette plage");
 }
 $event->addMenuItem("clock", "Planifier une consultation dans cette plage");
 //Paramètres de la plage de consultation
 $event->type = "consultation";
 $event->plage["id"] = $_plage->plageconsult_id;
 $pct = $_plage->_fill_rate;
 if ($pct > "100") {
     $pct = "100";
 }
 if ($pct == "") {
     $pct = 0;
Example #5
0
            $event->plage["consult_id"] = $_consult->_id;
            if ($_plage->locked == 1) {
                $event->disabled = true;
            }
            $_consult->loadRefCategorie();
            if ($_consult->categorie_id) {
                $event->icon = "./modules/dPcabinet/images/categories/" . $_consult->_ref_categorie->nom_icone;
                $event->icon_desc = CMbString::htmlEntities($_consult->_ref_categorie->nom_categorie);
            }
            if ($_consult->patient_id) {
                $event->draggable = 1;
                $event->hour_divider = 60 / CMbDT::transform($_plage->freq, null, "%M");
            }
            if ($_consult->canDo()->edit) {
                if ($_consult->chrono == 16) {
                    $event->addMenuItem("tick", CMbString::htmlEntities("Notifier l'arrivée"));
                }
                if ($_consult->chrono == 32) {
                    $event->addMenuItem("tick_cancel", CMbString::htmlEntities("Annuler l'arrivée"));
                }
            }
            //Ajout de l'évènement au planning
            $event->plage["color"] = $_plage->color;
            $planning->addEvent($event);
        }
    }
    $i++;
}
//$planning->allow_superposition = 1 ;
$planning->rearrange(true);
// smarty