diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index b095712d972..6df0e2f006d 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -7154,20 +7154,20 @@ abstract class CommonObject $dir = $sdir.'/'; $pdir = '/'; - $dir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->ref.'/'; - $pdir .= get_exdir(0, 0, 0, 0, $this, $modulepart).$this->ref.'/'; + $dir .= get_exdir(0, 0, 0, 0, $this, $modulepart); + $pdir .= get_exdir(0, 0, 0, 0, $this, $modulepart); // For backward compatibility - if ($modulepart == 'product' && !empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) - { - $dir = $sdir.'/'.get_exdir($this->id, 2, 0, 0, $this, $modulepart).$this->id."/photos/"; - $pdir = '/'.get_exdir($this->id, 2, 0, 0, $this, $modulepart).$this->id."/photos/"; + if ($modulepart == 'product') { + if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { + $dir = $sdir.'/'.get_exdir($this->id, 2, 0, 0, $this, $modulepart).$this->id."/photos/"; + $pdir = '/'.get_exdir($this->id, 2, 0, 0, $this, $modulepart).$this->id."/photos/"; + } } // Defined relative dir to DOL_DATA_ROOT $relativedir = ''; - if ($dir) - { + if ($dir) { $relativedir = preg_replace('/^'.preg_quote(DOL_DATA_ROOT, '/').'/', '', $dir); $relativedir = preg_replace('/^[\\/]/', '', $relativedir); $relativedir = preg_replace('/[\\/]$/', '', $relativedir); @@ -7189,23 +7189,19 @@ abstract class CommonObject completeFileArrayWithDatabaseInfo($filearray, $relativedir); - if (count($filearray)) - { - if ($sortfield && $sortorder) - { + if (count($filearray)) { + if ($sortfield && $sortorder) { $filearray = dol_sort_array($filearray, $sortfield, $sortorder); } - foreach ($filearray as $key => $val) - { + foreach ($filearray as $key => $val) { $photo = ''; $file = $val['name']; //if (! utf8_check($file)) $file=utf8_encode($file); // To be sure file is stored in UTF8 in memory //if (dol_is_file($dir.$file) && image_format_supported($file) >= 0) - if (image_format_supported($file) >= 0) - { + if (image_format_supported($file) >= 0) { $nbphoto++; $photo = $file; $viewfilename = $file; @@ -7242,12 +7238,9 @@ abstract class CommonObject $alt .= ' - '.$langs->transnoentitiesnoconv('Size').': '.$imgarray['width'].'x'.$imgarray['height']; if ($notitle) $alt = ''; - if ($usesharelink) - { - if ($val['share']) - { - if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight) - { + if ($usesharelink) { + if ($val['share']) { + if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight) { $return .= ''; $return .= ''; } else { @@ -7259,10 +7252,9 @@ abstract class CommonObject $return .= ''; } } else { - if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight) - { + if (empty($maxHeight) || $photo_vignette && $imgarray['height'] > $maxHeight) { $return .= ''; - $return .= ''; + $return .= ''; } else { $return .= ''; $return .= ''; diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 437cef27afc..6836b70fe2d 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -1254,7 +1254,7 @@ class FormFile } else { print ''; } - print ''; + print ''; print ''; } else print ' '; print ''; @@ -1779,7 +1779,7 @@ class FormFile print ''."\n"; // Show list of associated links - print load_fiche_titre($langs->trans("LinkedFiles"), '', 'external-link-square-alt', 0, '', 'table-list-of-links'); + print load_fiche_titre($langs->trans("LinkedFiles"), '', 'link', 0, '', 'table-list-of-links'); print '
'; print ''; @@ -1913,11 +1913,12 @@ class FormFile { $out .= ''; //$out.= ''; - if (empty($ruleforpicto)) - { + if (empty($ruleforpicto)) { //$out.= img_picto($langs->trans('Preview').' '.$file['name'], 'detail'); $out .= ''; - } else $out .= img_mime($relativepath, $langs->trans('Preview').' '.$file['name']); + } else { + $out .= img_mime($relativepath, $langs->trans('Preview').' '.$file['name']); + } $out .= ''; } } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index f5e4472eaf3..a7533df3fb9 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1620,6 +1620,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi $showimage = $object->is_photo_available($conf->ticket->multidir_output[$entity].'/'.$object->ref); $maxvisiblephotos = (isset($conf->global->TICKET_MAX_VISIBLE_PHOTO) ? $conf->global->TICKET_MAX_VISIBLE_PHOTO : 2); if ($conf->browser->layout == 'phone') $maxvisiblephotos = 1; + if ($showimage) { $showphoto = $object->show_photos('ticket', $conf->ticket->multidir_output[$entity], 'small', $maxvisiblephotos, 0, 0, 0, $width, 0); @@ -1636,8 +1637,11 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi $nophoto = ''; $morehtmlleft .= '
'; } else { // Show no photo link - $nophoto = '/public/theme/common/nophoto.png'; - $morehtmlleft .= '
No photo
'; + $nophoto = img_picto('No photo', 'object_ticket'); + $morehtmlleft .= ''; + $morehtmlleft .= '
'; + $morehtmlleft .= $nophoto; + $morehtmlleft .= '
'; } } } else { @@ -3213,7 +3217,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'delete', 'dolly', 'dollyrevert', 'donation', 'download', 'edit', 'ellipsis-h', 'email', 'eraser', 'external-link-alt', 'external-link-square-alt', 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'group', 'help', 'holiday', - 'intervention', 'label', 'language', 'list', 'listlight', 'lot', + 'intervention', 'label', 'language', 'link', 'list', 'listlight', 'lot', 'map-marker-alt', 'member', 'money-bill-alt', 'mrp', 'note', 'next', 'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom', 'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder', @@ -5590,12 +5594,10 @@ function get_exdir($num, $level, $alpha, $withoutslash, $object, $modulepart = ' if ($level == 3) $path = substr($num, 2, 1).'/'.substr($num, 1, 1).'/'.substr($num, 0, 1); } else { // We will enhance here a common way of forging path for document storage. - // In a future, we may distribut directories on several levels depending on setup and object. + // In a future, we may distribute directories on several levels depending on setup and object. // Here, $object->id, $object->ref and $modulepart are required. //var_dump($modulepart); - if (!in_array($modulepart, array('product'))) { // Test to remove - $path = dol_sanitizeFileName(empty($object->ref) ? (string) $object->id : $object->ref); - } + $path = dol_sanitizeFileName(empty($object->ref) ? (string) $object->id : $object->ref); } if (empty($withoutslash) && !empty($path)) $path .= '/'; @@ -8533,7 +8535,7 @@ function dolGetBadge($label, $html = '', $type = 'primary', $mode = '', $url = ' * @param string $statusType status0 status1 status2 status3 status4 status5 status6 status7 status8 status9 : image name or badge name * @param int $displayMode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto, 6=Long label + Picto * @param string $url The url for link - * @param array $params Various params. Example: array('tooltip'=>'...', 'badgeParams'=>...) + * @param array $params Various params. Example: array('tooltip'=>'no|...', 'badgeParams'=>...) * @return string Html status string */ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $statusType = 'status0', $displayMode = 0, $url = '', $params = array()) @@ -8602,7 +8604,7 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st $statusLabelShort = (empty($statusLabelShort) ? $statusLabel : $statusLabelShort); $dolGetBadgeParams['attr']['class'] = 'badge-status'; - $dolGetBadgeParams['attr']['title'] = empty($params['tooltip']) ? $statusLabel : $params['tooltip']; + $dolGetBadgeParams['attr']['title'] = empty($params['tooltip']) ? $statusLabel : ($params['tooltip'] != 'no' ? $params['tooltip'] : ''); if ($displayMode == 3) { $return = dolGetBadge((empty($conf->dol_optimize_smallscreen) ? $statusLabel : (empty($statusLabelShort) ? $statusLabel : $statusLabelShort)), '', $statusType, 'dot', $url, $dolGetBadgeParams); diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index 73c9964000e..07c463b7371 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -674,7 +674,7 @@ SendMail=Send email Email=Email NoEMail=No email AlreadyRead=Already read -NotRead=Not read +NotRead=Unread NoMobilePhone=No mobile phone Owner=Owner FollowingConstantsWillBeSubstituted=The following constants will be replaced with the corresponding value. @@ -1109,4 +1109,5 @@ SecurityTokenHasExpiredSoActionHasBeenCanceledPleaseRetry=Security token has exp UpToDate=Up-to-date OutOfDate=Out-of-date EventReminder=Event Reminder -UpdateForAllLines=Update for all lines \ No newline at end of file +UpdateForAllLines=Update for all lines +OnHold=On hold \ No newline at end of file diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang index a7726032558..3ca908e86d8 100644 --- a/htdocs/langs/en_US/ticket.lang +++ b/htdocs/langs/en_US/ticket.lang @@ -58,7 +58,6 @@ OriginEmail=Email source Notify_TICKET_SENTBYMAIL=Send ticket message by email # Status -NotRead=Not read Read=Read Assigned=Assigned InProgress=In progress diff --git a/htdocs/langs/fr_FR/main.lang b/htdocs/langs/fr_FR/main.lang index 4756a52b6a2..3f1076eb335 100644 --- a/htdocs/langs/fr_FR/main.lang +++ b/htdocs/langs/fr_FR/main.lang @@ -672,6 +672,7 @@ Email=Email NoEMail=Pas d'email AlreadyRead=Déjà lu NotRead=Non lu +Unread=Non lu NoMobilePhone=Pas de téléphone portable Owner=Propriétaire FollowingConstantsWillBeSubstituted=Les constantes suivantes seront substituées par leur valeur correspondante. diff --git a/htdocs/langs/fr_FR/ticket.lang b/htdocs/langs/fr_FR/ticket.lang index 54e7ec0be33..926ca24d3da 100644 --- a/htdocs/langs/fr_FR/ticket.lang +++ b/htdocs/langs/fr_FR/ticket.lang @@ -60,7 +60,6 @@ OriginEmail=E-mail source Notify_TICKET_SENTBYMAIL=Envoi d'un message du ticket par e-mail # Status -NotRead=Non lu Read=Lu Assigned=Assigné InProgress=En cours @@ -231,7 +230,6 @@ TicketChangeStatus=Changer l'état TicketConfirmChangeStatus=Confirmez le changement d'état: %s? TicketLogStatusChanged=Statut modifié: %s à %s TicketNotNotifyTiersAtCreate=Ne pas notifier l'entreprise à la création -Unread=Non lu TicketNotCreatedFromPublicInterface=Non disponible. Le ticket n’a pas été créé à partir de l'interface publique. PublicInterfaceNotEnabled=L’interface publique n’a pas été activée ErrorTicketRefRequired=La référence du ticket est requise diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index a6d676a0f7b..3201dd652aa 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -5136,7 +5136,7 @@ class Product extends CommonObject if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) { $dir .= '/'.get_exdir($this->id, 2, 0, 0, $this, 'product').$this->id."/photos/"; } else { - $dir .= '/'.get_exdir(0, 0, 0, 0, $this, 'product').dol_sanitizeFileName($this->ref).'/'; + $dir .= '/'.get_exdir(0, 0, 0, 0, $this, 'product'); } $nbphoto = 0; diff --git a/htdocs/product/document.php b/htdocs/product/document.php index 0e3d3c662b0..f8f5322f2f8 100644 --- a/htdocs/product/document.php +++ b/htdocs/product/document.php @@ -72,8 +72,8 @@ if ($id > 0 || !empty($ref)) { $result = $object->fetch($id, $ref); - if (!empty($conf->product->enabled)) $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref); - elseif (!empty($conf->service->enabled)) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 0, $object, 'product').dol_sanitizeFileName($object->ref); + if (!empty($conf->product->enabled)) $upload_dir = $conf->product->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'product'); + elseif (!empty($conf->service->enabled)) $upload_dir = $conf->service->multidir_output[$object->entity].'/'.get_exdir(0, 0, 0, 1, $object, 'product'); if (!empty($conf->global->PRODUCT_USE_OLD_PATH_FOR_PHOTO)) // For backward compatiblity, we scan also old dirs { diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index 1dc8f27b644..cfab5312073 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -319,10 +319,13 @@ input.buttonpaymentstripe { max-width: 320px; } -a.buttonticket { +a.butStatus { padding-left: 5px; padding-right: 5px; - /* height: 40px; */ + background-color: transparent; + color: var(--colortext) !important; + border: 2px solid var( --butactionbg); + margin: 0 0.45em !important; } /* Used by timesheets */ @@ -1498,7 +1501,7 @@ select.widthcentpercentminusxx, input.widthcentpercentminusxx { } .linkobject { cursor: pointer; } -table.tableforfield tr>td:first-of-type, div.tableforfield div.tagtr>div.tagtd:first-of-type { +table.tableforfield tr>td:first-of-type, tr.trforfield>td:first-of-type, div.tableforfield div.tagtr>div.tagtd:first-of-type { color: var(--tableforfieldcolor); } @@ -3695,8 +3698,8 @@ table.noborder.paymenttable { box-shadow: 0px 0px 0px #DDD !important; } .shadow { - -webkit-box-shadow: 2px 2px 5px #CCC !important; - box-shadow: 2px 2px 5px #CCC !important; + -webkit-box-shadow: 1px 1px 7px #CCC !important; + box-shadow: 1px 1px 7px #CCC !important; } div.tabBar .noborder { diff --git a/htdocs/theme/eldy/theme_vars.inc.php b/htdocs/theme/eldy/theme_vars.inc.php index 572404f3eea..cc73803f452 100644 --- a/htdocs/theme/eldy/theme_vars.inc.php +++ b/htdocs/theme/eldy/theme_vars.inc.php @@ -114,7 +114,7 @@ $badgeStatus4 = '#25a580'; // Color ok $badgeStatus4b = '#25a580'; // Color ok $badgeStatus5 = '#cad2d2'; $badgeStatus6 = '#cad2d2'; -$badgeStatus7 = '#baa32b'; +$badgeStatus7 = '#25a580'; $badgeStatus8 = '#993013'; $badgeStatus9 = '#e7f0f0'; diff --git a/htdocs/theme/md/style.css.php b/htdocs/theme/md/style.css.php index 7b4ecf08e8e..01cace5a5e8 100644 --- a/htdocs/theme/md/style.css.php +++ b/htdocs/theme/md/style.css.php @@ -459,9 +459,13 @@ input.buttonpaymentstripe { .logopublicpayment #dolpaymentlogo { max-height: 100px; } -a.buttonticket { +a.butStatus { padding-left: 5px; padding-right: 5px; + background-color: transparent; + color: var(--colortext) !important; + border: 2px solid var( --butactionbg); + margin: 0 0.45em !important; } /* Used by timesheets */ @@ -1453,7 +1457,7 @@ table[summary="list_of_modules"] .fa-cog { } .linkobject { cursor: pointer; } -table.tableforfield tr>td:first-of-type, div.tableforfield div.tagtr>div.tagtd:first-of-type { +table.tableforfield tr>td:first-of-type, tr.trforfield>td:first-of-type, div.tableforfield div.tagtr>div.tagtd:first-of-type { color: #666; } diff --git a/htdocs/theme/md/theme_vars.inc.php b/htdocs/theme/md/theme_vars.inc.php index fdf62ffb1bf..e74c206ad20 100644 --- a/htdocs/theme/md/theme_vars.inc.php +++ b/htdocs/theme/md/theme_vars.inc.php @@ -97,6 +97,6 @@ $badgeStatus3 = '#bca52b'; $badgeStatus4 = '#277d1e'; $badgeStatus5 = '#cad2d2'; $badgeStatus6 = '#cad2d2'; -$badgeStatus7 = '#baa32b'; +$badgeStatus7 = '#277d1e'; $badgeStatus8 = '#993013'; $badgeStatus9 = '#e7f0f0'; diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index 9618ab128ec..2cd8fe7f697 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -667,9 +667,6 @@ if ($action == 'create' || $action == 'presend') $formticket->withfile = 2; $formticket->withextrafields = 1; $formticket->param = array('origin' => GETPOST('origin'), 'originid' => GETPOST('originid')); - if (empty($defaultref)) { - $defaultref = ''; - } $formticket->showForm(1, 'create'); } elseif ($action == 'edit' && $user->rights->ticket->write && $object->fk_statut < Ticket::STATUS_CLOSED) { @@ -863,8 +860,7 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = } // Thirdparty - if (!empty($conf->societe->enabled)) - { + if (!empty($conf->societe->enabled)) { $morehtmlref .= '
'.$langs->trans('ThirdParty').' '; if ($action != 'editcustomer' && $object->fk_statut < 8 && !$user->socid && $user->rights->ticket->write) { $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('Edit'), 0).' : '; @@ -877,12 +873,10 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = } // Project - if (!empty($conf->projet->enabled)) - { + if (!empty($conf->projet->enabled)) { $langs->load("projects"); $morehtmlref .= '
'.$langs->trans('Project').' '; - if ($user->rights->ticket->write) - { + if ($user->rights->ticket->write) { if ($action != 'classify') $morehtmlref .= ''.img_edit($langs->transnoentitiesnoconv('SetProject')).''; $morehtmlref .= ' : '; @@ -967,7 +961,7 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = print ''; print ''; } print '
'; print $langs->trans("AssignedTo"); - if ($object->fk_statut < 8 && GETPOST('set', 'alpha') != "assign_ticket" && $user->rights->ticket->manage) { + if ($object->fk_statut < $object::STATUS_CLOSED && GETPOST('set', 'alpha') != "assign_ticket" && $user->rights->ticket->manage) { print ''.img_edit($langs->trans('Modify'), '').'
'; @@ -995,7 +989,7 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = print ''; - if ($action != 'progression' && $object->fk_statut < 8 && !$user->socid) { + if ($action != 'progression' && $object->fk_statut < $object::STATUS_CLOSED && !$user->socid) { print ''; } print '
'; print $langs->trans('Progression').''; print ''.img_edit($langs->trans('Modify')).'
'; @@ -1054,7 +1048,6 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = print ''; print ''; print ''; - print ''; print ''; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table @@ -1068,7 +1061,7 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = print ''; } else { // Button to edit Properties - if ($object->fk_statut < 5 && $user->rights->ticket->write) { + if ($object->fk_statut < $object::STATUS_NEED_MORE_INFO && $user->rights->ticket->write) { print ''.img_edit($langs->trans('Modify')).''; } } @@ -1121,7 +1114,7 @@ elseif (empty($action) || $action == 'view' || $action == 'addlink' || $action = // Display navbar with links to change ticket status print ''; - if (!$user->socid && $user->rights->ticket->write && $object->fk_statut < 8 && GETPOST('set') !== 'properties') { + if (!$user->socid && $user->rights->ticket->write && $object->fk_statut < $object::STATUS_CLOSED && GETPOST('set') !== 'properties') { $actionobject->viewStatusActions($object); } diff --git a/htdocs/ticket/class/actions_ticket.class.php b/htdocs/ticket/class/actions_ticket.class.php index 895cacdb4ed..40fc22e1347 100644 --- a/htdocs/ticket/class/actions_ticket.class.php +++ b/htdocs/ticket/class/actions_ticket.class.php @@ -193,7 +193,7 @@ class ActionsTicket print '
'; print '
'; // You can use div-table-responsive-no-min if you dont need reserved height for your table print ''; - print ''; - // Nbre files + // Nunber of files print ''; - //Total taille + // Total size print ''; print '
'; + print '
'; print $langs->trans("InitialMessage"); print ''; if ($user->rights->ticket->manage) { @@ -404,15 +404,16 @@ class ActionsTicket if (!in_array($status, $exclude_status)) { print '
'; - if ($status == 1) - { + if ($status == 1) { $urlforbutton = $_SERVER['PHP_SELF'].'?track_id='.$object->track_id.'&action=mark_ticket_read'; // To set as read, we use a dedicated action } else { $urlforbutton = $_SERVER['PHP_SELF'].'?track_id='.$object->track_id.'&action=set_status&token='.newToken().'&new_status='.$status; } - print ''; - print img_picto($langs->trans($object->statuts_short[$status]), 'statut'.$status.'.png@ticket').' '.$langs->trans($object->statuts_short[$status]); + print ''; + print $object->LibStatut($status, 3, 1).' '; + //print img_picto($langs->trans($object->statuts_short[$status]), 'statut'.$status.'.png@ticket', '', false, 0, 0, '', 'valignmiddle').' '; + print $langs->trans($object->statuts_short[$status]); print ''; print '
'; } diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index e5818fa7762..03e87067d10 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -217,7 +217,7 @@ class Ticket extends CommonObject const STATUS_ASSIGNED = 2; const STATUS_IN_PROGRESS = 3; const STATUS_NEED_MORE_INFO = 5; - const STATUS_WAITING = 7; + const STATUS_WAITING = 7; // on hold const STATUS_CLOSED = 8; const STATUS_CANCELED = 9; @@ -292,8 +292,8 @@ class Ticket extends CommonObject self::STATUS_READ => 'Read', self::STATUS_ASSIGNED => 'Assigned', self::STATUS_IN_PROGRESS => 'InProgress', + self::STATUS_WAITING => 'OnHold', self::STATUS_NEED_MORE_INFO => 'NeedMoreInformation', - self::STATUS_WAITING => 'Suspended', self::STATUS_CLOSED => 'Closed', self::STATUS_CANCELED => 'Canceled' ); @@ -302,8 +302,8 @@ class Ticket extends CommonObject self::STATUS_READ => 'Read', self::STATUS_ASSIGNED => 'Assigned', self::STATUS_IN_PROGRESS => 'InProgress', + self::STATUS_WAITING => 'OnHold', self::STATUS_NEED_MORE_INFO => 'NeedMoreInformation', - self::STATUS_WAITING => 'Suspended', self::STATUS_CLOSED => 'Closed', self::STATUS_CANCELED => 'Canceled' ); @@ -1244,8 +1244,8 @@ class Ticket extends CommonObject /** * Return status label of object * - * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto - * @return string Label + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto + * @return string Label */ public function getLibStatut($mode = 0) { @@ -1259,9 +1259,10 @@ class Ticket extends CommonObject * * @param string $status Id status * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto + * @param int $notooltip 1=No tooltip * @return string Label */ - public function LibStatut($status, $mode = 0) + public function LibStatut($status, $mode = 0, $notooltip = 0) { // phpcs:enable global $langs; @@ -1274,13 +1275,13 @@ class Ticket extends CommonObject } elseif ($status == self::STATUS_READ) { $statusType = 'status1'; } elseif ($status == self::STATUS_ASSIGNED) { - $statusType = 'status3'; + $statusType = 'status2'; } elseif ($status == self::STATUS_IN_PROGRESS) { $statusType = 'status4'; } elseif ($status == self::STATUS_WAITING) { - $statusType = 'status3'; + $statusType = 'status7'; } elseif ($status == self::STATUS_NEED_MORE_INFO) { - $statusType = 'status9'; + $statusType = 'status3'; } elseif ($status == self::STATUS_CANCELED) { $statusType = 'status9'; } elseif ($status == self::STATUS_CLOSED) { @@ -1292,7 +1293,12 @@ class Ticket extends CommonObject $mode = 0; } - return dolGetStatus($langs->trans($labelStatus), $langs->trans($labelStatusShort), '', $statusType, $mode); + $params = array(); + if ($notooltip) { + $params = array('tooltip' => 'no'); + } + + return dolGetStatus($langs->trans($labelStatus), $langs->trans($labelStatusShort), '', $statusType, $mode, '', $params); } diff --git a/htdocs/ticket/index.php b/htdocs/ticket/index.php index 52e10f78454..f871fafa893 100644 --- a/htdocs/ticket/index.php +++ b/htdocs/ticket/index.php @@ -186,21 +186,21 @@ if ($result) { $dataseries = array(); $colorseries = array(); - $dataseries[] = array('label' => $langs->trans("Unread"), 'data' => round($tick['unread'])); + $dataseries[] = array('label' => $langs->transnoentitiesnoconv($tickesupstatic->statuts_short[Ticket::STATUS_NOT_READ]), 'data' => round($tick['unread'])); $colorseries[Ticket::STATUS_NOT_READ] = '-'.$badgeStatus0; - $dataseries[] = array('label' => $langs->trans("Read"), 'data' => round($tick['read'])); + $dataseries[] = array('label' => $langs->transnoentitiesnoconv($tickesupstatic->statuts_short[Ticket::STATUS_READ]), 'data' => round($tick['read'])); $colorseries[Ticket::STATUS_READ] = $badgeStatus1; - $dataseries[] = array('label' => $langs->trans("Assigned"), 'data' => round($tick['assigned'])); + $dataseries[] = array('label' => $langs->transnoentitiesnoconv($tickesupstatic->statuts_short[Ticket::STATUS_ASSIGNED]), 'data' => round($tick['assigned'])); $colorseries[Ticket::STATUS_ASSIGNED] = $badgeStatus3; - $dataseries[] = array('label' => $langs->trans("InProgress"), 'data' => round($tick['inprogress'])); + $dataseries[] = array('label' => $langs->transnoentitiesnoconv($tickesupstatic->statuts_short[Ticket::STATUS_IN_PROGRESS]), 'data' => round($tick['inprogress'])); $colorseries[Ticket::STATUS_IN_PROGRESS] = $badgeStatus4; - $dataseries[] = array('label' => $langs->trans("Suspended"), 'data' => round($tick['waiting'])); - $colorseries[Ticket::STATUS_WAITING] = '-'.$badgeStatus3; - $dataseries[] = array('label' => $langs->trans("NeedMoreInformation"), 'data' => round($tick['needmoreinfo'])); - $colorseries[Ticket::STATUS_NEED_MORE_INFO] = $badgeStatus9; - $dataseries[] = array('label' => $langs->trans("Canceled"), 'data' => round($tick['canceled'])); + $dataseries[] = array('label' => $langs->transnoentitiesnoconv($tickesupstatic->statuts_short[Ticket::STATUS_WAITING]), 'data' => round($tick['waiting'])); + $colorseries[Ticket::STATUS_WAITING] = '-'.$badgeStatus4; + $dataseries[] = array('label' => $langs->transnoentitiesnoconv($tickesupstatic->statuts_short[Ticket::STATUS_NEED_MORE_INFO]), 'data' => round($tick['needmoreinfo'])); + $colorseries[Ticket::STATUS_NEED_MORE_INFO] = '-'.$badgeStatus3; + $dataseries[] = array('label' => $langs->transnoentitiesnoconv($tickesupstatic->statuts_short[Ticket::STATUS_CANCELED]), 'data' => round($tick['canceled'])); $colorseries[Ticket::STATUS_CANCELED] = $badgeStatus9; - $dataseries[] = array('label' => $langs->trans("Closed"), 'data' => round($tick['closed'])); + $dataseries[] = array('label' => $langs->transnoentitiesnoconv($tickesupstatic->statuts_short[Ticket::STATUS_CLOSED]), 'data' => round($tick['closed'])); $colorseries[Ticket::STATUS_CLOSED] = $badgeStatus6; } else { dol_print_error($db); diff --git a/htdocs/user/document.php b/htdocs/user/document.php index 950742305fb..5440ceeb725 100644 --- a/htdocs/user/document.php +++ b/htdocs/user/document.php @@ -154,10 +154,10 @@ if ($object->id) // Login print '
'.$langs->trans("Login").''.$object->login.' 
'.$langs->trans("NbOfAttachedFiles").''.count($filearray).'
'.$langs->trans("TotalSizeOfAttachedFiles").''.dol_print_size($totalsize, 1, 1).'
';