From 3e00c223c144ac82b3c4c0e6fb27ada0b83a6185 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Thu, 30 Jul 2009 16:27:51 +0000 Subject: [PATCH] Fix: move common templates in core directory Fix: rename canvas in templates --- .settings/org.eclipse.core.resources.prefs | 17 ++++++++--------- htdocs/admin/produit.php | 2 +- htdocs/{theme/common => core}/templates/README | 0 .../{theme/common => core}/templates/error.tpl | 0 .../canvas/default => core/templates}/index.php | 0 .../class/pdf_courrier_droit_editeur.class.php | 2 +- htdocs/multicompany/multicompany.class.php | 2 +- htdocs/product/fiche.php | 6 +++--- htdocs/product/liste.php | 6 +++--- htdocs/product/pre.inc.php | 2 +- .../{canvas => templates/default}/index.php | 0 .../{canvas => templates}/default/liste.tpl | 0 .../{canvas/livre => templates}/index.php | 0 .../livrecontrat => templates/livre}/index.php | 0 .../{canvas => templates}/livre/liste.tpl | 0 .../livre/livre-create.tpl | 0 .../{canvas => templates}/livre/livre-edit.tpl | 0 .../{canvas => templates}/livre/livre-view.tpl | 0 .../livrecontrat}/index.php | 0 .../livrecontrat/livrecontrat-edit.tpl | 0 .../livrecontrat/livrecontrat-view.tpl | 0 .../templates/livrecouverture}/index.php | 0 .../livrecouverture/livrecouverture-edit.tpl | 0 .../livrecouverture/livrecouverture-view.tpl | 0 .../product.livre.class.php | 4 ++-- .../product.livrecontrat.class.php | 4 ++-- .../product.livrecouverture.class.php | 4 ++-- htdocs/theme/auguria/templates/README | 3 +++ htdocs/theme/auguria/templates/index.php | 0 htdocs/theme/bluelagoon/templates/README | 3 +++ htdocs/theme/bluelagoon/templates/index.php | 0 htdocs/theme/freelug/templates/README | 3 +++ htdocs/theme/freelug/templates/index.php | 0 htdocs/theme/rodolphe/templates/README | 3 +++ htdocs/theme/rodolphe/templates/index.php | 0 htdocs/theme/yellow/templates/README | 3 +++ htdocs/theme/yellow/templates/index.php | 0 scripts/books/droits-editeurs.php | 2 +- 38 files changed, 40 insertions(+), 26 deletions(-) rename htdocs/{theme/common => core}/templates/README (100%) rename htdocs/{theme/common => core}/templates/error.tpl (100%) rename htdocs/{product/canvas/default => core/templates}/index.php (100%) rename htdocs/product/{canvas => templates/default}/index.php (100%) rename htdocs/product/{canvas => templates}/default/liste.tpl (100%) rename htdocs/product/{canvas/livre => templates}/index.php (100%) rename htdocs/product/{canvas/livrecontrat => templates/livre}/index.php (100%) rename htdocs/product/{canvas => templates}/livre/liste.tpl (100%) rename htdocs/product/{canvas => templates}/livre/livre-create.tpl (100%) rename htdocs/product/{canvas => templates}/livre/livre-edit.tpl (100%) rename htdocs/product/{canvas => templates}/livre/livre-view.tpl (100%) rename htdocs/product/{canvas/livrecouverture => templates/livrecontrat}/index.php (100%) rename htdocs/product/{canvas => templates}/livrecontrat/livrecontrat-edit.tpl (100%) rename htdocs/product/{canvas => templates}/livrecontrat/livrecontrat-view.tpl (100%) rename htdocs/{theme/common/templates => product/templates/livrecouverture}/index.php (100%) rename htdocs/product/{canvas => templates}/livrecouverture/livrecouverture-edit.tpl (100%) rename htdocs/product/{canvas => templates}/livrecouverture/livrecouverture-view.tpl (100%) rename htdocs/product/{canvas => templates}/product.livre.class.php (99%) rename htdocs/product/{canvas => templates}/product.livrecontrat.class.php (97%) rename htdocs/product/{canvas => templates}/product.livrecouverture.class.php (96%) create mode 100644 htdocs/theme/auguria/templates/README create mode 100644 htdocs/theme/auguria/templates/index.php create mode 100644 htdocs/theme/bluelagoon/templates/README create mode 100644 htdocs/theme/bluelagoon/templates/index.php create mode 100644 htdocs/theme/freelug/templates/README create mode 100644 htdocs/theme/freelug/templates/index.php create mode 100644 htdocs/theme/rodolphe/templates/README create mode 100644 htdocs/theme/rodolphe/templates/index.php create mode 100644 htdocs/theme/yellow/templates/README create mode 100644 htdocs/theme/yellow/templates/index.php diff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs index 7557e6f2b3f..959e5a9d314 100644 --- a/.settings/org.eclipse.core.resources.prefs +++ b/.settings/org.eclipse.core.resources.prefs @@ -49,7 +49,6 @@ encoding//htdocs/includes/menus/barre_left/eldy_frontoffice.php=ISO-8859-1 encoding//htdocs/includes/menus/barre_top/empty.php=ISO-8859-1 encoding//htdocs/includes/menus/barre_top/rodolphe.php=ISO-8859-1 encoding//htdocs/includes/modules/DolibarrModules.class.php=ISO-8859-1 -encoding//htdocs/includes/modules/facture/pdf_crabe.modules.php=ISO-8859-1 encoding//htdocs/includes/modules/modAdherent.class.php=ISO-8859-1 encoding//htdocs/includes/modules/modBanque.class.php=ISO-8859-1 encoding//htdocs/includes/modules/modCategorie.class.php=ISO-8859-1 @@ -619,14 +618,14 @@ encoding//htdocs/lib/product.lib.php=ISO-8859-1 encoding//htdocs/main.inc.php=ISO-8859-1 encoding//htdocs/master.inc.php=ISO-8859-1 encoding//htdocs/paiement.class.php=ISO-8859-1 -encoding//htdocs/product/canvas/livre/liste.tpl=UTF-8 -encoding//htdocs/product/canvas/livre/livre-create.tpl=UTF-8 -encoding//htdocs/product/canvas/livre/livre-edit.tpl=UTF-8 -encoding//htdocs/product/canvas/livre/livre-view.tpl=UTF-8 -encoding//htdocs/product/canvas/livrecontrat/livrecontrat-edit.tpl=UTF-8 -encoding//htdocs/product/canvas/livrecontrat/livrecontrat-view.tpl=UTF-8 -encoding//htdocs/product/canvas/livrecouverture/livrecouverture-edit.tpl=UTF-8 -encoding//htdocs/product/canvas/livrecouverture/livrecouverture-view.tpl=UTF-8 +encoding//htdocs/product/templates/livre/liste.tpl=UTF-8 +encoding//htdocs/product/templates/livre/livre-create.tpl=UTF-8 +encoding//htdocs/product/templates/livre/livre-edit.tpl=UTF-8 +encoding//htdocs/product/templates/livre/livre-view.tpl=UTF-8 +encoding//htdocs/product/templates/livrecontrat/livrecontrat-edit.tpl=UTF-8 +encoding//htdocs/product/templates/livrecontrat/livrecontrat-view.tpl=UTF-8 +encoding//htdocs/product/templates/livrecouverture/livrecouverture-edit.tpl=UTF-8 +encoding//htdocs/product/templates/livrecouverture/livrecouverture-view.tpl=UTF-8 encoding//htdocs/product/fiche.php=ISO-8859-1 encoding//htdocs/product/reassort.php=ISO-8859-1 encoding//htdocs/product/stats/fiche.php=ISO-8859-1 diff --git a/htdocs/admin/produit.php b/htdocs/admin/produit.php index 7b280a15dba..474d2901d2b 100644 --- a/htdocs/admin/produit.php +++ b/htdocs/admin/produit.php @@ -306,7 +306,7 @@ if ($conf->global->PRODUCT_CANVAS_ABILITY) print "  \n"; require_once(DOL_DOCUMENT_ROOT . "/product.class.php"); - $dir = DOL_DOCUMENT_ROOT . "/product/canvas/"; + $dir = DOL_DOCUMENT_ROOT . "/product/templates/"; if ($conf->global->PRODUCT_CANVAS_ABILITY) { diff --git a/htdocs/theme/common/templates/README b/htdocs/core/templates/README similarity index 100% rename from htdocs/theme/common/templates/README rename to htdocs/core/templates/README diff --git a/htdocs/theme/common/templates/error.tpl b/htdocs/core/templates/error.tpl similarity index 100% rename from htdocs/theme/common/templates/error.tpl rename to htdocs/core/templates/error.tpl diff --git a/htdocs/product/canvas/default/index.php b/htdocs/core/templates/index.php similarity index 100% rename from htdocs/product/canvas/default/index.php rename to htdocs/core/templates/index.php diff --git a/htdocs/docs/class/pdf_courrier_droit_editeur.class.php b/htdocs/docs/class/pdf_courrier_droit_editeur.class.php index b8257035887..6fe13eaa9b1 100644 --- a/htdocs/docs/class/pdf_courrier_droit_editeur.class.php +++ b/htdocs/docs/class/pdf_courrier_droit_editeur.class.php @@ -67,7 +67,7 @@ class pdf_courrier_droit_editeur require_once(FPDF_PATH.'fpdf.php'); require_once(DOL_DOCUMENT_ROOT."/product.class.php"); - require_once(DOL_DOCUMENT_ROOT."/product/canvas/product.livre.class.php"); + require_once(DOL_DOCUMENT_ROOT."/product/templates/product.livre.class.php"); $error = 0; $year = strftime("%Y", time()); diff --git a/htdocs/multicompany/multicompany.class.php b/htdocs/multicompany/multicompany.class.php index 10840550212..91990bd99f2 100644 --- a/htdocs/multicompany/multicompany.class.php +++ b/htdocs/multicompany/multicompany.class.php @@ -17,7 +17,7 @@ */ /** - * \file htdocs/multicompany/canvas/multicompany.class.php + * \file htdocs/multicompany/multicompany.class.php * \ingroup multicompany * \brief File Class multicompany * \version $Id$ diff --git a/htdocs/product/fiche.php b/htdocs/product/fiche.php index 66d386ce2b0..00306b9ec48 100644 --- a/htdocs/product/fiche.php +++ b/htdocs/product/fiche.php @@ -572,7 +572,7 @@ if ($_GET["action"] == 'create' && ($user->rights->produit->creer || $user->righ { if (! isset($product)) { - $filecanvas=DOL_DOCUMENT_ROOT.'/product/canvas/product.'.$_GET["canvas"].'.class.php'; + $filecanvas=DOL_DOCUMENT_ROOT.'/product/templates/product.'.$_GET["canvas"].'.class.php'; if ($_GET["canvas"] && file_exists($filecanvas) ) { $class = 'Product'.ucfirst($_GET["canvas"]); @@ -759,7 +759,7 @@ if ($_GET["action"] == 'create' && ($user->rights->produit->creer || $user->righ // On assigne les valeurs meme en creation car elles sont definies si // on revient en erreur // - $smarty->template_dir = DOL_DOCUMENT_ROOT.'/product/canvas/'.$_GET["canvas"].'/'; + $smarty->template_dir = DOL_DOCUMENT_ROOT.'/product/templates/'.$_GET["canvas"].'/'; $tvaarray = load_tva($db,"tva_tx",$conf->defaulttx,$mysoc,''); $smarty->assign('tva_taux_value', $tvaarray['value']); $smarty->assign('tva_taux_libelle', $tvaarray['label']); @@ -797,7 +797,7 @@ if ($_GET["id"] || $_GET["ref"]) $result = $product->FetchCanvas($_GET["id"],'',$_GET["action"]); - $smarty->template_dir = DOL_DOCUMENT_ROOT.'/product/canvas/'.$product->canvas.'/'; + $smarty->template_dir = DOL_DOCUMENT_ROOT.'/product/templates/'.$product->canvas.'/'; $product->assign_smarty_values($smarty,$_GET["action"]); } diff --git a/htdocs/product/liste.php b/htdocs/product/liste.php index 0a040449bf4..1a216a512d0 100644 --- a/htdocs/product/liste.php +++ b/htdocs/product/liste.php @@ -213,15 +213,15 @@ if ($resql) $template = $_GET["canvas"].'/liste.tpl'; } // Check if a default template is present - else if (file_exists(DOL_DOCUMENT_ROOT . '/product/canvas/'.$_GET["canvas"].'/liste.tpl')) + else if (file_exists(DOL_DOCUMENT_ROOT . '/product/templates/'.$_GET["canvas"].'/liste.tpl')) { - $smarty->template_dir = DOL_DOCUMENT_ROOT . '/product/canvas/'; + $smarty->template_dir = DOL_DOCUMENT_ROOT . '/product/templates/'; $template = $_GET["canvas"].'/liste.tpl'; } // Error template else { - $smarty->template_dir = DOL_DOCUMENT_ROOT . '/theme/common/templates/'; + $smarty->template_dir = DOL_DOCUMENT_ROOT . '/core/templates/'; $template = 'error.tpl'; } diff --git a/htdocs/product/pre.inc.php b/htdocs/product/pre.inc.php index cc708d0dd6d..2da88542aeb 100644 --- a/htdocs/product/pre.inc.php +++ b/htdocs/product/pre.inc.php @@ -50,7 +50,7 @@ function llxHeader($head = "", $urlp = "", $title="") } // Produit specifique - $dir = DOL_DOCUMENT_ROOT . "/product/canvas/"; + $dir = DOL_DOCUMENT_ROOT . "/product/templates/"; if(is_dir($dir) && ! empty($conf->global->PRODUCT_CANVAS_ABILITY)) { if ($handle = opendir($dir)) diff --git a/htdocs/product/canvas/index.php b/htdocs/product/templates/default/index.php similarity index 100% rename from htdocs/product/canvas/index.php rename to htdocs/product/templates/default/index.php diff --git a/htdocs/product/canvas/default/liste.tpl b/htdocs/product/templates/default/liste.tpl similarity index 100% rename from htdocs/product/canvas/default/liste.tpl rename to htdocs/product/templates/default/liste.tpl diff --git a/htdocs/product/canvas/livre/index.php b/htdocs/product/templates/index.php similarity index 100% rename from htdocs/product/canvas/livre/index.php rename to htdocs/product/templates/index.php diff --git a/htdocs/product/canvas/livrecontrat/index.php b/htdocs/product/templates/livre/index.php similarity index 100% rename from htdocs/product/canvas/livrecontrat/index.php rename to htdocs/product/templates/livre/index.php diff --git a/htdocs/product/canvas/livre/liste.tpl b/htdocs/product/templates/livre/liste.tpl similarity index 100% rename from htdocs/product/canvas/livre/liste.tpl rename to htdocs/product/templates/livre/liste.tpl diff --git a/htdocs/product/canvas/livre/livre-create.tpl b/htdocs/product/templates/livre/livre-create.tpl similarity index 100% rename from htdocs/product/canvas/livre/livre-create.tpl rename to htdocs/product/templates/livre/livre-create.tpl diff --git a/htdocs/product/canvas/livre/livre-edit.tpl b/htdocs/product/templates/livre/livre-edit.tpl similarity index 100% rename from htdocs/product/canvas/livre/livre-edit.tpl rename to htdocs/product/templates/livre/livre-edit.tpl diff --git a/htdocs/product/canvas/livre/livre-view.tpl b/htdocs/product/templates/livre/livre-view.tpl similarity index 100% rename from htdocs/product/canvas/livre/livre-view.tpl rename to htdocs/product/templates/livre/livre-view.tpl diff --git a/htdocs/product/canvas/livrecouverture/index.php b/htdocs/product/templates/livrecontrat/index.php similarity index 100% rename from htdocs/product/canvas/livrecouverture/index.php rename to htdocs/product/templates/livrecontrat/index.php diff --git a/htdocs/product/canvas/livrecontrat/livrecontrat-edit.tpl b/htdocs/product/templates/livrecontrat/livrecontrat-edit.tpl similarity index 100% rename from htdocs/product/canvas/livrecontrat/livrecontrat-edit.tpl rename to htdocs/product/templates/livrecontrat/livrecontrat-edit.tpl diff --git a/htdocs/product/canvas/livrecontrat/livrecontrat-view.tpl b/htdocs/product/templates/livrecontrat/livrecontrat-view.tpl similarity index 100% rename from htdocs/product/canvas/livrecontrat/livrecontrat-view.tpl rename to htdocs/product/templates/livrecontrat/livrecontrat-view.tpl diff --git a/htdocs/theme/common/templates/index.php b/htdocs/product/templates/livrecouverture/index.php similarity index 100% rename from htdocs/theme/common/templates/index.php rename to htdocs/product/templates/livrecouverture/index.php diff --git a/htdocs/product/canvas/livrecouverture/livrecouverture-edit.tpl b/htdocs/product/templates/livrecouverture/livrecouverture-edit.tpl similarity index 100% rename from htdocs/product/canvas/livrecouverture/livrecouverture-edit.tpl rename to htdocs/product/templates/livrecouverture/livrecouverture-edit.tpl diff --git a/htdocs/product/canvas/livrecouverture/livrecouverture-view.tpl b/htdocs/product/templates/livrecouverture/livrecouverture-view.tpl similarity index 100% rename from htdocs/product/canvas/livrecouverture/livrecouverture-view.tpl rename to htdocs/product/templates/livrecouverture/livrecouverture-view.tpl diff --git a/htdocs/product/canvas/product.livre.class.php b/htdocs/product/templates/product.livre.class.php similarity index 99% rename from htdocs/product/canvas/product.livre.class.php rename to htdocs/product/templates/product.livre.class.php index b198d67a623..b0342f64068 100644 --- a/htdocs/product/canvas/product.livre.class.php +++ b/htdocs/product/templates/product.livre.class.php @@ -18,13 +18,13 @@ */ /** - * \file htdocs/product/canvas/product.livre.class.php + * \file htdocs/product/templates/product.livre.class.php * \ingroup produit * \brief Fichier de la classe des produits specifiques de type livre * \version $Id$ */ -require_once(DOL_DOCUMENT_ROOT.'/product/canvas/product.livrecontrat.class.php'); +require_once(DOL_DOCUMENT_ROOT.'/product/templates/product.livrecontrat.class.php'); /** diff --git a/htdocs/product/canvas/product.livrecontrat.class.php b/htdocs/product/templates/product.livrecontrat.class.php similarity index 97% rename from htdocs/product/canvas/product.livrecontrat.class.php rename to htdocs/product/templates/product.livrecontrat.class.php index e6835a4edef..79939683d85 100644 --- a/htdocs/product/canvas/product.livrecontrat.class.php +++ b/htdocs/product/templates/product.livrecontrat.class.php @@ -18,13 +18,13 @@ */ /** - \file htdocs/product/canvas/product.livre.class.php + \file htdocs/product/templates/product.livre.class.php \ingroup produit \brief Fichier de la classe des produits specifiques de type livre \version $Id$ */ -require_once(DOL_DOCUMENT_ROOT.'/product/canvas/product.livre.class.php'); +require_once(DOL_DOCUMENT_ROOT.'/product/templates/product.livre.class.php'); /** \class ProductLivreContrat diff --git a/htdocs/product/canvas/product.livrecouverture.class.php b/htdocs/product/templates/product.livrecouverture.class.php similarity index 96% rename from htdocs/product/canvas/product.livrecouverture.class.php rename to htdocs/product/templates/product.livrecouverture.class.php index 3dcb1b9fcf6..c4ffb1e6043 100644 --- a/htdocs/product/canvas/product.livrecouverture.class.php +++ b/htdocs/product/templates/product.livrecouverture.class.php @@ -17,13 +17,13 @@ */ /** - \file htdocs/product/canvas/product.livre.class.php + \file htdocs/product/templates/product.livre.class.php \ingroup produit \brief Fichier de la classe des produits specifiques de type livre \version $Id$ */ -require_once(DOL_DOCUMENT_ROOT.'/product/canvas/product.livre.class.php'); +require_once(DOL_DOCUMENT_ROOT.'/product/templates/product.livre.class.php'); /** \class ProductLivreCouverture diff --git a/htdocs/theme/auguria/templates/README b/htdocs/theme/auguria/templates/README new file mode 100644 index 00000000000..d3bc4b4679f --- /dev/null +++ b/htdocs/theme/auguria/templates/README @@ -0,0 +1,3 @@ +README (english) + +This directory is used to store custom templates. (system core and modules) \ No newline at end of file diff --git a/htdocs/theme/auguria/templates/index.php b/htdocs/theme/auguria/templates/index.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/bluelagoon/templates/README b/htdocs/theme/bluelagoon/templates/README new file mode 100644 index 00000000000..d3bc4b4679f --- /dev/null +++ b/htdocs/theme/bluelagoon/templates/README @@ -0,0 +1,3 @@ +README (english) + +This directory is used to store custom templates. (system core and modules) \ No newline at end of file diff --git a/htdocs/theme/bluelagoon/templates/index.php b/htdocs/theme/bluelagoon/templates/index.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/freelug/templates/README b/htdocs/theme/freelug/templates/README new file mode 100644 index 00000000000..d3bc4b4679f --- /dev/null +++ b/htdocs/theme/freelug/templates/README @@ -0,0 +1,3 @@ +README (english) + +This directory is used to store custom templates. (system core and modules) \ No newline at end of file diff --git a/htdocs/theme/freelug/templates/index.php b/htdocs/theme/freelug/templates/index.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/rodolphe/templates/README b/htdocs/theme/rodolphe/templates/README new file mode 100644 index 00000000000..d3bc4b4679f --- /dev/null +++ b/htdocs/theme/rodolphe/templates/README @@ -0,0 +1,3 @@ +README (english) + +This directory is used to store custom templates. (system core and modules) \ No newline at end of file diff --git a/htdocs/theme/rodolphe/templates/index.php b/htdocs/theme/rodolphe/templates/index.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/htdocs/theme/yellow/templates/README b/htdocs/theme/yellow/templates/README new file mode 100644 index 00000000000..d3bc4b4679f --- /dev/null +++ b/htdocs/theme/yellow/templates/README @@ -0,0 +1,3 @@ +README (english) + +This directory is used to store custom templates. (system core and modules) \ No newline at end of file diff --git a/htdocs/theme/yellow/templates/index.php b/htdocs/theme/yellow/templates/index.php new file mode 100644 index 00000000000..e69de29bb2d diff --git a/scripts/books/droits-editeurs.php b/scripts/books/droits-editeurs.php index c6be79e2968..eeea87a19b0 100644 --- a/scripts/books/droits-editeurs.php +++ b/scripts/books/droits-editeurs.php @@ -28,7 +28,7 @@ require_once("../../htdocs/master.inc.php"); require_once(FPDF_PATH.'fpdf.php'); require_once(DOL_DOCUMENT_ROOT."/product.class.php"); -require_once(DOL_DOCUMENT_ROOT."/product/canvas/product.livre.class.php"); +require_once(DOL_DOCUMENT_ROOT."/product/templates/product.livre.class.php"); $error = 0; $year = strftime("%Y", time());