From 7dcb87104823eb1875f2530a42b47a1b426a558b Mon Sep 17 00:00:00 2001 From: John Botella Date: Thu, 12 Sep 2019 18:39:29 +0200 Subject: [PATCH] Fix private message type --- htdocs/core/lib/ticket.lib.php | 10 ++++++---- htdocs/theme/eldy/timeline.inc.php | 7 ++++++- htdocs/ticket/class/ticket.class.php | 3 +++ 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index 6ca5379e535..4487fdfdb3a 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -658,10 +658,12 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $out .= ' '; - - if($actionstatic->code == 'TICKET_MSG') { - $out .= $langs->trans('TicketNewMessage'); - }else{ + if($actionstatic->code == 'TICKET_MSG') { + $out .= $langs->trans('TicketNewMessage'); + } + elseif($actionstatic->code == 'TICKET_MSG_PRIVATE') { + $out .= $langs->trans('TicketNewMessage').' ('.$langs->trans('Private').')'; + }else{ if (isset($histo[$key]['type']) && $histo[$key]['type'] == 'action') { $transcode = $langs->trans("Action" . $histo[$key]['acode']); $libelle = ($transcode != "Action" . $histo[$key]['acode'] ? $transcode : $histo[$key]['alabel']); diff --git a/htdocs/theme/eldy/timeline.inc.php b/htdocs/theme/eldy/timeline.inc.php index c42605321ae..d0a12021759 100644 --- a/htdocs/theme/eldy/timeline.inc.php +++ b/htdocs/theme/eldy/timeline.inc.php @@ -59,6 +59,11 @@ if (! defined('ISLOADEDBYSTEELSHEET')) die('Must be call by steelsheet'); ?> padding: 0; position: relative; } + +.timeline > li.timeline-code-ticket_msg_private > .timeline-item { + background: #fffbe5; +} + .timeline > li > .timeline-item > .time{ color: #6f6f6f; float: right; @@ -183,4 +188,4 @@ a.timeline-btn:hover .timeline-badge-date{ background-color: #0073b7 !important; color: #fff !important; -} \ No newline at end of file +} diff --git a/htdocs/ticket/class/ticket.class.php b/htdocs/ticket/class/ticket.class.php index afe5764ec6d..1932fc81231 100644 --- a/htdocs/ticket/class/ticket.class.php +++ b/htdocs/ticket/class/ticket.class.php @@ -1631,6 +1631,9 @@ class Ticket extends CommonObject $actioncomm=new ActionComm($this->db); $actioncomm->type_code = 'AC_OTH_AUTO'; $actioncomm->code = 'TICKET_MSG'; + if($this->private){ + $actioncomm->code = 'TICKET_MSG_PRIVATE'; + } $actioncomm->socid = $this->socid; $actioncomm->label = $this->subject; $actioncomm->note_private = $this->message;