diff --git a/htdocs/core/modules/modHRM.class.php b/htdocs/core/modules/modHRM.class.php
index b7c4f3309f3..1bf43d9bfe7 100644
--- a/htdocs/core/modules/modHRM.class.php
+++ b/htdocs/core/modules/modHRM.class.php
@@ -80,7 +80,7 @@ class modHRM extends DolibarrModules
// Set this to 1 if module has its own menus handler directory (core/menus)
'menus' => 0,
// Set this to 1 if module overwrite template dir (core/tpl)
- 'tpl' => 1,
+ 'tpl' => 0,
// Set this to 1 if module has its own barcode directory (core/modules/barcode)
'barcode' => 0,
// Set this to 1 if module has its own models directory (core/modules/xxx)
diff --git a/htdocs/hrm/core/tpl/objectline_title.tpl.php b/htdocs/hrm/core/tpl/objectline_title.tpl.php
index 2630a91ea6f..d33f0923335 100644
--- a/htdocs/hrm/core/tpl/objectline_title.tpl.php
+++ b/htdocs/hrm/core/tpl/objectline_title.tpl.php
@@ -55,7 +55,10 @@ if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) {
print '
| ';
}
-// Description
+// Skill type
+print ''.$langs->trans('SkillType').' | ';
+
+// Label skill
print ''.$langs->trans('Label').' | ';
// Description
diff --git a/htdocs/hrm/core/tpl/objectline_view.tpl.php b/htdocs/hrm/core/tpl/objectline_view.tpl.php
index 04f4cc48bdd..9be74a5f38f 100644
--- a/htdocs/hrm/core/tpl/objectline_view.tpl.php
+++ b/htdocs/hrm/core/tpl/objectline_view.tpl.php
@@ -74,7 +74,10 @@ $coldisplay = 0;
if ($line->fk_skill > 0) {
$skill = new Skill($this->db);
$resSkill = $skill->fetch($line->fk_skill);
- if ($resSkill > 0) print $skill->getNomUrl(1);
+ if ($resSkill > 0) {
+ print Skill::typeCodeToLabel($skill->skill_type).'';
+ print ''.$skill->getNomUrl(1);
+ }
}
?>
|
diff --git a/htdocs/hrm/evaluation_card.php b/htdocs/hrm/evaluation_card.php
index 5d16647c243..75c66ca3069 100644
--- a/htdocs/hrm/evaluation_card.php
+++ b/htdocs/hrm/evaluation_card.php
@@ -528,6 +528,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
if (!empty($object->lines)) {
+ $conf->modules_parts['tpl']['hrm']='/hrm/core/tpl/'; // Pour utilisation du tpl hrm sur cet écran
print '';
$object->printObjectLines($action, $mysoc, null, GETPOST('lineid', 'int'), 1, '');
print '
';
@@ -553,55 +554,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
}
-
- // Buttons for actions
-
- if ($action != 'presend' && $action != 'editline') {
- print ''."\n";
- $parameters = array();
- $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
- if ($reshook < 0) {
- setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
- }
-
- if (empty($reshook)) {
- // Send
- if (empty($user->socid)) {
- print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle');
- }
-
- // Back to draft
- if ($object->status == $object::STATUS_VALIDATED) {
- print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd);
- print dolGetButtonAction($langs->trans('Close'), '', 'close', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=close&token='.newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_CLOSED && $permissiontoclose));
- } elseif ($object->status != $object::STATUS_CLOSED) {
- print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd);
- }
-
- if ($object->status == $object::STATUS_CLOSED) {
- print dolGetButtonAction($langs->trans('ReOpen'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken(), '', $permissiontoadd);
- }
-
-
- // Validate
- if ($object->status == $object::STATUS_DRAFT) {
- if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) {
- print dolGetButtonAction($langs->trans('Save').' '.$langs->trans('and').' '.$langs->trans('Valid'), '', 'default', '#', 'btn_valid', $permissiontovalidate);
- } else {
- $langs->load("errors");
- print dolGetButtonAction($langs->trans("ErrorAddAtLeastOneLineFirst"), $langs->trans("Validate"), 'default', '#', '', 0);
- }
- }
-
-
- // Delete (need delete permission, or if draft, just need create/modify permission)
- print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete);
- }
-
-
- print '
'."\n";
- }
-
// list of comparison
if ($object->status != Evaluation::STATUS_DRAFT) {
// Recovery of skills related to this evaluation
@@ -664,7 +616,6 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
$num++;
}
- print load_fiche_titre($langs->trans("SkillList"), '', 'title');
print '';
print '';
@@ -706,7 +657,52 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
}
}
+ // Buttons for actions
+ if ($action != 'presend' && $action != 'editline') {
+ print ''."\n";
+ $parameters = array();
+ $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
+ if ($reshook < 0) {
+ setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
+ }
+ if (empty($reshook)) {
+ // Send
+ if (empty($user->socid)) {
+ print dolGetButtonAction($langs->trans('SendMail'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=presend&mode=init&token='.newToken().'#formmailbeforetitle');
+ }
+
+ // Back to draft
+ if ($object->status == $object::STATUS_VALIDATED) {
+ print dolGetButtonAction($langs->trans('SetToDraft'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=confirm_setdraft&confirm=yes&token='.newToken(), '', $permissiontoadd);
+ print dolGetButtonAction($langs->trans('Close'), '', 'close', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=close&token='.newToken(), '', $permissiontodelete || ($object->status == $object::STATUS_CLOSED && $permissiontoclose));
+ } elseif ($object->status != $object::STATUS_CLOSED) {
+ print dolGetButtonAction($langs->trans('Modify'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=edit&token='.newToken(), '', $permissiontoadd);
+ }
+
+ if ($object->status == $object::STATUS_CLOSED) {
+ print dolGetButtonAction($langs->trans('ReOpen'), '', 'default', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=reopen&token='.newToken(), '', $permissiontoadd);
+ }
+
+
+ // Validate
+ if ($object->status == $object::STATUS_DRAFT) {
+ if (empty($object->table_element_line) || (is_array($object->lines) && count($object->lines) > 0)) {
+ print dolGetButtonAction($langs->trans('Save').' '.$langs->trans('and').' '.$langs->trans('Valid'), '', 'default', '#', 'btn_valid', $permissiontovalidate);
+ } else {
+ $langs->load("errors");
+ print dolGetButtonAction($langs->trans("ErrorAddAtLeastOneLineFirst"), $langs->trans("Validate"), 'default', '#', '', 0);
+ }
+ }
+
+
+ // Delete (need delete permission, or if draft, just need create/modify permission)
+ print dolGetButtonAction($langs->trans('Delete'), '', 'delete', $_SERVER['PHP_SELF'].'?id='.$object->id.'&action=delete&token='.newToken(), '', $permissiontodelete);
+ }
+
+
+ print '
'."\n";
+ }
// Select mail models is same action as presend
if (GETPOST('modelselected')) {