From 2ee7becfed5b815d62e2bd3d166b12b7a9220f05 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 16 Dec 2011 18:31:54 +0100 Subject: [PATCH] New: add constant MAIN_VIEW_LINE_NUMBER --- htdocs/core/class/commonobject.class.php | 4 ++++ htdocs/core/tpl/freeproductline_create.tpl.php | 6 +++--- htdocs/core/tpl/freeproductline_view.tpl.php | 7 +++++-- htdocs/core/tpl/predefinedproductline_create.tpl.php | 6 +++--- htdocs/core/tpl/predefinedproductline_view.tpl.php | 6 ++++-- htdocs/expedition/fiche.php | 11 ++++++++++- 6 files changed, 29 insertions(+), 11 deletions(-) diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 302e3a86286..064386e306c 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -2013,6 +2013,10 @@ abstract class CommonObject */ print ''; + if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) + { + print ' '; + } print ''.$langs->trans('Description').''; print ''.$langs->trans('VAT').''; print ''.$langs->trans('PriceUHT').''; diff --git a/htdocs/core/tpl/freeproductline_create.tpl.php b/htdocs/core/tpl/freeproductline_create.tpl.php index 77e9274e5d2..feb8ea114a2 100644 --- a/htdocs/core/tpl/freeproductline_create.tpl.php +++ b/htdocs/core/tpl/freeproductline_create.tpl.php @@ -27,7 +27,7 @@ - trans('AddNewLine').' - '.$langs->trans("FreeZone"); ?> + global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>>trans('AddNewLine').' - '.$langs->trans("FreeZone"); ?> trans('VAT'); ?> trans('PriceUHT'); ?> trans('Qty'); ?> @@ -41,7 +41,7 @@ > - + global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="2"' : ''); ?>> select_type_of_lines(isset($_POST["type"])?$_POST["type"]:-1,'type',1); if (($conf->product->enabled && $conf->service->enabled) || (empty($conf->product->enabled) && empty($conf->service->enabled))) echo '
'; @@ -75,7 +75,7 @@ service->enabled && $dateSelector) { ?> > - + global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="10"' : ' colspan="9s"'); ?>> trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; echo $form->select_date('','date_start',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addproduct"); diff --git a/htdocs/core/tpl/freeproductline_view.tpl.php b/htdocs/core/tpl/freeproductline_view.tpl.php index 3039a9cf15f..fad305f9109 100644 --- a/htdocs/core/tpl/freeproductline_view.tpl.php +++ b/htdocs/core/tpl/freeproductline_view.tpl.php @@ -1,6 +1,6 @@ - * Copyright (C) 2010 Laurent Destailleur +/* Copyright (C) 2010-2011 Regis Houssin + * Copyright (C) 2010-2011 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 @@ -20,6 +20,9 @@ > + global->MAIN_VIEW_LINE_NUMBER)) { ?> + + info_bits & 2) == 2) { ?> diff --git a/htdocs/core/tpl/predefinedproductline_create.tpl.php b/htdocs/core/tpl/predefinedproductline_create.tpl.php index 54075274ebd..c9791d4a060 100644 --- a/htdocs/core/tpl/predefinedproductline_create.tpl.php +++ b/htdocs/core/tpl/predefinedproductline_create.tpl.php @@ -28,7 +28,7 @@ - + global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="4"' : ' colspan="3"'); ?>> trans("AddNewLine").' - '; if ($conf->service->enabled) @@ -56,7 +56,7 @@ jQuery(document).ready(function() { > - + global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="4"' : ' colspan="3"'); ?>> select_produits('','idprod','',$conf->product->limit_size,$buyer->price_level); @@ -83,7 +83,7 @@ jQuery(document).ready(function() { service->enabled && $dateSelector) {?> > - + global->MAIN_VIEW_LINE_NUMBER) ? ' colspan="10"' : ' colspan="9"'); ?>> trans('ServiceLimitedDuration').' '.$langs->trans('From').' '; echo $form->select_date('','date_start_predef',$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE,1,"addpredefinedproduct"); diff --git a/htdocs/core/tpl/predefinedproductline_view.tpl.php b/htdocs/core/tpl/predefinedproductline_view.tpl.php index 09a61c177e2..1e398b688bf 100644 --- a/htdocs/core/tpl/predefinedproductline_view.tpl.php +++ b/htdocs/core/tpl/predefinedproductline_view.tpl.php @@ -20,8 +20,10 @@ > - - + global->MAIN_VIEW_LINE_NUMBER)) { ?> + + + textwithtooltip($text,$description,3,'','',$i,0,($line->fk_parent_line?img_picto('', 'rightarrow'):'')); diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index 8c87face017..022a5ac211d 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -1104,6 +1104,10 @@ else */ print '
'; print ''; + if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) + { + print ''; + } print ''; print ''; if ($object->fk_statut <= 1) @@ -1123,6 +1127,7 @@ else { print ''; } + print "\n"; $var=false; @@ -1130,6 +1135,11 @@ else for ($i = 0 ; $i < $num_prod ; $i++) { print ""; + + if (! empty($conf->global->MAIN_VIEW_LINE_NUMBER)) + { + print ''; + } // Predefined product or service if ($lines[$i]->fk_product > 0) @@ -1195,7 +1205,6 @@ else print ''; } - print ""; $var=!$var;
 '.$langs->trans("Products").''.$langs->trans("QtyOrdered").''.$langs->trans("WarehouseSource").'
'.($i+1).'