FIX : restore link to hrm establishment tab

This commit is contained in:
Gauthier PC portable 024 2021-10-03 12:34:47 +02:00
parent 753644a024
commit a6c854cb59
3 changed files with 13 additions and 5 deletions

View File

@ -191,7 +191,7 @@ if ($action == 'update') {
$form = new Form($db);
$help_url = '';
$page_name = "HrmSetup";
$page_name = "HRMSetup";
llxHeader('', $langs->trans($page_name), $help_url);

View File

@ -21,7 +21,7 @@
* \brief HRM Establishment module setup page
*/
require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/hrm.lib.php';
require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm.lib.php';
require_once DOL_DOCUMENT_ROOT.'/hrm/class/establishment.class.php';
// Load translation files required by the page
@ -80,12 +80,12 @@ $limit = GETPOST('limit', 'int') ?GETPOST('limit', 'int') : $conf->liste_limit;
// Subheader
$linkback = '<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
print load_fiche_titre($langs->trans("HRMSetup"), $linkback);
print load_fiche_titre($langs->trans("HRMSetup"), $linkback, 'title_setup');
$newcardbutton = dolGetButtonTitle($langs->trans('NewEstablishment'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/hrm/establishment/card.php?action=create&backtopage='.urlencode($_SERVER['PHP_SELF']), '', $permissiontoadd);
// Configuration header
$head = hrm_admin_prepare_head();
$head = hrmAdminPrepareHead();
print dol_get_fiche_head($head, 'establishments', $langs->trans("HRM"), -1, "user", 0, $newcardbutton);
$sql = "SELECT e.rowid, e.rowid as ref, e.label, e.address, e.zip, e.town, e.status";

View File

@ -43,6 +43,11 @@ function hrmAdminPrepareHead()
$head[$h][2] = 'settings';
$h++;
$head[$h][0] = DOL_URL_ROOT.'/hrm/admin/admin_establishment.php';
$head[$h][1] = $langs->trans("Establishments");
$head[$h][2] = 'establishments';
$h++;
/*
$head[$h][0] = dol_buildpath("/workstation/admin/myobject_extrafields.php", 1);
$head[$h][1] = $langs->trans("ExtraFields");
@ -63,7 +68,10 @@ function hrmAdminPrepareHead()
//$this->tabs = array(
// 'entity:-tabname:Title:@workstation:/workstation/mypage.php?id=__ID__'
//); // to remove a tab
complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm');
complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm_admin');
complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm_admin', 'remove');
return $head;
}