From e5742de49d546e44aa55b606414bf2b28b5d836e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 4 Jun 2024 01:18:56 +0200 Subject: [PATCH] Debug v20 --- htdocs/contrat/agenda.php | 10 +++++----- htdocs/contrat/messaging.php | 9 ++++----- 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/htdocs/contrat/agenda.php b/htdocs/contrat/agenda.php index 63eae100841..4a14558c0e9 100644 --- a/htdocs/contrat/agenda.php +++ b/htdocs/contrat/agenda.php @@ -36,6 +36,10 @@ if (isModEnabled('project')) { // Load translation files required by the page $langs->loadLangs(array("companies", "contracts")); +$action = GETPOST('action', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); +$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'contratagenda'; + if (GETPOST('actioncode', 'array')) { $actioncode = GETPOST('actioncode', 'array', 3); if (!count($actioncode)) { @@ -48,8 +52,6 @@ if (GETPOST('actioncode', 'array')) { $search_rowid = GETPOST('search_rowid'); $search_agenda_label = GETPOST('search_agenda_label'); -$action = GETPOST('action', 'alpha'); -$confirm = GETPOST('confirm', 'alpha'); $id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); @@ -222,7 +224,6 @@ if ($object->id > 0) { print dol_get_fiche_end(); - // Actions buttons /*$objthirdparty=$object; @@ -274,8 +275,7 @@ if ($object->id > 0) { $cachekey = 'count_events_thirdparty_'.$object->id; $nbEvent = dol_getcache($cachekey); - print load_fiche_titre($langs->trans("ActionsOnContract").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''), $newcardbutton, ''); - //print_barre_liste($langs->trans("ActionsOnCompany"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $newcardbutton, '', 0, 1, 1); + print_barre_liste($langs->trans("ActionsOnContract"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $newcardbutton, '', 0, 1, 0); // List of all actions $filters = array(); diff --git a/htdocs/contrat/messaging.php b/htdocs/contrat/messaging.php index be189fb2b5d..335146bfce3 100644 --- a/htdocs/contrat/messaging.php +++ b/htdocs/contrat/messaging.php @@ -35,8 +35,10 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/contract.lib.php'; require_once DOL_DOCUMENT_ROOT.'/contrat/class/contrat.class.php'; // Load translation files required by the page -$langs->loadLangs(array('agenda', 'contrat', 'companies')); +$langs->loadLangs(array('agenda', 'contracts', 'companies')); +$action = GETPOST('action', 'alpha'); +$confirm = GETPOST('confirm', 'alpha'); $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'contratagenda'; if (GETPOST('actioncode', 'array')) { @@ -51,8 +53,6 @@ if (GETPOST('actioncode', 'array')) { $search_rowid = GETPOST('search_rowid'); $search_agenda_label = GETPOST('search_agenda_label'); -$action = GETPOST('action', 'alpha'); -$confirm = GETPOST('confirm', 'alpha'); $id = GETPOSTINT('id'); $ref = GETPOST('ref', 'alpha'); @@ -226,10 +226,9 @@ print dol_get_fiche_end(); $morehtmlright = ''; -$morehtmlright = dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/contrat/messaging.php?id='.$object->id, '', 2); +$morehtmlright .= dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/contrat/messaging.php?id='.$object->id, '', 2); $morehtmlright .= dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/contrat/agenda.php?id='.$object->id, '', 1); - if (isModEnabled('agenda')) { if ($user->hasRight('agenda', 'myactions', 'create') || $user->hasRight('agenda', 'allactions', 'create')) { $backtopage = $_SERVER['PHP_SELF'].'?id='.$object->id;