From 626e3fd90e8cf244f123c9bd8dc77f211ea1dd27 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 6 Sep 2019 02:34:24 +0200 Subject: [PATCH] Fix look and feel v10 --- htdocs/commande/tpl/linkedobjectblock.tpl.php | 4 +- .../reception/tpl/linkedobjectblock.tpl.php | 39 +++++++++++++------ 2 files changed, 29 insertions(+), 14 deletions(-) diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index 74a2243d633..c2fed2895a8 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -81,8 +81,8 @@ if (count($linkedObjectBlock) > 1) trans("Total"); ?> - - + + diff --git a/htdocs/reception/tpl/linkedobjectblock.tpl.php b/htdocs/reception/tpl/linkedobjectblock.tpl.php index 9601c661c70..2b66b76e9dd 100644 --- a/htdocs/reception/tpl/linkedobjectblock.tpl.php +++ b/htdocs/reception/tpl/linkedobjectblock.tpl.php @@ -1,6 +1,7 @@ - * Copyright (C) 2014 Marcos García +/* Copyright (C) 2012 Regis Houssin + * Copyright (C) 2014 Marcos García + * Copyright (C) 2019 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -15,6 +16,14 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ + +// Protection to avoid direct call of template +if (empty($conf) || ! is_object($conf)) +{ + print "Error, template page can't be called as URL"; + exit; +} + ?> @@ -22,41 +31,47 @@ load("receptions"); +$linkedObjectBlock = dol_sort_array($linkedObjectBlock, 'date', 'desc', 0, 0, 1); + $total=0; $ilink=0; -$var=true; foreach($linkedObjectBlock as $key => $objectlink) { $ilink++; - $trclass=($var?'pair':'impair'); + $trclass='oddeven'; if ($ilink == count($linkedObjectBlock) && empty($noMoreLinkedObjectBlockAfter) && count($linkedObjectBlock) <= 1) $trclass.=' liste_sub_total'; ?> - trans("Reception"); ?> - getNomUrl(1); ?> - - date_delivery, 'day'); ?> - trans("Reception"); ?> + global->MAIN_ENABLE_IMPORT_LINKED_OBJECT_LINES) print ' + + getNomUrl(1); ?> + + date_delivery, 'day'); ?> + rights->reception->lire) { $total = $total + $objectlink->total_ht; echo price($objectlink->total_ht); } ?> - getLibStatut(3); ?> - + getLibStatut(3); ?> + element != 'order_supplier') { ?> - ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> + ">transnoentitiesnoconv("RemoveLink"), 'unlink'); ?> +