Better label of column.

This commit is contained in:
Laurent Destailleur 2026-04-19 14:55:31 +02:00
parent 52589d8293
commit 54b264a5ce

View file

@ -274,11 +274,11 @@ class ActionsTicket extends CommonHookActions
* View html list of message for ticket
*
* @param bool $show_private Show private messages
* @param bool $show_user Show user who make action
* @param bool $show_author Show who post the message
* @param Ticket $object Object ticket
* @return void
*/
public function viewTicketMessages($show_private, $show_user, $object)
public function viewTicketMessages($show_private, $show_author, $object)
{
global $langs, $user;
@ -306,9 +306,9 @@ class ActionsTicket extends CommonHookActions
print $langs->trans('TicketMessagesList');
print '</td>';
if ($show_user) {
if ($show_author) {
print '<td>';
print $langs->trans('User');
print $langs->trans('Author');
print '</td>';
}
print '</tr>';
@ -322,7 +322,7 @@ class ActionsTicket extends CommonHookActions
print '<td><strong>';
print img_picto('', 'object_action', 'class="paddingright"').dol_print_date($arraymsgs['datep'], 'dayhour');
print '<strong></td>';
if ($show_user) {
if ($show_author) {
print '<td>';
if ($arraymsgs['fk_user_author'] > 0) {
$userstat = new User($this->db);
@ -348,7 +348,7 @@ class ActionsTicket extends CommonHookActions
print '</tr>';
print '<tr class="oddeven nohover borderbottom">';
print '<td'.($show_user ? ' colspan="2"' : '').'>';
print '<td'.($show_author ? ' colspan="2"' : '').'>';
print $arraymsgs['message'];
//attachment
@ -443,17 +443,16 @@ class ActionsTicket extends CommonHookActions
* View list of message for ticket with timeline display
*
* @param bool $show_private Show private messages
* @param bool $show_user Show user who make action
* @param bool $show_author Show who post the message
* @param Ticket $object Object ticket
* @return void
*/
public function viewTicketTimelineMessages($show_private, $show_user, Ticket $object)
public function viewTicketTimelineMessages($show_private, $show_author, Ticket $object)
{
global $conf, $langs, $user;
global $langs;
// Load logs in cache
$ret = $object->loadCacheMsgsTicket();
$action = GETPOST('action');
$object->loadCacheMsgsTicket();
if (is_array($object->cache_msgs_ticket) && count($object->cache_msgs_ticket) > 0) {
print '<section id="cd-timeline">';
@ -473,7 +472,7 @@ class ActionsTicket extends CommonHookActions
print '<span class="cd-date">';
print dol_print_date($arraymsgs['datec'], 'dayhour');
if ($show_user) {
if ($show_author) {
if ($arraymsgs['fk_user_action'] > 0) {
$userstat = new User($this->db);
$res = $userstat->fetch($arraymsgs['fk_user_action']);