diff --git a/htdocs/hrm/class/evaluation.class.php b/htdocs/hrm/class/evaluation.class.php index 354b909d256..237b4740641 100644 --- a/htdocs/hrm/class/evaluation.class.php +++ b/htdocs/hrm/class/evaluation.class.php @@ -1109,74 +1109,74 @@ class Evaluation extends CommonObject * @param string $action * @param int $selected */ -// public function printObjectLines($action, $selected = 0) -// { -// global $conf, $hookmanager, $langs, $user, $extrafields, $object; -// // TODO We should not use global var for this -// global $inputalsopricewithtax, $usemargins, $disableedit, $disablemove, $disableremove, $outputalsopricetotalwithtax; -// -// // Define usemargins -//// $usemargins = 0; -//// if (!empty($conf->margin->enabled) && !empty($this->element) && in_array($this->element, array('facture', 'facturerec', 'propal', 'commande'))) { -//// $usemargins = 1; -//// } -// -// $num = count($this->lines); -// -// // Line extrafield -// if (!is_object($extrafields)) { -// require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; -// $extrafields = new ExtraFields($this->db); -// } -// $extrafields->fetch_name_optionals_label($this->table_element_line); -// -// $parameters = array('num'=>$num, 'selected'=>$selected, 'table_element_line'=>$this->table_element_line); -// $reshook = $hookmanager->executeHooks('printObjectLineTitle', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks -// if (empty($reshook)) { -// // Output template part (modules that overwrite templates must declare this into descriptor) -// // Note: This is deprecated. If you need to overwrite the tpl file, use instead the hook. -// include dol_buildpath('hrm/core/tpl/objectline_title.tpl.php'); -// } -// -// $i = 0; -// -// print "
\n"; -// foreach ($this->lines as $line) { -// //Line extrafield -// $line->fetch_optionals(); -// -// //if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line))) -// if (is_object($hookmanager)) { // Old code is commented on preceding line. -// if (empty($line->fk_parent_line)) { -// $parameters = array('line'=>$line, 'num'=>$num, 'i'=>$i, 'selected'=>$selected, 'table_element_line'=>$line->table_element); -// $reshook = $hookmanager->executeHooks('printObjectLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks -// } else { -// $parameters = array('line'=>$line, 'num'=>$num, 'i'=>$i, 'selected'=>$selected, 'table_element_line'=>$line->table_element, 'fk_parent_line'=>$line->fk_parent_line); -// $reshook = $hookmanager->executeHooks('printObjectSubLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks -// } -// } -// if (empty($reshook)) { -// $this->printObjectLine($action, $line); -// } -// -// $i++; -// } -// print "\n"; -// } + // public function printObjectLines($action, $selected = 0) + // { + // global $conf, $hookmanager, $langs, $user, $extrafields, $object; + // // TODO We should not use global var for this + // global $inputalsopricewithtax, $usemargins, $disableedit, $disablemove, $disableremove, $outputalsopricetotalwithtax; + // + // // Define usemargins + //// $usemargins = 0; + //// if (!empty($conf->margin->enabled) && !empty($this->element) && in_array($this->element, array('facture', 'facturerec', 'propal', 'commande'))) { + //// $usemargins = 1; + //// } + // + // $num = count($this->lines); + // + // // Line extrafield + // if (!is_object($extrafields)) { + // require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php'; + // $extrafields = new ExtraFields($this->db); + // } + // $extrafields->fetch_name_optionals_label($this->table_element_line); + // + // $parameters = array('num'=>$num, 'selected'=>$selected, 'table_element_line'=>$this->table_element_line); + // $reshook = $hookmanager->executeHooks('printObjectLineTitle', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + // if (empty($reshook)) { + // // Output template part (modules that overwrite templates must declare this into descriptor) + // // Note: This is deprecated. If you need to overwrite the tpl file, use instead the hook. + // include dol_buildpath('hrm/core/tpl/objectline_title.tpl.php'); + // } + // + // $i = 0; + // + // print "\n"; + // foreach ($this->lines as $line) { + // //Line extrafield + // $line->fetch_optionals(); + // + // //if (is_object($hookmanager) && (($line->product_type == 9 && ! empty($line->special_code)) || ! empty($line->fk_parent_line))) + // if (is_object($hookmanager)) { // Old code is commented on preceding line. + // if (empty($line->fk_parent_line)) { + // $parameters = array('line'=>$line, 'num'=>$num, 'i'=>$i, 'selected'=>$selected, 'table_element_line'=>$line->table_element); + // $reshook = $hookmanager->executeHooks('printObjectLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + // } else { + // $parameters = array('line'=>$line, 'num'=>$num, 'i'=>$i, 'selected'=>$selected, 'table_element_line'=>$line->table_element, 'fk_parent_line'=>$line->fk_parent_line); + // $reshook = $hookmanager->executeHooks('printObjectSubLine', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks + // } + // } + // if (empty($reshook)) { + // $this->printObjectLine($action, $line); + // } + // + // $i++; + // } + // print "\n"; + // } -// public function printObjectLine($action, $line) -// { -// global $conf, $langs, $user, $object, $hookmanager; -// global $form; -// global $object_rights, $disableedit, $disablemove, $disableremove; // TODO We should not use global var for this ! -// -// $object_rights = $this->getRights(); -// -// $element = $this->element; -// -// $text = ''; -// $description = ''; -// -// include dol_buildpath('hrm/tpl/objectline_view.tpl.php'); -// } + // public function printObjectLine($action, $line) + // { + // global $conf, $langs, $user, $object, $hookmanager; + // global $form; + // global $object_rights, $disableedit, $disablemove, $disableremove; // TODO We should not use global var for this ! + // + // $object_rights = $this->getRights(); + // + // $element = $this->element; + // + // $text = ''; + // $description = ''; + // + // include dol_buildpath('hrm/tpl/objectline_view.tpl.php'); + // } } diff --git a/htdocs/hrm/class/skill.class.php b/htdocs/hrm/class/skill.class.php index 7cf2d60e88a..b2fe7719564 100644 --- a/htdocs/hrm/class/skill.class.php +++ b/htdocs/hrm/class/skill.class.php @@ -1101,29 +1101,29 @@ class Skill extends CommonObject * @param string $more_class used if we want to add new css class to input * @return string */ -// public function select_skill_type($selected = '', $htmlname = 'code_c_skill_type', $emptyvalue = true, $moreattr = '', $more_class = '') -// { -// global $conf; -// -// $out = ''; -// -// return $out; -// } + // public function select_skill_type($selected = '', $htmlname = 'code_c_skill_type', $emptyvalue = true, $moreattr = '', $more_class = '') + // { + // global $conf; + // + // $out = ''; + // + // return $out; + // } /** * @param int $code number of code label diff --git a/htdocs/hrm/class/skillrank.class.php b/htdocs/hrm/class/skillrank.class.php index 094eea1736e..2f0e2b5d0dd 100644 --- a/htdocs/hrm/class/skillrank.class.php +++ b/htdocs/hrm/class/skillrank.class.php @@ -1077,10 +1077,10 @@ class SkillRank extends CommonObject * @param string $morecss * @return string */ -// public function showOutputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = '') -// { -// if ($key == "rank") { -// return displayRankInfos($this); -// } else return parent::showOutputField($val, $key, $value, $moreparam, $keysuffix, $keyprefix, $morecss); -// } + // public function showOutputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = '') + // { + // if ($key == "rank") { + // return displayRankInfos($this); + // } else return parent::showOutputField($val, $key, $value, $moreparam, $keysuffix, $keyprefix, $morecss); + // } } diff --git a/htdocs/hrm/core/tpl/objectline_view.tpl.php b/htdocs/hrm/core/tpl/objectline_view.tpl.php index e8416c35711..04f4cc48bdd 100644 --- a/htdocs/hrm/core/tpl/objectline_view.tpl.php +++ b/htdocs/hrm/core/tpl/objectline_view.tpl.php @@ -71,13 +71,11 @@ $coldisplay = 0;