Add picto/link for sending email on ticket
This commit is contained in:
parent
625df49850
commit
dfe5b4ae49
@ -1737,7 +1737,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
||||
$out .= '<td class="liste_titre"></td>';
|
||||
$out .= '<td class="liste_titre"></td>';
|
||||
$out .= '<td class="liste_titre">';
|
||||
$out .= $formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1, 0, (empty($conf->global->AGENDA_USE_MULTISELECT_TYPE) ? 0 : 1), 1, 'minwidth200');
|
||||
$out .= $formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1, 0, (empty($conf->global->AGENDA_USE_MULTISELECT_TYPE) ? 0 : 1), 1, 'minwidth100 maxwidth150');
|
||||
$out .= '</td>';
|
||||
$out .= '<td class="liste_titre maxwidth100onsmartphone"><input type="text" class="maxwidth100onsmartphone" name="search_agenda_label" value="'.$filters['search_agenda_label'].'"></td>';
|
||||
$out .= '<td class="liste_titre center">';
|
||||
|
||||
@ -10660,7 +10660,7 @@ function dolGetButtonTitle($label, $helpText = '', $iconClass = 'fa fa-file', $u
|
||||
}
|
||||
|
||||
$class = 'btnTitle';
|
||||
if (in_array($iconClass, array('fa fa-plus-circle', 'fa fa-plus-circle size15x', 'fa fa-comment-dots'))) {
|
||||
if (in_array($iconClass, array('fa fa-plus-circle', 'fa fa-plus-circle size15x', 'fa fa-comment-dots', 'fa fa-paper-plane'))) {
|
||||
$class .= ' btnTitlePlus';
|
||||
}
|
||||
$useclassfortooltip = 1;
|
||||
|
||||
@ -86,7 +86,7 @@ function ticket_prepare_head($object)
|
||||
|
||||
$h = 0;
|
||||
$head = array();
|
||||
$head[$h][0] = DOL_URL_ROOT.'/ticket/card.php?action=view&track_id='.$object->track_id;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/ticket/card.php?track_id='.$object->track_id;
|
||||
$head[$h][1] = $langs->trans("Ticket");
|
||||
$head[$h][2] = 'tabTicket';
|
||||
$h++;
|
||||
|
||||
@ -247,6 +247,11 @@ if (!empty($object->id)) {
|
||||
$messagingUrl = DOL_URL_ROOT.'/ticket/agenda.php?track_id='.$object->track_id;
|
||||
$morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 1, array('morecss'=>'btnTitleSelected'));
|
||||
|
||||
// Show link to send an email (if read and not closed)
|
||||
$btnstatus = $object->status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage";
|
||||
$url = 'card.php?track_id='.$object->track_id.'&action=presend_addmessage&mode=init&private_message=0&send_email=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id);
|
||||
$morehtmlright .= dolGetButtonTitle($langs->trans('SendMail'), '', 'fa fa-paper-plane', $url, 'email-title-button', $btnstatus);
|
||||
|
||||
// Show link to add a message (if read and not closed)
|
||||
$btnstatus = $object->status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage";
|
||||
$url = 'card.php?track_id='.$object->track_id.'&action=presend_addmessage&mode=init';
|
||||
|
||||
@ -1411,6 +1411,11 @@ if ($action == 'create' || $action == 'presend') {
|
||||
}
|
||||
|
||||
if (empty($reshook)) {
|
||||
// Email
|
||||
if (isset($object->status) && $object->status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage") {
|
||||
print dolGetButtonAction('', $langs->trans('SendMail'), 'default', $_SERVER["PHP_SELF"].'?action=presend_addmessage&send_email=1&private_message=0&mode=init&token='.newToken().'&track_id='.$object->track_id, '');
|
||||
}
|
||||
|
||||
// Show link to add a message (if read and not closed)
|
||||
if (isset($object->status) && $object->status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage") {
|
||||
print dolGetButtonAction('', $langs->trans('TicketAddMessage'), 'default', $_SERVER["PHP_SELF"].'?action=presend_addmessage&mode=init&token='.newToken().'&track_id='.$object->track_id, '');
|
||||
|
||||
@ -244,8 +244,12 @@ if (!empty($object->id)) {
|
||||
$messagingUrl = DOL_URL_ROOT.'/ticket/agenda.php?track_id='.$object->track_id;
|
||||
$morehtmlright .= dolGetButtonTitle($langs->trans('MessageListViewType'), '', 'fa fa-bars imgforviewmode', $messagingUrl, '', 1);
|
||||
|
||||
// Show link to send an email (if read and not closed)
|
||||
$btnstatus = $object->status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage";
|
||||
$url = 'card.php?track_id='.$object->track_id.'&action=presend_addmessage&mode=init&private_message=0&send_email=1&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id);
|
||||
$morehtmlright .= dolGetButtonTitle($langs->trans('SendMail'), '', 'fa fa-paper-plane', $url, 'email-title-button', $btnstatus);
|
||||
|
||||
// Show link to add a message (if read and not closed)
|
||||
// Show link to add a private message (if read and not closed)
|
||||
$btnstatus = $object->status < Ticket::STATUS_CLOSED && $action != "presend" && $action != "presend_addmessage";
|
||||
$url = 'card.php?track_id='.$object->track_id.'&action=presend_addmessage&mode=init&backtopage='.urlencode($_SERVER["PHP_SELF"].'?track_id='.$object->track_id);
|
||||
$morehtmlright .= dolGetButtonTitle($langs->trans('TicketAddMessage'), '', 'fa fa-comment-dots', $url, 'add-new-ticket-title-button', $btnstatus);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user