diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 795ece72fe8..e8f7485c5b0 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1370,8 +1370,19 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi $showimage=$object->is_photo_available($conf->ticket->multidir_output[$entity].'/'.$object->ref); $maxvisiblephotos=(isset($conf->global->TICKET_MAX_VISIBLE_PHOTO)?$conf->global->TICKET_MAX_VISIBLE_PHOTO:2); if ($conf->browser->layout == 'phone') $maxvisiblephotos=1; - if ($showimage) $morehtmlleft.='
'.$object->show_photos('ticket', $conf->ticket->multidir_output[$entity], 'small', $maxvisiblephotos, 0, 0, 0, $width, 0).'
'; - else + if ($showimage) + { + $showphoto = $object->show_photos('ticket', $conf->ticket->multidir_output[$entity], 'small', $maxvisiblephotos, 0, 0, 0, $width, 0); + if ($object->nbphoto > 0) + { + $morehtmlleft.='
'.$showphoto.'
'; + } + else + { + $showimage = 0; + } + } + if (! $showimage) { if (!empty($conf->global->TICKET_NODISPLAYIFNOPHOTO)) { $nophoto=''; diff --git a/htdocs/core/lib/ticket.lib.php b/htdocs/core/lib/ticket.lib.php index 0b27e003b5f..cba8f727c8d 100644 --- a/htdocs/core/lib/ticket.lib.php +++ b/htdocs/core/lib/ticket.lib.php @@ -502,38 +502,36 @@ function show_ticket_messaging($conf, $langs, $db, $filterobj, $objcon = '', $no $out.="\n"; $out.='
'; - $out.=''; + $out.='
'; $out.=''; - $out.=''; + //$out.=''; - $out.=''; + $out.=''; if ($donetodo) { - $out.=''; + $out.=''; } - $out.=''; - $out.=''; $out.='';
'; + //$out.=''; if($sortorder === 'desc') { - $sortUrl = $_SERVER["PHP_SELF"] . '?sortfield=a.datep&sortorder=asc' . $param; - $out .= dolGetButtonTitle($langs->trans('Date'), $langs->trans('OrderByDateAsc'), 'fa fa-sort-numeric-down', $sortUrl, '', 1); + $out .= getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center ')."\n"; } else{ - $sortUrl = $_SERVER["PHP_SELF"] . '?sortfield=a.datep&sortorder=desc' . $param; - $out .= dolGetButtonTitle($langs->trans('Date'), $langs->trans('OrderByDateDesc'), 'fa fa-sort-numeric-down-alt', $sortUrl, '', 1); + $out .= getTitleFieldOfList('Date', 0, $_SERVER["PHP_SELF"], 'a.datep', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center ')."\n"; } - $out.=''.$langs->trans("Search").' : '.$langs->trans("Search").' : '.$langs->trans("Type").' '; + $out.=''.$langs->trans("Type").' '; $out.=$formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE)?1:-1, 0, 0, 1); - $out.=''; - $out.=''; + $out.=''; + $out.=''; $out.=$langs->trans("Label").' '; $out.=''; - $out.=''; + $out.=''; + $out.=''; $searchpicto=$form->showFilterAndCheckAddButtons($massactionbutton?1:0, 'checkforselect', 1); $out.=$searchpicto; - $out.=''; + $out.='