From 03f9455bf78168860af5f0c052e20ce17cd99271 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Wed, 5 Dec 2007 12:36:30 +0000 Subject: [PATCH] =?UTF-8?q?Ajout=20de=20la=20possibilit=E9=20de=20d=E9term?= =?UTF-8?q?iner=20si=20on=20veut=20voir=20ou=20non=20la=20date=20en=20enti?= =?UTF-8?q?er=20des=20actions=20dans=20la=20fiche=20tiers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- htdocs/admin/societe.php | 30 +++++++++++++++++++++++++++++- htdocs/comm/fiche.php | 8 ++++---- htdocs/comm/prospect/fiche.php | 8 ++++---- htdocs/fourn/fiche.php | 8 ++++---- htdocs/langs/en_US/admin.lang | 3 ++- htdocs/langs/fr_FR/admin.lang | 1 + 6 files changed, 44 insertions(+), 14 deletions(-) diff --git a/htdocs/admin/societe.php b/htdocs/admin/societe.php index c798cb8093e..521e60b3489 100644 --- a/htdocs/admin/societe.php +++ b/htdocs/admin/societe.php @@ -2,6 +2,7 @@ /* Copyright (C) 2004 Rodolphe Quiedeville * Copyright (C) 2004 Éric Seigne * Copyright (C) 2005-2007 Laurent Destailleur + * Copyright (C) 2005-2007 Regis Houssin * * 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 @@ -77,6 +78,19 @@ if ($_POST["action"] == 'usesearchtoselectcompany') } } +if ($_POST["action"] == 'viewfulldateactions') +{ + if (dolibarr_set_const($db, "COMPANY_VIEW_FULL_DATE_ACTIONS", $_POST["activate_viewfulldateactions"])) + { + Header("Location: ".$_SERVER["PHP_SELF"]); + exit; + } + else + { + dolibarr_print_error($db); + } +} + // défini les constantes du modèle tigre if ($_POST["action"] == 'updateMask') { @@ -237,7 +251,7 @@ print " ".$langs->trans("Parameters")."\n"; print " ".$langs->trans("Value")."\n"; print "  \n"; -// utilisation formulaire Ajax sur choix société +// Utilisation formulaire Ajax sur choix société $var=!$var; print "
"; print ""; @@ -260,6 +274,20 @@ else print ''; print '
'; +// Faire apparaitre les dates en entier dans la liste des actions +$var=!$var; +print "
"; +print ""; +print ""; +print ''.$langs->trans("ViewFullDateActions").''; +print ''; +print $html->selectyesno("activate_viewfulldateactions",$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS,1); +print ''; +print ''; +print ""; +print ''; +print '
'; + print ''; $db->close(); diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 195fd725558..e9f26f1a902 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -741,7 +741,7 @@ if ($socid > 0) $obj = $db->fetch_object($result); print ""; - if ($oldyear == strftime("%Y",$obj->dp) ) + if ($oldyear == strftime("%Y",$obj->dp) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } @@ -751,7 +751,7 @@ if ($socid > 0) $oldyear = strftime("%Y",$obj->dp); } - if ($oldmonth == strftime("%Y%b",$obj->dp) ) + if ($oldmonth == strftime("%Y%b",$obj->dp) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } @@ -873,7 +873,7 @@ if ($socid > 0) print ""; // Champ date - if ($oldyear == strftime("%Y",$obj->da) ) + if ($oldyear == strftime("%Y",$obj->da) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } @@ -883,7 +883,7 @@ if ($socid > 0) $oldyear = strftime("%Y",$obj->da); } - if ($oldmonth == strftime("%Y%b",$obj->da) ) + if ($oldmonth == strftime("%Y%b",$obj->da) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } diff --git a/htdocs/comm/prospect/fiche.php b/htdocs/comm/prospect/fiche.php index 144c367dfa3..1c16d392238 100644 --- a/htdocs/comm/prospect/fiche.php +++ b/htdocs/comm/prospect/fiche.php @@ -339,7 +339,7 @@ if ($socid > 0) $obj = $db->fetch_object($result); print ""; - if ($oldyear == strftime("%Y",$obj->dp) ) + if ($oldyear == strftime("%Y",$obj->dp) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } @@ -349,7 +349,7 @@ if ($socid > 0) $oldyear = strftime("%Y",$obj->dp); } - if ($oldmonth == strftime("%Y%b",$obj->dp) ) + if ($oldmonth == strftime("%Y%b",$obj->dp) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } @@ -438,14 +438,14 @@ if ($socid > 0) $obj = $db->fetch_object($result); print ""; - if ($oldyear == strftime("%Y",$obj->da) ) { + if ($oldyear == strftime("%Y",$obj->da) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } else { print ''.strftime("%Y",$obj->da)."\n"; $oldyear = strftime("%Y",$obj->da); } - if ($oldmonth == strftime("%Y%b",$obj->da) ) { + if ($oldmonth == strftime("%Y%b",$obj->da) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } else { print ''.strftime("%b",$obj->da)."\n"; diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index d61ed36a982..e2bab69824a 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -390,7 +390,7 @@ if ( $societe->fetch($socid) ) $obj = $db->fetch_object($result); print ""; - if ($oldyear == strftime("%Y",$obj->dp) ) + if ($oldyear == strftime("%Y",$obj->dp) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } @@ -400,7 +400,7 @@ if ( $societe->fetch($socid) ) $oldyear = strftime("%Y",$obj->dp); } - if ($oldmonth == strftime("%Y%b",$obj->dp) ) + if ($oldmonth == strftime("%Y%b",$obj->dp) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } @@ -493,7 +493,7 @@ if ( $societe->fetch($socid) ) $obj = $db->fetch_object($result); print ""; - if ($oldyear == strftime("%Y",$obj->da) ) + if ($oldyear == strftime("%Y",$obj->da) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } else { @@ -501,7 +501,7 @@ if ( $societe->fetch($socid) ) $oldyear = strftime("%Y",$obj->da); } - if ($oldmonth == strftime("%Y%b",$obj->da) ) + if ($oldmonth == strftime("%Y%b",$obj->da) && !$conf->global->COMPANY_VIEW_FULL_DATE_ACTIONS) { print '|'; } else { diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index 96999ea24f3..3d6a5dc732d 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -21,7 +21,8 @@ DictionnarySetup=Dictionnary setup DisableJavascript=Disable JavaScript functions DisableAjax=Disable Ajax functions ConfirmAjax=Use Ajax confirmation popups -UseSearchToSelectProduct=Use a search form to choose a company (intead of using a list box) +UseSearchToSelectCompany=Use a search form to choose a company (intead of using a list box) +ViewFullDateActions=Show full dates actions in the third sheet NotAvailableWhenAjaxDisabled=Not available when Ajax disabled JavascriptDisabled=JavaScript disabled UsePopupCalendar=Use popup for dates input diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 788e27e0968..d87405ef782 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -22,6 +22,7 @@ DisableJavascript=D DisableAjax=Désactiver les fonctions Ajax ConfirmAjax=Utiliser les popups de confirmation Ajax UseSearchToSelectCompany=Utiliser un formulaire de recherche pour choix d'un tiers (plutôt que liste déroulante) +ViewFullDateActions=Visualiser les dates des actions en entier dans la fiche tiers NotAvailableWhenAjaxDisabled=Non disponible quand Ajax désactivé JavascriptDisabled=Javascript désactivé UsePopupCalendar=Utiliser les popups pour la saisie des dates