5)){ $recherche_ajax_mode = 1; } $docnum = new explnum($docnum_id); $elements_list.= $this->generate_docnum($docnum, $recherche_ajax_mode); } return $elements_list; } /** * Permet de générer l'affichage d'un élément de liste de type document numérique * @param explnum $docnum * @param bool $recherche_ajax_mode * @return string */ private function generate_docnum($docnum, $recherche_ajax_mode){ global $include_path; if ($docnum->explnum_notice) { $record = new notice($docnum->explnum_notice); } else { $record = new bulletinage($docnum->explnum_bulletin); } $template_path = $include_path.'/templates/explnum_in_list.tpl.html'; if(file_exists($include_path.'/templates/explnum_in_list_subst.tpl.html')){ $template_path = $include_path.'/templates/explnum_in_list_subst.tpl.html'; } if(file_exists($template_path)){ $h2o = new H2o($template_path); $context = array('list_element' => $docnum, 'list_element_record' => $record); return $h2o->render($context); } return ''; } public function is_expandable() { return false; } }