Prepare code to be able to download ODT templates
This commit is contained in:
parent
5cd5a3a5fb
commit
88e5616622
@ -144,8 +144,26 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
$nbofiles=count($listoffiles);
|
||||
if (! empty($conf->global->COMMANDE_ADDON_PDF_ODT_PATH))
|
||||
{
|
||||
$texte.=$langs->trans("NumberOfModelFilesFound").': <b>';
|
||||
//$texte.=$nbofiles?'<a id="a_'.get_class($this).'" href="#">':'';
|
||||
$texte.=count($listoffiles);
|
||||
//$texte.=$nbofiles?'</a>':'';
|
||||
$texte.='</b>';
|
||||
}
|
||||
|
||||
if ($nbofiles)
|
||||
{
|
||||
$texte.='<div id="div_'.get_class($this).'" class="hidden">';
|
||||
foreach($listoffiles as $file)
|
||||
{
|
||||
$texte.=$file['name'].'<br>';
|
||||
}
|
||||
$texte.='<div id="div_'.get_class($this).'">';
|
||||
}
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
|
||||
@ -145,7 +145,24 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
$nbofiles=count($listoffiles);
|
||||
if (! empty($conf->global->EXPEDITION_ADDON_PDF_ODT_PATH))
|
||||
{
|
||||
$texte.=$langs->trans("NumberOfModelFilesFound").': <b>';
|
||||
//$texte.=$nbofiles?'<a id="a_'.get_class($this).'" href="#">':'';
|
||||
$texte.=count($listoffiles);
|
||||
//$texte.=$nbofiles?'</a>':'';
|
||||
$texte.='</b>';
|
||||
}
|
||||
if ($nbofiles)
|
||||
{
|
||||
$texte.='<div id="div_'.get_class($this).'" class="hidden">';
|
||||
foreach($listoffiles as $file)
|
||||
{
|
||||
$texte.=$file['name'].'<br>';
|
||||
}
|
||||
$texte.='<div id="div_'.get_class($this).'">';
|
||||
}
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
@ -144,7 +144,24 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
$nbofiles=count($listoffiles);
|
||||
if (! empty($conf->global->FACTURE_ADDON_PDF_ODT_PATH))
|
||||
{
|
||||
$texte.=$langs->trans("NumberOfModelFilesFound").': <b>';
|
||||
//$texte.=$nbofiles?'<a id="a_'.get_class($this).'" href="#">':'';
|
||||
$texte.=count($listoffiles);
|
||||
//$texte.=$nbofiles?'</a>':'';
|
||||
$texte.='</b>';
|
||||
}
|
||||
if ($nbofiles)
|
||||
{
|
||||
$texte.='<div id="div_'.get_class($this).'" class="hidden">';
|
||||
foreach($listoffiles as $file)
|
||||
{
|
||||
$texte.=$file['name'].'<br>';
|
||||
}
|
||||
$texte.='<div id="div_'.get_class($this).'">';
|
||||
}
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
@ -357,7 +357,25 @@ class doc_generic_project_odt extends ModelePDFProjects
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
$nbofiles=count($listoffiles);
|
||||
if (! empty($conf->global->PROJECT_ADDON_PDF_ODT_PATH))
|
||||
{
|
||||
$texte.=$langs->trans("NumberOfModelFilesFound").': <b>';
|
||||
//$texte.=$nbofiles?'<a id="a_'.get_class($this).'" href="#">':'';
|
||||
$texte.=$nbofiles;
|
||||
//$texte.=$nbofiles?'</a>':'';
|
||||
$texte.='</b>';
|
||||
}
|
||||
|
||||
if ($nbofiles)
|
||||
{
|
||||
$texte.='<div id="div_'.get_class($this).'" class="hidden">';
|
||||
foreach($listoffiles as $file)
|
||||
{
|
||||
$texte.=$file['name'].'<br>';
|
||||
}
|
||||
$texte.='<div id="div_'.get_class($this).'">';
|
||||
}
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
@ -358,7 +358,25 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
$nbofiles=count($listoffiles);
|
||||
if (! empty($conf->global->PROJECT_TASK_ADDON_PDF_ODT_PATH))
|
||||
{
|
||||
$texte.=$langs->trans("NumberOfModelFilesFound").': <b>';
|
||||
//$texte.=$nbofiles?'<a id="a_'.get_class($this).'" href="#">':'';
|
||||
$texte.=$nbofiles;
|
||||
//$texte.=$nbofiles?'</a>':'';
|
||||
$texte.='</b>';
|
||||
}
|
||||
|
||||
if ($nbofiles)
|
||||
{
|
||||
$texte.='<div id="div_'.get_class($this).'" class="hidden">';
|
||||
foreach($listoffiles as $file)
|
||||
{
|
||||
$texte.=$file['name'].'<br>';
|
||||
}
|
||||
$texte.='<div id="div_'.get_class($this).'">';
|
||||
}
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
|
||||
@ -149,10 +149,25 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir))
|
||||
$nbofiles=count($listoffiles);
|
||||
if (! empty($conf->global->PROPALE_ADDON_PDF_ODT_PATH))
|
||||
{
|
||||
$texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
$texte.=$langs->trans("NumberOfModelFilesFound").': <b>';
|
||||
//$texte.=$nbofiles?'<a id="a_'.get_class($this).'" href="#">':'';
|
||||
$texte.=count($listoffiles);
|
||||
//$texte.=$nbofiles?'</a>':'';
|
||||
$texte.='</b>';
|
||||
}
|
||||
|
||||
if ($nbofiles)
|
||||
{
|
||||
$texte.='<div id="div_'.get_class($this).'" class="hidden">';
|
||||
foreach($listoffiles as $file)
|
||||
{
|
||||
$texte.=$file['name'].'<br>';
|
||||
}
|
||||
$texte.='<div id="div_'.get_class($this).'">';
|
||||
|
||||
if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0)
|
||||
{
|
||||
// Model for creation
|
||||
|
||||
@ -131,8 +131,26 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
||||
$texte.= '</table>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir)) $texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
$nbofiles=count($listoffiles);
|
||||
if (! empty($conf->global->COMPANY_ADDON_PDF_ODT_PATH))
|
||||
{
|
||||
$texte.=$langs->trans("NumberOfModelFilesFound").': <b>';
|
||||
//$texte.=$nbofiles?'<a id="a_'.get_class($this).'" href="#">':'';
|
||||
$texte.=$nbofiles;
|
||||
//$texte.=$nbofiles?'</a>':'';
|
||||
$texte.='</b>';
|
||||
}
|
||||
|
||||
if ($nbofiles)
|
||||
{
|
||||
$texte.='<div id="div_'.get_class($this).'" class="hidden">';
|
||||
foreach($listoffiles as $file)
|
||||
{
|
||||
$texte.=$file['name'].'<br>';
|
||||
}
|
||||
$texte.='<div id="div_'.get_class($this).'">';
|
||||
}
|
||||
|
||||
$texte.= '</td>';
|
||||
|
||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||
|
||||
@ -149,9 +149,24 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
|
||||
$texte.= '<br></div></div>';
|
||||
|
||||
// Scan directories
|
||||
if (count($listofdir))
|
||||
$nbofiles=count($listoffiles);
|
||||
if (! empty($conf->global->SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH))
|
||||
{
|
||||
$texte.=$langs->trans("NumberOfModelFilesFound").': <b>'.count($listoffiles).'</b>';
|
||||
$texte.=$langs->trans("NumberOfModelFilesFound").': <b>';
|
||||
//$texte.=$nbofiles?'<a id="a_'.get_class($this).'" href="#">':'';
|
||||
$texte.=count($listoffiles);
|
||||
//$texte.=$nbofiles?'</a>':'';
|
||||
$texte.='</b>';
|
||||
}
|
||||
|
||||
if ($nbofiles)
|
||||
{
|
||||
$texte.='<div id="div_'.get_class($this).'" class="hidden">';
|
||||
foreach($listoffiles as $file)
|
||||
{
|
||||
$texte.=$file['name'].'<br>';
|
||||
}
|
||||
$texte.='<div id="div_'.get_class($this).'">';
|
||||
|
||||
if ($conf->global->MAIN_SUPPLIER_PROPOSAL_CHOOSE_ODT_DOCUMENT > 0)
|
||||
{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user