diff --git a/htdocs/core/class/html.formactions.class.php b/htdocs/core/class/html.formactions.class.php index 2aab803bf17..22757699074 100644 --- a/htdocs/core/class/html.formactions.class.php +++ b/htdocs/core/class/html.formactions.class.php @@ -190,17 +190,7 @@ class FormActions $num = count($listofactions); if ($num || $forceshowtitle) { - if ($typeelement == 'invoice_supplier' || $typeelement == 'supplier_invoice') { - $title = $langs->trans('ActionsOnBill'); - } elseif ($typeelement == 'supplier_proposal') { - $title = $langs->trans('ActionsOnSupplierProposal'); - } elseif ($typeelement == 'order_supplier' || $typeelement == 'supplier_order') { - $title = $langs->trans('ActionsOnOrder'); - } elseif ($typeelement == 'shipping') { - $title = $langs->trans('ActionsOnShipping'); - } else { - $title = $langs->trans("LatestLinkedEvents", $max ? $max : ''); - } + $title = $langs->trans("LatestLinkedEvents", $max ? $max : ''); $urlbacktopage = $_SERVER['PHP_SELF'].'?id='.$object->id.($moreparambacktopage ? '&'.$moreparambacktopage : ''); diff --git a/htdocs/core/lib/project.lib.php b/htdocs/core/lib/project.lib.php index b21b2d8114b..412535d0691 100644 --- a/htdocs/core/lib/project.lib.php +++ b/htdocs/core/lib/project.lib.php @@ -312,7 +312,7 @@ function project_prepare_head(Project $project, $moreparam = '') } else { require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php'; - $upload_dir = $conf->project->multidir_output[$project->entity]."/".dol_sanitizeFileName($project->ref); + $upload_dir = $conf->project->multidir_output[empty($project->entity) ? 1 : $project->entity]."/".dol_sanitizeFileName($project->ref); $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$')); $nbLinks = Link::count($db, $project->element, $project->id); $totalAttached = $nbFiles + $nbLinks; diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index 378388f437b..db28e1c69bc 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -298,12 +298,12 @@ LinesToImport=Lines to import MemoryUsage=Memory usage RequestDuration=Duration of request -ProductsServicesPerPopularity=Products/Services by popularity +ProductsServicesPerPopularity=Products|Services by popularity ProductsPerPopularity=Products by popularity ServicesPerPopularity=Services by popularity -PopuProp=Products/Services by popularity in Proposals -PopuCom=Products/Services by popularity in Orders -ProductStatistics=Products/Services Statistics +PopuProp=Products|Services by popularity in Proposals +PopuCom=Products|Services by popularity in Orders +ProductStatistics=Products|Services Statistics NbOfQtyInOrders=Qty in orders SelectTheTypeOfObjectToAnalyze=Select an object to view its statistics... diff --git a/htdocs/modulebuilder/template/myobject_agenda.php b/htdocs/modulebuilder/template/myobject_agenda.php index 00c5b9d1bc7..5f60eeca0db 100644 --- a/htdocs/modulebuilder/template/myobject_agenda.php +++ b/htdocs/modulebuilder/template/myobject_agenda.php @@ -306,13 +306,16 @@ if ($object->id > 0) { } // Try to know count of actioncomm from cache + $nbEvent = 0; /*require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; $cachekey = 'count_events_myobject_'.$object->id; $nbEvent = dol_getcache($cachekey); print_barre_liste($langs->trans("ActionsOnMyObject").(is_numeric($nbEvent) ? '('.$nbEvent.')': ''), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 1); */ - print_barre_liste($langs->trans("ActionsOnMyObject"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); + $titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '('.$nbEvent.')': ''); + + print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); // List of all actions $filters = array(); diff --git a/htdocs/projet/agenda.php b/htdocs/projet/agenda.php index f56aacadadb..fe9b3118f4d 100644 --- a/htdocs/projet/agenda.php +++ b/htdocs/projet/agenda.php @@ -210,13 +210,19 @@ if (!empty($object->id)) { $param = '&id='.$object->id; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { - $param .= '&contextpage='.$contextpage; + $param .= '&contextpage='.urlencode($contextpage); } if ($limit > 0 && $limit != $conf->liste_limit) { - $param .= '&limit='.$limit; + $param .= '&limit='.((int) $limit); } - print_barre_liste($langs->trans("ActionsOnProject"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; + $cachekey = 'count_events_project_'.$object->id; + $nbEvent = dol_getcache($cachekey); + + $titlelist = $langs->trans("ActionsOnProject").(is_numeric($nbEvent) ? '('.$nbEvent.')': ''); + + print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); // List of all actions $filters = array(); diff --git a/htdocs/projet/card.php b/htdocs/projet/card.php index 7852e985c04..d7eee999b0a 100644 --- a/htdocs/projet/card.php +++ b/htdocs/projet/card.php @@ -1633,7 +1633,10 @@ if ($action == 'create' && $user->hasRight('projet', 'creer')) { $MAXEVENT = 10; - $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/projet/messaging.php?id='.$object->id); + $morehtmlcenter = '
'; + $morehtmlcenter .= dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/projet/messaging.php?id='.$object->id); + $morehtmlcenter .= dolGetButtonTitle($langs->trans('FullList'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/projet/agenda.php?id='.$object->id); + $morehtmlcenter .= '
'; // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php index 076dae11a00..d34e236e9ae 100644 --- a/htdocs/projet/class/project.class.php +++ b/htdocs/projet/class/project.class.php @@ -1253,6 +1253,10 @@ class Project extends CommonObject // phpcs:enable global $langs; + if (is_null($status)) { + return ''; + } + $statustrans = array( 0 => 'status0', 1 => 'status4', diff --git a/htdocs/projet/messaging.php b/htdocs/projet/messaging.php index 15506a77602..cf58a2a3813 100644 --- a/htdocs/projet/messaging.php +++ b/htdocs/projet/messaging.php @@ -209,13 +209,19 @@ if (!empty($object->id)) { $param = '&id='.$object->id; if (!empty($contextpage) && $contextpage != $_SERVER["PHP_SELF"]) { - $param .= '&contextpage='.$contextpage; + $param .= '&contextpage='.urlencode($contextpage); } if ($limit > 0 && $limit != $conf->liste_limit) { - $param .= '&limit='.$limit; + $param .= '&limit='.((int) $limit); } - print_barre_liste($langs->trans("ActionsOnProject"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlcenter, '', 0, 1, 0); + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; + $cachekey = 'count_events_project_'.$object->id; + $nbEvent = dol_getcache($cachekey); + + $titlelist = $langs->trans("ActionsOnProject").(is_numeric($nbEvent) ? '('.$nbEvent.')': ''); + + print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlcenter, '', 0, 1, 0); // List of all actions $filters = array(); diff --git a/htdocs/societe/agenda.php b/htdocs/societe/agenda.php index 7c790c11bf3..e4a19b757ae 100644 --- a/htdocs/societe/agenda.php +++ b/htdocs/societe/agenda.php @@ -210,7 +210,12 @@ if (isModEnabled('agenda') && ($user->hasRight('agenda', 'myactions', 'read') || $cachekey = 'count_events_thirdparty_'.$object->id; $nbEvent = dol_getcache($cachekey); - print_barre_liste($langs->trans("ActionsOnCompany").(is_numeric($nbEvent) ? '('.$nbEvent.')': ''), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); + $titlelist = $langs->trans("ActionsOnCompany").(is_numeric($nbEvent) ? '('.$nbEvent.')': ''); + if (!empty($conf->dol_optimize_smallscreen)) { + $titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '('.$nbEvent.')': ''); + } + + print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); // List of all actions $filters = array(); diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index fff7835601b..8bb244ec2c6 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -3311,6 +3311,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { // Subsidiaries list if (empty($conf->global->SOCIETE_DISABLE_PARENTCOMPANY) && empty($conf->global->SOCIETE_DISABLE_SHOW_SUBSIDIARIES)) { + print '
'; $result = show_subsidiaries($conf, $langs, $db, $object); } @@ -3318,7 +3319,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { $MAXEVENT = 10; - $morehtmlcenter = dolGetButtonTitle($langs->trans('SeeAll'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id); + $morehtmlcenter = '
'; + $morehtmlcenter .= dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/societe/messaging.php?socid='.$object->id); + $morehtmlcenter .= dolGetButtonTitle($langs->trans('FullList'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/societe/agenda.php?socid='.$object->id); + $morehtmlcenter .= '
'; // List of actions on element include_once DOL_DOCUMENT_ROOT.'/core/class/html.formactions.class.php'; diff --git a/htdocs/societe/messaging.php b/htdocs/societe/messaging.php index 4fdc1c54a69..b84c6b233dd 100644 --- a/htdocs/societe/messaging.php +++ b/htdocs/societe/messaging.php @@ -200,8 +200,12 @@ if ($socid > 0) { $cachekey = 'count_events_thirdparty_'.$object->id; $nbEvent = dol_getcache($cachekey); - // print load_fiche_titre($langs->trans("ActionsOnCompany"), $newcardbutton, ''); - print_barre_liste($langs->trans("ActionsOnCompany").(is_numeric($nbEvent) ? '('.$nbEvent.')' : ''), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); + $titlelist = $langs->trans("ActionsOnCompany").(is_numeric($nbEvent) ? '('.$nbEvent.')': ''); + if (!empty($conf->dol_optimize_smallscreen)) { + $titlelist = $langs->trans("Actions").(is_numeric($nbEvent) ? '('.$nbEvent.')': ''); + } + + print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); // List of all actions $filters = array(); diff --git a/htdocs/ticket/agenda.php b/htdocs/ticket/agenda.php index 2b5c0977b30..d6bbdcd69f3 100644 --- a/htdocs/ticket/agenda.php +++ b/htdocs/ticket/agenda.php @@ -269,7 +269,13 @@ if (!empty($object->id)) { $url = DOL_URL_ROOT.'/comm/action/card.php?action=create&datep=now&origin=ticket&originid='.$object->id.'&projectid='.$object->fk_project.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id); $morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', $url, 'add-new-ticket-even-button', $btnstatus); - print_barre_liste($langs->trans("ActionsOnTicket"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; + $cachekey = 'count_events_ticket_'.$object->id; + $nbEvent = dol_getcache($cachekey); + + $titlelist = $langs->trans("ActionsOnTicket").(is_numeric($nbEvent) ? '('.$nbEvent.')': ''); + + print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); // List of all actions $filters = array(); diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 296da9c019d..a266173e9f6 100755 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -1624,7 +1624,6 @@ if ($action == 'create' || $action == 'presend') { $morehtmlcenter = '
'; $morehtmlcenter .= dolGetButtonTitle($langs->trans('FullConversation'), '', 'fa fa-comments imgforviewmode', DOL_URL_ROOT.'/ticket/messaging.php?id='.$object->id); - $morehtmlcenter .= ' '; $morehtmlcenter .= dolGetButtonTitle($langs->trans('FullList'), '', 'fa fa-bars imgforviewmode', DOL_URL_ROOT.'/ticket/agenda.php?id='.$object->id); $morehtmlcenter .= '
'; diff --git a/htdocs/ticket/messaging.php b/htdocs/ticket/messaging.php index 8b0edb7cb3a..fb73426371a 100644 --- a/htdocs/ticket/messaging.php +++ b/htdocs/ticket/messaging.php @@ -265,7 +265,13 @@ if (!empty($object->id)) { $url = DOL_URL_ROOT.'/comm/action/card.php?action=create&datep=now&origin=ticket&originid='.$object->id.'&projectid='.$object->fk_project.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id); $morehtmlright .= dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', $url, 'add-new-ticket-even-button', $btnstatus); - print_barre_liste($langs->trans("ActionsOnTicket"), 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); + require_once DOL_DOCUMENT_ROOT.'/core/lib/memory.lib.php'; + $cachekey = 'count_events_ticket_'.$object->id; + $nbEvent = dol_getcache($cachekey); + + $titlelist = $langs->trans("ActionsOnTicket").(is_numeric($nbEvent) ? '('.$nbEvent.')': ''); + + print_barre_liste($titlelist, 0, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', 0, -1, '', 0, $morehtmlright, '', 0, 1, 0); // List of all actions $filters = array();