Debug v20

This commit is contained in:
Laurent Destailleur 2024-06-04 01:18:56 +02:00
parent c00ffbcd66
commit e5742de49d
2 changed files with 9 additions and 10 deletions

View file

@ -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) ? '<span class="opacitymedium colorblack paddingleft">('.$nbEvent.')</span>' : ''), $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();

View file

@ -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;