diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index fb274d06c20..21761286131 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -485,27 +485,50 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $userstatic=new User($db); $contactstatic = new Contact($db); $userGetNomUrlCache = array(); -// $out.='
'; -// if ($objcon && get_class($objcon) == 'Contact' && -// (is_null($filterobj) || get_class($filterobj) == 'Societe')) -// { -// $out.=''; -// } -// else -// { -// $out.=''; -// } -// if ($filterobj && get_class($filterobj) == 'Societe') $out.=''; -// -// -// $out.=$formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:-1, 0, 0, 1); -// -// $out.=''; -// -// $searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1); -// $out.=$searchpicto; -// -// $out.='
'; + + $out.='
'; + $out.='
'; + if ($objcon && get_class($objcon) == 'Contact' && + (is_null($filterobj) || get_class($filterobj) == 'Societe')) + { + $out.=''; + } + else + { + $out.=''; + } + if ($filterobj && get_class($filterobj) == 'Societe') $out.=''; + + $out.="\n"; + + $out.='
'; + $out.=''; + + $out.=''; + $out.=''; + if ($donetodo) + { + $out.=''; + } + $out.=''; + $out.=''; + + $out.=''; + $out.=''; + + + $out.='
'.$langs->trans("Search").' : '.$langs->trans("Type").' '; + $out.=$formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:-1, 0, 0, 1); + $out.=''; + $out.=$langs->trans("Label").' '; + $out.=''; + $out.=''; + $searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1); + $out.=$searchpicto; + $out.='
'; + + $out.=''; + $out.='
'; $out.="\n"; @@ -614,7 +637,19 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $out.=''; - //$out.=''.$langs->trans('Show').''; + if (isset($histo[$key]['type']) && $histo[$key]['type']=='mailing') { + $out.=''.img_object($langs->trans("ShowEMailing"), "email").' '; + $out.=$histo[$key]['id']; + $out.=' '; + } else { + $out.=$actionstatic->getNomUrl(1, -1).' '; + } + +// if ($user->rights->agenda->allactions->read || $actionstatic->authorid == $user->id) +// { +// $out.=''.$langs->trans('Show').''; +// } + if ($user->rights->agenda->allactions->create || (($actionstatic->authorid == $user->id || $actionstatic->userownerid == $user->id) && $user->rights->agenda->myactions->create)) @@ -645,13 +680,7 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no // Ref $out.='

'; -// if (isset($histo[$key]['type']) && $histo[$key]['type']=='mailing') { -// $out.=''.img_object($langs->trans("ShowEMailing"), "email").' '; -// $out.=$histo[$key]['id']; -// $out.=''; -// } else { -// $out.=$actionstatic->getNomUrl(1, -1); -// } + // Author of event $out.='';