Add possibility to add linked object block in object card for external module

Fix: templates integration
This commit is contained in:
Regis Houssin 2010-04-09 06:47:13 +00:00
parent 379b3a63ab
commit d8982e5d8c
5 changed files with 5 additions and 4 deletions

View File

@ -1967,6 +1967,7 @@ if ($id > 0 || ! empty($ref))
if($conf->$object->enabled) if($conf->$object->enabled)
{ {
$propal->showLinkedObjectBlock($object,$objectid,$somethingshown); $propal->showLinkedObjectBlock($object,$objectid,$somethingshown);
$somethingshown = 1;
} }
} }

View File

@ -22,7 +22,7 @@
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->
<?php <?php
if ($somethingshown) { echo '<br>'; $somethingshown=1; } if ($somethingshown) { echo '<br>'; }
print_titre($langs->trans('RelatedOrders')); print_titre($langs->trans('RelatedOrders'));
?> ?>
<table class="noborder" width="100%"> <table class="noborder" width="100%">

View File

@ -22,7 +22,7 @@
<!-- BEGIN PHP TEMPLATE --> <!-- BEGIN PHP TEMPLATE -->
<?php <?php
if ($somethingshown) { echo '<br>'; $somethingshown=1; } if ($somethingshown) { echo '<br>'; }
if ($num > 1) print_titre($langs->trans("RelatedBills")); if ($num > 1) print_titre($langs->trans("RelatedBills"));
else print_titre($langs->trans("RelatedBill")); else print_titre($langs->trans("RelatedBill"));
?> ?>

View File

@ -512,8 +512,7 @@ if ($id > 0 || ! empty($ref))
{ {
if($conf->$object->enabled) if($conf->$object->enabled)
{ {
$propal->showLinkedObjectBlock($object,$objectid,$somethingshown); $somethingshown=$propal->showLinkedObjectBlock($object,$objectid,$somethingshown);
$somethingshown = 1;
} }
} }

View File

@ -1032,6 +1032,7 @@ class CommonObject
$linkedObjectBlock = new $class($this->db); $linkedObjectBlock = new $class($this->db);
if ($object == 'facture') $object = 'compta/'.$object; if ($object == 'facture') $object = 'compta/'.$object;
include(DOL_DOCUMENT_ROOT.'/'.$object.'/tpl/linkedobjectblock.tpl.php'); include(DOL_DOCUMENT_ROOT.'/'.$object.'/tpl/linkedobjectblock.tpl.php');
return $num;
} }
} }