diff --git a/plugin/ticket/src/new_ticket.php b/plugin/ticket/src/new_ticket.php index 911b2c78a1..3276f4aab3 100755 --- a/plugin/ticket/src/new_ticket.php +++ b/plugin/ticket/src/new_ticket.php @@ -394,7 +394,7 @@ function show_form_send_ticket() ) ); $form->addElement('file', 'attach_1', get_lang('FilesAttachment')); - $form->addLabel('', '
'); + $form->addLabel('', '
'); $form->addLabel('', ' diff --git a/plugin/ticket/src/ticket.class.php b/plugin/ticket/src/ticket.class.php index 4e61b6ad69..fab9482ce0 100755 --- a/plugin/ticket/src/ticket.class.php +++ b/plugin/ticket/src/ticket.class.php @@ -1221,12 +1221,15 @@ class TicketManager if (Database::num_rows($result) > 0) { while ($row = Database::fetch_assoc($result)) { $row['course'] = null; + $row['start_date_from_db'] = $row['start_date']; $row['start_date'] = api_convert_and_format_date( api_get_local_time($row['start_date']), DATE_TIME_FORMAT_LONG, _api_get_timezone() ); + $row['end_date_from_db'] = $row['end_date']; $row['end_date'] = api_convert_and_format_date( api_get_local_time($row['end_date']), DATE_TIME_FORMAT_LONG, _api_get_timezone() ); + $row['sys_lastedit_datetime_from_db'] = $row['sys_lastedit_datetime']; $row['sys_lastedit_datetime'] = api_convert_and_format_date( api_get_local_time($row['sys_lastedit_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone() ); diff --git a/plugin/ticket/src/ticket_details.php b/plugin/ticket/src/ticket_details.php index 0dcbe3e104..3ef3aa0543 100755 --- a/plugin/ticket/src/ticket_details.php +++ b/plugin/ticket/src/ticket_details.php @@ -1,5 +1,6 @@ ", { - src: "' . api_get_path(WEB_CODE_PATH) . 'img/delete.gif" + src: "' . Display::returnIconPath('delete.png').'" }); new_filepath_id = $("#filepath_" + counter_image); @@ -223,6 +224,13 @@ if (isset($_REQUEST['action'])) { } } +$titulo = '

Ticket #' . $ticket['ticket']['ticket_code'] . '

'; +$firstMessage = is_array($ticket['messages']) ? $ticket['messages'][0] : ''; + +if (!empty($firstMessage) && isset($firstMessage['subject'])) { + $titulo .= "

".$firstMessage['subject']."

"; +} + if (!isset($_POST['compose'])) { if (isset($_POST['close'])) { $_GET['ticket_id'] = $_POST['ticket_id']; @@ -246,7 +254,7 @@ if (!isset($_POST['compose'])) { } } } - $titulo = '

Ticket #' . $ticket['ticket']['ticket_code'] . '

'; + $img_assing = ''; if ($isAdmin && $ticket['ticket']['status_id'] != 'CLS' && $ticket['ticket']['status_id'] != 'REE') { if ($ticket['ticket']['assigned_last_user'] != 0 && $ticket['ticket']['assigned_last_user'] == $user_id) { @@ -267,28 +275,32 @@ if (!isset($_POST['compose'])) { } "; } - - echo '
+ if ($isAdmin) { + $senderData = get_lang('AddedBy') . ':  ' . $ticket['ticket']['user_url'] . ' (' . $ticket['usuario']['username'] . ')'; + } else { + $senderData = get_lang('AddedBy') . ':  ' . $ticket['usuario']['complete_name'] . ' (' . $ticket['usuario']['username'] . ')'; + } + echo ' - + - - - - - - - - + - @@ -301,11 +313,7 @@ if (!isset($_POST['compose'])) { '; } - if ($isAdmin) { - echo ' - - '; - } + //select admins $select_admins = '
' . $titulo . ' + ' . $titulo . ' +

+ '.$senderData.' ' . get_lang('Created') . ' '.date_to_str_ago($ticket['ticket']['start_date_from_db']).' + + ' . get_lang('Updated') . ': ' . date_to_str_ago($ticket['ticket']['sys_lastedit_datetime_from_db']). ' +

+ +
' . $img_assing . ' ' . $form_close_ticket . '

' . get_lang('Sent') . ': ' . $ticket['ticket']['start_date'] . '

' . $plugin->get_lang('LastResponse') . ': ' . $ticket['ticket']['sys_lastedit_datetime'] . '

' . get_lang('Subject') . ': ' . $ticket['messages'][0]['subject'] . '

' . get_lang('Category') . ': ' . $ticket['ticket']['name'] . '

' . get_lang('Status') . ': ' . $ticket['ticket']['status'] . '

' . get_lang('Category') . ': ' . $ticket['ticket']['name'] . '

' . $plugin->get_lang('Priority') . ':' . $ticket['ticket']['priority'] . '

' . get_lang('User') . ':  ' . $user_info = $ticket['ticket']['user_url'] . ' (' . $ticket['usuario']['username'] . ')

'; + echo ''; $messages = $ticket['messages']; echo "
"; echo "
"; @@ -333,13 +341,14 @@ if (!isset($_POST['compose'])) { if ($message['admin']) { $type = "normal"; if ($isAdmin) { - $message['message'].='
' . $plugin->get_lang('AttendedBy') . ': ' . $message['user_created'] . " - " . api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone()) . ""; + $message['message'] .= '
' . $plugin->get_lang('AttendedBy') . ': ' . $message['user_created'] . " - " . api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone()) . ""; } }else { - $message['message'].='' . get_lang('Sent') . ': ' . api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone()) . ""; + $message['message'] .= '
' . get_lang('Sent') . ': ' . api_convert_and_format_date(api_get_local_time($message['sys_insert_datetime']), DATE_TIME_FORMAT_LONG, _api_get_timezone()); } - $receivedMessage = '' . get_lang('Subject') . ': ' . $message['subject'] . '
' . get_lang('Message') . ':' . $message['message'] . '
'; + $receivedMessage = '' . get_lang('Subject') . ': ' . $message['subject'] . '
+ ' . get_lang('Message') . ':
' . $message['message'] . '
'; $attachementLinks = ""; if (isset($message['atachments'])) { @@ -438,17 +447,17 @@ function show_form_send_message() ); } - $form->addElement('html', ''); - $form->addElement('html', '
'); + $form->addElement('file', 'attach_1', get_lang('FilesAttachment')); - $form->addElement('html', '
'); - $form->addElement('html', '
'); + $form->addLabel('', '
'); + + $form->addLabel('', + ' + ' . get_lang('AddOneMoreFile') . ' + + ('.sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))).') + '); - $form->addElement('html', '
'); - $form->addElement('html', ''); - $form->addElement('html', '' . get_lang('AddOneMoreFile') . ''); - $form->addElement('html', ''); - $form->addElement('html', '(' . sprintf(get_lang('MaximunFileSizeX'), format_file_size(api_get_setting('message_max_upload_filesize'))) . ')'); $form->addElement('html', '
'); $form->addElement( @@ -458,7 +467,7 @@ function show_form_send_message() null, null, null, - 'save' + 'btn btn-primary' ); $form->display();