From bd193b26f6e6b7518c64ee8850679f0dd61f6a26 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 19 Jul 2019 18:02:39 +0200 Subject: [PATCH] FIX Block to link with tickets --- htdocs/ticket/tpl/linkedobjectblock.tpl.php | 83 ++++++++++++++------- 1 file changed, 55 insertions(+), 28 deletions(-) diff --git a/htdocs/ticket/tpl/linkedobjectblock.tpl.php b/htdocs/ticket/tpl/linkedobjectblock.tpl.php index 3391437dbb1..3a5cc46600a 100644 --- a/htdocs/ticket/tpl/linkedobjectblock.tpl.php +++ b/htdocs/ticket/tpl/linkedobjectblock.tpl.php @@ -13,8 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * along with this program. If not, see . */ // Protection to avoid direct call of template if (empty($conf) || ! is_object($conf)) @@ -28,37 +27,65 @@ if (empty($conf) || ! is_object($conf)) load('ticket'); $linkedObjectBlock = $GLOBALS['linkedObjectBlock']; -echo '
'; -print load_fiche_titre($langs->trans('RelatedTickets')); + +// Load translation files required by the page +$langs->load('ticket'); + +$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc'); + +$total=0; $ilink=0; +foreach($linkedObjectBlock as $key => $objectlink) +{ + $ilink++; + + $trclass='oddeven'; + if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> - - - - - - + + + + + + socid = $objectlink->fk_soc; + //$objectlink->fetch_thirdparty(); + ?> + + + - - - +} +if (count($linkedObjectBlock) > 1) +{ + ?> + + + + + + + + + socid = $object->fk_soc; - $object->fetch_thirdparty(); - ?> - - - - -
trans("Subject"); ?>trans("DateCreation"); ?>trans("Customer"); ?>trans("Status"); ?>
trans("Ticket"); ?> + global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) print ' + getNomUrl(1); ?>ref_client; ?>datec, 'day'); ?>thirdparty->getNomUrl(1); ?>getLibStatut(3); ?> + element != 'shipping') { + ?> + ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> + +
- subject) ? ' '.$object->subject : ''); ?> - - datec, 'day'); ?>
trans("Total"); ?>
thirdparty->getNomUrl(1); ?>getLibstatut(2); ?>
+} +?>