This commit is contained in:
Laurent Destailleur 2010-09-08 21:56:39 +00:00
parent 5fd1a87ad4
commit 5d1572a146

View File

@ -1281,7 +1281,9 @@ class CommonObject
/** /**
* Show add predefined products/services form * Show add predefined products/services form
* FIXME This must be moved into a html.class file instead of a business class. * TODO This should be moved into a html.class file instead of a business class.
* But for the moment we don't know if it'st possible as we keep a method available on overloaded objects.
* @param $dateSelector 1=Show also date range input fields
*/ */
function showAddPredefinedProductForm($dateSelector=0) function showAddPredefinedProductForm($dateSelector=0)
{ {
@ -1293,8 +1295,10 @@ class CommonObject
/** /**
* Show add free products/services form * Show add free products/services form
* FIXME This must be moved into a html.class file instead of a business class. * TODO This should be moved into a html.class file instead of a business class. But for
*/ * But for the moment we don't know if it'st possible as we keep a method available on overloaded objects.
* @param $dateSelector 1=Show also date range input fields
*/
function showAddFreeProductForm($dateSelector=0) function showAddFreeProductForm($dateSelector=0)
{ {
global $conf,$langs; global $conf,$langs;
@ -1308,7 +1312,8 @@ class CommonObject
* @param $object * @param $object
* @param $objectid * @param $objectid
* @param $somethingshown * @param $somethingshown
* FIXME This must be moved into a html.class file instead of a business class. * TODO This must be moved into a html.class file instead of a business class.
* But for the moment we don't know if it'st possible as we keep a method available on overloaded objects.
*/ */
function showLinkedObjectBlock($object,$objectid,$somethingshown=0) function showLinkedObjectBlock($object,$objectid,$somethingshown=0)
{ {
@ -1319,9 +1324,8 @@ class CommonObject
{ {
$classpath = $object.'/class'; $classpath = $object.'/class';
$tplpath = $object; $tplpath = $object;
// TODO uniformiser emplacement classe if ($object == 'facture') $tplpath = 'compta/'.$object; $classpath = $tplpath.'/class'; // To work with non standard path
if ($object == 'facture') $tplpath = 'compta/'.$object; $classpath = $tplpath.'/class'; if ($object == 'propal') $tplpath = 'comm/'.$object; $classpath = $tplpath.'/class'; // To work with non standard path
if ($object == 'propal') $tplpath = 'comm/'.$object; $classpath = $tplpath.'/class';
$classname = ucfirst($object); $classname = ucfirst($object);
if(!class_exists($classname)) require(DOL_DOCUMENT_ROOT."/".$classpath."/".$object.".class.php"); if(!class_exists($classname)) require(DOL_DOCUMENT_ROOT."/".$classpath."/".$object.".class.php");
@ -1333,7 +1337,8 @@ class CommonObject
/** /**
* Return HTML table with title list * Return HTML table with title list
* FIXME This must be moved into a html.class file instead of a business class. * TODO This must be moved into a html.class file instead of a business class.
* But for the moment we don't know if it'st possible as we keep a method available on overloaded objects.
*/ */
function print_title_list() function print_title_list()
{ {
@ -1380,8 +1385,13 @@ class CommonObject
/** /**
* Return HTML with selected object line * Return HTML with selected object line
* @param line Selected object line * @param $line Selected object line to output
* FIXME This must be moved into a html.class file instead of a business class. * @param $var Is it a an odd line
* @param $num Number of line
* @param $i
* @param $dateSelector 1=Show also date range input fields
* TODO This must be moved into a html.class file instead of a business class.
* But for the moment we don't know if it'st possible as we keep a method available on overloaded objects.
*/ */
function printLine($line,$var=true,$num=0,$i=0,$dateSelector=0) function printLine($line,$var=true,$num=0,$i=0,$dateSelector=0)
{ {
@ -1389,8 +1399,7 @@ class CommonObject
global $html,$bc; global $html,$bc;
$element = $this->element; $element = $this->element;
// TODO uniformiser if ($element == 'propal') $element = 'propale'; // To work with non standard path
if ($element == 'propal') $element = 'propale';
// Show product and description // Show product and description
$type=$line->product_type?$line->product_type:$line->fk_product_type; $type=$line->product_type?$line->product_type:$line->fk_product_type;