From 0b568aebadeae939fe25eab062cb874a3aaa1161 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 29 Jul 2022 10:41:09 +0200 Subject: [PATCH] Fix missing link to vcal for some tabs of user --- htdocs/contact/card.php | 2 +- htdocs/hrm/skill_tab.php | 8 +++----- htdocs/user/agenda_extsites.php | 6 +++++- htdocs/user/bank.php | 6 +++++- htdocs/user/clicktodial.php | 7 ++++++- htdocs/user/document.php | 6 +++++- htdocs/user/info.php | 6 +++++- htdocs/user/note.php | 6 +++++- htdocs/user/notify/card.php | 6 +++++- htdocs/user/param_ihm.php | 6 +++++- htdocs/user/perms.php | 6 +++++- 11 files changed, 50 insertions(+), 15 deletions(-) diff --git a/htdocs/contact/card.php b/htdocs/contact/card.php index 6650cd140d7..921cc36e807 100644 --- a/htdocs/contact/card.php +++ b/htdocs/contact/card.php @@ -1532,7 +1532,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { } else { //print ''.$langs->trans("NoDolibarrAccess").''; if (!$object->user_id && $user->rights->user->user->creer) { - print ''.img_picto($langs->trans("CreateDolibarrLogin"), 'add').' '.$langs->trans("CreateDolibarrLogin").''; + print ''.img_picto($langs->trans("CreateDolibarrLogin"), 'add', 'class="pictofixedwidth"').$langs->trans("CreateDolibarrLogin").''; } } print ''; diff --git a/htdocs/hrm/skill_tab.php b/htdocs/hrm/skill_tab.php index b2ac9e6bce1..52c45c72848 100644 --- a/htdocs/hrm/skill_tab.php +++ b/htdocs/hrm/skill_tab.php @@ -152,8 +152,6 @@ if (empty($reshook)) { /* * View - * - * Put here all code to build page */ $form = new Form($db); @@ -216,9 +214,9 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea // ------------------------------------------------------------ $linkback = '' . $langs->trans("BackToList") . ''; - $morehtmlref = '
'; - if (isset($object->label)) $morehtmlref.= $object->label; - $morehtmlref .= '
'; + $morehtmlref = ''; + $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); + $morehtmlref .= ''; dol_banner_tab($object, 'id', $linkback, 1, 'rowid', 'rowid', $morehtmlref, '&objecttype='.$objecttype); diff --git a/htdocs/user/agenda_extsites.php b/htdocs/user/agenda_extsites.php index b7d66d2677c..1ea4b88acdd 100644 --- a/htdocs/user/agenda_extsites.php +++ b/htdocs/user/agenda_extsites.php @@ -165,7 +165,11 @@ if ($user->rights->user->user->lire || $user->admin) { $linkback = ''.$langs->trans("BackToList").''; } -dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); +$morehtmlref = ''; +$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); +$morehtmlref .= ''; + +dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref); print '
'; diff --git a/htdocs/user/bank.php b/htdocs/user/bank.php index 0f4fd988f48..9c84f95f6ee 100644 --- a/htdocs/user/bank.php +++ b/htdocs/user/bank.php @@ -307,7 +307,11 @@ if ($action != 'edit' && $action != 'create') { // If not bank account yet, $ac $linkback = ''.$langs->trans("BackToList").''; } - dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); + $morehtmlref = ''; + $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); + $morehtmlref .= ''; + + dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref); print '
'; diff --git a/htdocs/user/clicktodial.php b/htdocs/user/clicktodial.php index 0dd38cc057b..3a2599b8da6 100644 --- a/htdocs/user/clicktodial.php +++ b/htdocs/user/clicktodial.php @@ -43,6 +43,7 @@ $result = restrictedArea($user, 'user', $id, 'user&user', $feature2); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('usercard', 'globalcard')); + /* * Actions */ @@ -104,7 +105,11 @@ if ($id > 0) { $linkback = ''.$langs->trans("BackToList").''; } - dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); + $morehtmlref = ''; + $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); + $morehtmlref .= ''; + + dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref); print '
'; print '
'; diff --git a/htdocs/user/document.php b/htdocs/user/document.php index 142c44d85fe..5baa2af8c11 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -147,7 +147,11 @@ if ($object->id) { $linkback = ''.$langs->trans("BackToList").''; } - dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); + $morehtmlref = ''; + $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); + $morehtmlref .= ''; + + dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref); print '
'; print '
'; diff --git a/htdocs/user/info.php b/htdocs/user/info.php index f6a0c731e14..f85028927db 100644 --- a/htdocs/user/info.php +++ b/htdocs/user/info.php @@ -76,7 +76,11 @@ if ($user->rights->user->user->lire || $user->admin) { $linkback = ''.$langs->trans("BackToList").''; } -dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); +$morehtmlref = ''; +$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); +$morehtmlref .= ''; + +dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref); $object->info($id); // This overwrite ->ref with login instead of id diff --git a/htdocs/user/note.php b/htdocs/user/note.php index 801cafbbd52..f121a8f1bf1 100644 --- a/htdocs/user/note.php +++ b/htdocs/user/note.php @@ -101,7 +101,11 @@ if ($id) { $linkback = ''.$langs->trans("BackToList").''; } - dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); + $morehtmlref = ''; + $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); + $morehtmlref .= ''; + + dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref); print '
'; diff --git a/htdocs/user/notify/card.php b/htdocs/user/notify/card.php index 3337d846f0b..e047ab74d51 100644 --- a/htdocs/user/notify/card.php +++ b/htdocs/user/notify/card.php @@ -154,7 +154,11 @@ if ($result > 0) { $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', '', '', 0, '', '', 0, ''); + $morehtmlref = ''; + $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); + $morehtmlref .= ''; + + dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref, '', 0, '', '', 0, ''); print '
'; diff --git a/htdocs/user/param_ihm.php b/htdocs/user/param_ihm.php index 7916f4650d2..810955eecf7 100644 --- a/htdocs/user/param_ihm.php +++ b/htdocs/user/param_ihm.php @@ -339,7 +339,11 @@ if ($action == 'edit') { $linkback = ''.$langs->trans("BackToList").''; - dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); + $morehtmlref = ''; + $morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); + $morehtmlref .= ''; + + dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref); print '
'; diff --git a/htdocs/user/perms.php b/htdocs/user/perms.php index e8a4ed41a1c..4248605f53a 100644 --- a/htdocs/user/perms.php +++ b/htdocs/user/perms.php @@ -250,7 +250,11 @@ if ($user->rights->user->user->lire || $user->admin) { $linkback = ''.$langs->trans("BackToList").''; } -dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin); +$morehtmlref = ''; +$morehtmlref .= img_picto($langs->trans("Download").' '.$langs->trans("VCard"), 'vcard.png', 'class="valignmiddle marginleftonly paddingrightonly"'); +$morehtmlref .= ''; + +dol_banner_tab($object, 'id', $linkback, $user->rights->user->user->lire || $user->admin, 'rowid', 'ref', $morehtmlref); print '
';