Merge pull request #186 from grandoc/develop
to use specific tpl within his own theme
This commit is contained in:
commit
c962e515d5
@ -3,6 +3,7 @@
|
|||||||
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
* Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
|
||||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||||
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
* Copyright (C) 2012 Christophe Battarel <christophe.battarel@altairis.fr>
|
||||||
|
* Copyright (C) 2011-2012 Philippe Grand <philippe.grand@atoo-net.com>
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
@ -2378,8 +2379,15 @@ abstract class CommonObject
|
|||||||
global $form,$bcnd,$var;
|
global $form,$bcnd,$var;
|
||||||
|
|
||||||
// Use global variables + $dateSelector + $seller and $buyer
|
// Use global variables + $dateSelector + $seller and $buyer
|
||||||
|
if (file_exists(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/predefinedproductline_create.tpl.php"))
|
||||||
|
{
|
||||||
|
include(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/predefinedproductline_create.tpl.php");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/predefinedproductline_create.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/predefinedproductline_create.tpl.php');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show add free products/services form
|
* Show add free products/services form
|
||||||
@ -2398,8 +2406,15 @@ abstract class CommonObject
|
|||||||
global $form,$bcnd,$var;
|
global $form,$bcnd,$var;
|
||||||
|
|
||||||
// Use global variables + $dateSelector + $seller and $buyer
|
// Use global variables + $dateSelector + $seller and $buyer
|
||||||
|
if (file_exists(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/freeproductline_create.tpl.php"))
|
||||||
|
{
|
||||||
|
include(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/freeproductline_create.tpl.php");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/freeproductline_create.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/freeproductline_create.tpl.php');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -2537,14 +2552,28 @@ abstract class CommonObject
|
|||||||
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($line->description));
|
$description=($conf->global->PRODUIT_DESC_IN_FORM?'':dol_htmlentitiesbr($line->description));
|
||||||
|
|
||||||
// Use global variables + $seller and $buyer
|
// Use global variables + $seller and $buyer
|
||||||
|
if (file_exists(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/predefinedproductline_view.tpl.php"))
|
||||||
|
{
|
||||||
|
include(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/predefinedproductline_view.tpl.php");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/predefinedproductline_view.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/predefinedproductline_view.tpl.php');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Use global variables + $dateSelector + $seller and $buyer
|
// Use global variables + $dateSelector + $seller and $buyer
|
||||||
|
if (file_exists(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/freeproductline_view.tpl.php"))
|
||||||
|
{
|
||||||
|
include(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/freeproductline_view.tpl.php");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/freeproductline_view.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/freeproductline_view.tpl.php');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Ligne en mode update
|
// Ligne en mode update
|
||||||
if ($this->statut == 0 && $action == 'editline' && $selected == $line->id)
|
if ($this->statut == 0 && $action == 'editline' && $selected == $line->id)
|
||||||
@ -2552,15 +2581,29 @@ abstract class CommonObject
|
|||||||
if ($line->fk_product > 0)
|
if ($line->fk_product > 0)
|
||||||
{
|
{
|
||||||
// Use global variables + $dateSelector + $seller and $buyer
|
// Use global variables + $dateSelector + $seller and $buyer
|
||||||
|
if (file_exists(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/predefinedproductline_edit.tpl.php"))
|
||||||
|
{
|
||||||
|
include(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/predefinedproductline_edit.tpl.php");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/predefinedproductline_edit.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/predefinedproductline_edit.tpl.php');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Use global variables + $dateSelector + $seller and $buyer
|
// Use global variables + $dateSelector + $seller and $buyer
|
||||||
|
if (file_exists(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/freeproductline_edit.tpl.php"))
|
||||||
|
{
|
||||||
|
include(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/freeproductline_edit.tpl.php");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/freeproductline_edit.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/freeproductline_edit.tpl.php');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* This is to show array of line of details of source object */
|
/* This is to show array of line of details of source object */
|
||||||
@ -2697,8 +2740,15 @@ abstract class CommonObject
|
|||||||
$this->tpl['qty'] = (($line->info_bits & 2) != 2) ? $line->qty : ' ';
|
$this->tpl['qty'] = (($line->info_bits & 2) != 2) ? $line->qty : ' ';
|
||||||
$this->tpl['remise_percent'] = (($line->info_bits & 2) != 2) ? vatrate($line->remise_percent, true) : ' ';
|
$this->tpl['remise_percent'] = (($line->info_bits & 2) != 2) ? vatrate($line->remise_percent, true) : ' ';
|
||||||
|
|
||||||
|
if (file_exists(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/originproductline.tpl.php"))
|
||||||
|
{
|
||||||
|
include(DOL_DOCUMENT_ROOT."/theme/".$conf->theme."/tpl/originproductline.tpl.php");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
include(DOL_DOCUMENT_ROOT.'/core/tpl/originproductline.tpl.php');
|
include(DOL_DOCUMENT_ROOT.'/core/tpl/originproductline.tpl.php');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user