diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 1c21140b12a..d78346efe74 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -134,8 +134,8 @@ $arrayfields = array( 'a.datep'=>array('label'=>"DateStart", 'checked'=>1), 'a.datep2'=>array('label'=>"DateEnd", 'checked'=>1), 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), - 'a.fk_contact'=>array('label'=>"Contact", 'checked'=>1), - 'a.fk_element'=>array('label'=>"LinkedObject", 'checked'=>0, 'enabled'=>(!empty($conf->global->AGENDA_SHOW_LINKED_OBJECT))), + 'a.fk_contact'=>array('label'=>"Contact", 'checked'=>0), + 'a.fk_element'=>array('label'=>"LinkedObject", 'checked'=>1, 'enabled'=>(!empty($conf->global->AGENDA_SHOW_LINKED_OBJECT))), 'a.percent'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), 'a.datec'=>array('label'=>'DateCreation', 'checked'=>0), 'a.tms'=>array('label'=>'DateModification', 'checked'=>0) @@ -694,7 +694,7 @@ if ($resql) if ($actioncomm->type_code == 'AC_RDV') $imgpicto = img_picto('', 'object_group', '', false, 0, 0, '', 'paddingright').' '; elseif ($actioncomm->type_code == 'AC_TEL') $imgpicto = img_picto('', 'object_phoning', '', false, 0, 0, '', 'paddingright').' '; elseif ($actioncomm->type_code == 'AC_FAX') $imgpicto = img_picto('', 'object_phoning_fax', '', false, 0, 0, '', 'paddingright').' '; - elseif ($actioncomm->type_code == 'AC_EMAIL') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' '; + elseif ($actioncomm->type_code == 'AC_EMAIL' || $actioncomm->type_code == 'AC_EMAIL_IN') $imgpicto = img_picto('', 'object_email', '', false, 0, 0, '', 'paddingright').' '; elseif ($actioncomm->type_code == 'AC_INT') $imgpicto = img_picto('', 'object_intervention', '', false, 0, 0, '', 'paddingright').' '; elseif ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') $imgpicto = img_picto('', 'object_conversation', '', false, 0, 0, '', 'paddingright').' '; elseif (!preg_match('/_AUTO/', $actioncomm->type_code)) $imgpicto = img_picto('', 'object_other', '', false, 0, 0, '', 'paddingright').' '; @@ -706,7 +706,10 @@ if ($resql) if (empty($conf->global->AGENDA_USE_EVENT_TYPE) && empty($arraylist[$labeltype])) $labeltype = 'AC_OTH'; if ($actioncomm->type_code == 'AC_OTH' && $actioncomm->code == 'TICKET_MSG') { $labeltype = $langs->trans("Message"); - } elseif (!empty($arraylist[$labeltype])) $labeltype = $arraylist[$labeltype]; + } else { + if (!empty($arraylist[$labeltype])) $labeltype = $arraylist[$labeltype]; + if ($obj->type_code == 'AC_OTH_AUTO' && ($obj->type_code != $obj->code) && $labeltype && !empty($arraylist[$obj->code])) $labeltype .= ' - '.$arraylist[$obj->code]; // Use code in priority on type_code + } print dol_trunc($labeltype, 28); print ''; } @@ -727,6 +730,7 @@ if ($resql) } $formatToUse = $obj->fulldayevent ? 'day' : 'dayhour'; + // Start date if (!empty($arrayfields['a.datep']['checked'])) { print ''; diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php index 3197ea8cd59..251433a82a6 100644 --- a/htdocs/core/class/html.formticket.class.php +++ b/htdocs/core/class/html.formticket.class.php @@ -884,12 +884,12 @@ class FormTicket $modelmail_array[$line->id] = $line->label; } - print ''; + print '
'; // External users can't send message email if ($user->rights->ticket->write && !$user->socid) { - print ''; } // Private message (not visible by customer/external user) if (!$user->socid) { - print ''; } + // Subject print ''; $label_title = empty($conf->global->MAIN_APPLICATION_TITLE) ? $mysoc->name : $conf->global->MAIN_APPLICATION_TITLE; - print ''; // Destinataires - print ''; } @@ -1009,17 +1008,16 @@ class FormTicket $defaultmessage = preg_replace("/^\n+/", "", $defaultmessage); } - print ''; // Signature @@ -1027,13 +1025,11 @@ class FormTicket if ($user->rights->ticket->write && !$user->socid) { $mail_signature = GETPOST('mail_signature') ? GETPOST('mail_signature') : $conf->global->TICKET_MESSAGE_MAIL_SIGNATURE; print ''; } @@ -1041,7 +1037,7 @@ class FormTicket if (!empty($this->withfile)) { $out = ''; $out .= ''; - $out .= '
'; + print '
'; $checkbox_selected = (GETPOST('send_email') == "1" ? ' checked' : ''); print ' '; print ''; @@ -904,28 +904,27 @@ class FormTicket } print '   '; print ''; - print '   '; print '
'; + print '
'; $checkbox_selected = (GETPOST('private_message', 'alpha') == "1" ? ' checked' : ''); print ' '; print ''; - print ''; - print $form->textwithpicto('', $langs->trans("TicketMessagePrivateHelp"), 1, 'help'); + print ' '.$form->textwithpicto('', $langs->trans("TicketMessagePrivateHelp"), 1, 'help'); print '
'; + print '
'; //$toolbarname = 'dolibarr_details'; $toolbarname = 'dolibarr_notes'; include_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; $doleditor = new DolEditor('message', $defaultmessage, '100%', 200, $toolbarname, '', false, true, $conf->global->FCKEDITOR_ENABLE_SOCIETE, ROWS_5, 70); $doleditor->Create(); - print ''; - if ($user->rights->ticket->write && !$user->socid) { - print $form->textwithpicto('', $langs->trans("TicketMessageHelp"), 1, 'help'); - } - print '
'.$langs->trans("MailFile").''; + $out .= ''; // TODO Trick to have param removedfile containing nb of image to delete. But this does not works without javascript $out .= ''."\n"; $out .= '