diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 173eb7199f7..003f3989651 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -547,13 +547,6 @@ abstract class CommonObject */ public $model_pdf; - /** - * @var string - * @deprecated Use $model_pdf instead. - * @see $model_pdf - */ - private $modelpdf; - /** * @var string * Contains relative path of last generated main file diff --git a/htdocs/langs/en_US/mails.lang b/htdocs/langs/en_US/mails.lang index 8704735f1ac..f6c6f523125 100644 --- a/htdocs/langs/en_US/mails.lang +++ b/htdocs/langs/en_US/mails.lang @@ -19,6 +19,7 @@ MailCC=Copy to MailToCCUsers=Copy to users(s) MailCCC=Cached copy to MailTopic=Email subject +MailReferences=Message IDs in References MailText=Message MailFile=Attached files MailMessage=Email body diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang index 4e03ef63f95..ac537b7eaa7 100644 --- a/htdocs/langs/en_US/ticket.lang +++ b/htdocs/langs/en_US/ticket.lang @@ -311,7 +311,7 @@ TicketEmailPleaseDoNotReplyToThisEmail=Please do not reply directly to this emai TicketPublicInfoCreateTicket=This form allows you to record a support ticket in our management system. TicketPublicPleaseBeAccuratelyDescribe=Please accurately describe your request. Provide the most information possible to allow us to correctly identify your request. TicketPublicMsgViewLogIn=Please enter ticket tracking ID -TicketTrackId=Public Tracking ID +TicketTrackId=Tracking ID OneOfTicketTrackId=One of your tracking ID ErrorTicketNotFound=Ticket with tracking ID %s not found! Subject=Subject diff --git a/htdocs/public/ticket/view.php b/htdocs/public/ticket/view.php index 60a3c512969..694d91ef081 100644 --- a/htdocs/public/ticket/view.php +++ b/htdocs/public/ticket/view.php @@ -421,11 +421,11 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a if ($object->dao->fk_statut < Ticket::STATUS_CLOSED) { // New message - print '
'.$langs->trans('TicketAddMessage').'
'; + print '
'.$langs->trans('TicketAddMessage').'
'; // Close ticket if ($object->dao->fk_statut >= Ticket::STATUS_NOT_READ && $object->dao->fk_statut < Ticket::STATUS_CLOSED) { - print '
'.$langs->trans('CloseTicket').'
'; + print '
'.$langs->trans('CloseTicket').'
'; } } @@ -460,12 +460,16 @@ if ($action == "view_ticket" || $action == "presend" || $action == "close" || $a print ''; print ''; - print '

'; - print ''; + print '

'; + print ''; print '

'; - print '

'; - print ''; + print '

'; + print ''; print '

'; print '

'; diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php index e7e756cf37e..addd6fade71 100644 --- a/htdocs/ticket/card.php +++ b/htdocs/ticket/card.php @@ -955,23 +955,35 @@ if ($action == 'create' || $action == 'presend') { $morehtmlref = '

'; $morehtmlref .= $object->subject; // Author + $createdbyshown = 0; if ($object->fk_user_create > 0) { $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; $fuser = new User($db); $fuser->fetch($object->fk_user_create); $morehtmlref .= $fuser->getNomUrl(-1); - } elseif (!empty($object->email_msgid)) { - $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; + $createdbyshown++; + } + + //var_dump($object); + if (!empty($object->origin_email)) { // If ticket create from public interface - TODO Add a more robust test to know if created by pubic interface + $htmltooptip = $langs->trans("OriginEmail").': '.$object->origin_email; + $htmltooptip .= '
'.$langs->trans("IP").': '.$object->ip; + $morehtmlref .= ($createdbyshown ? ' - ' : '
'); + $morehtmlref .= ($createdbyshown ? '' : $langs->trans("CreatedBy").' : '); $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); + $morehtmlref .= dol_escape_htmltag($object->origin_email).' - '.$form->textwithpicto($langs->trans("CreatedByPublicPortal"), $htmltooptip, 1, 'help', '', 0, 3, 'tooltip').''; + } elseif (!empty($object->email_msgid)) { // If ticket create by emailcollector - TODO Add a more robust test to know if created by email collector (using import ky ?) + $langs->load("mails"); $htmltooltip = $langs->trans("EmailMsgID").': '.$object->email_msgid; $htmltooltip .= '
'.$langs->trans("EmailDate").': '.dol_print_date($object->email_date, 'dayhour'); - $morehtmlref .= dol_escape_htmltag($object->origin_email).' - '.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $htmltooltip, 1, 'help', '', 0, 3, 'tooltip').''; - } elseif (!empty($object->origin_email)) { - $morehtmlref .= '
'.$langs->trans("CreatedBy").' : '; + $htmltooltip .= '
'.$langs->trans("MailFrom").': '.$object->email_from; + $htmltooltip .= '
'.$langs->trans("MailReply").': '.$object->origin_replyto; + $htmltooltip .= '
'.$langs->trans("MailReferences").': '.$object->origin_references; + $morehtmlref .= ($createdbyshown ? ' - ' : '
'); + $morehtmlref .= ($createdbyshown ? '' : $langs->trans("CreatedBy").' : '); $morehtmlref .= img_picto('', 'email', 'class="paddingrightonly"'); - $htmltooptip = $langs->trans("IP").': '.$object->ip; - $morehtmlref .= dol_escape_htmltag($object->origin_email).' - '.$form->textwithpicto($langs->trans("CreatedByPublicPortal"), $htmltooptip, 1, 'help', '', 0, 3, 'tooltip').''; + $morehtmlref .= dol_escape_htmltag($object->origin_email).' - '.$form->textwithpicto($langs->trans("CreatedByEmailCollector"), $htmltooltip, 1, 'help', '', 0, 3, 'tooltip').''; } $permissiontoedit = $object->status < 8 && !$user->socid && $user->hasRight('ticket', 'write');