} } $group = CGroups::loadCurrent(); // Liste des Thèmes $theme = new CThemeDoc(); $where = array(); $where[] = "group_id = '{$group->_id}' OR group_id IS NULL"; /** @var CThemeDoc[] $listThemes */ $listThemes = $theme->loadlist($where, "nom"); // Liste des chapitres $chapitre = new CChapitreDoc(); $order = "group_id, nom"; $where = array(); $where["pere_id"] = "IS NULL"; $where[] = "group_id = '{$group->_id}' OR group_id IS NULL"; /** @var CChapitreDoc[] $listChapitres */ $listChapitres = $chapitre->loadlist($where, $order); foreach ($listChapitres as $_chapitre) { $_chapitre->loadChapsDeep(); } // Création du template $smarty = new CSmartyDP(); $smarty->assign("theme_id", $theme_id); $smarty->assign("chapitre_id", $chapitre_id); $smarty->assign("listThemes", $listThemes); $smarty->assign("listChapitres", $listChapitres); $smarty->assign("docGed", $docGed); $smarty->assign("fileSel", new CFile()); $smarty->assign("sort_by", $sort_by); $smarty->assign("sort_way", $sort_way); $smarty->display("vw_procedures.tpl");
$where[] = "group_id = '{$docGed->group_id}' OR group_id IS NULL"; } else { $where["group_id"] = "IS NULL"; } $listThemes = $theme->loadlist($where, "group_id, nom"); // Liste des Chapitres $chapitre = new CChapitreDoc(); $where = array(); $where["pere_id"] = "IS NULL"; if ($docGed->group_id) { $where[] = "group_id = '{$docGed->group_id}' OR group_id IS NULL"; } else { $where["group_id"] = "IS NULL"; } /** @var CChapitreDoc[] $listChapitres */ $listChapitres = $chapitre->loadlist($where, "group_id, code"); foreach ($listChapitres as &$_chapitre) { $_chapitre->loadChapsDeep(); } } $docGed->loadLastEntry(); // Procédure en Cours de demande $procDemande = CDocGed::loadProcDemande(); foreach ($procDemande as $keyProc => $currProc) { $procDemande[$keyProc]->loadRefs(); $procDemande[$keyProc]->getEtatRedac(); $procDemande[$keyProc]->loadLastActif(); $procDemande[$keyProc]->loadLastEntry(); } // Procédure non terminé Hors demande $procEnCours = CDocGed::loadProcRedacAndValid();