Prepare code to be able to download ODT templates
This commit is contained in:
parent
ced1462b75
commit
95a45e8f87
@ -144,8 +144,26 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
$texte.= '<br></div></div>';
|
$texte.= '<br></div></div>';
|
||||||
|
|
||||||
// Scan directories
|
// 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>';
|
||||||
|
|
||||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||||
|
|||||||
@ -145,7 +145,24 @@ class doc_generic_shipment_odt extends ModelePdfExpedition
|
|||||||
$texte.= '<br></div></div>';
|
$texte.= '<br></div></div>';
|
||||||
|
|
||||||
// Scan directories
|
// 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>';
|
$texte.= '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -144,7 +144,24 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
|||||||
$texte.= '<br></div></div>';
|
$texte.= '<br></div></div>';
|
||||||
|
|
||||||
// Scan directories
|
// 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>';
|
$texte.= '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -357,7 +357,25 @@ class doc_generic_project_odt extends ModelePDFProjects
|
|||||||
$texte.= '<br></div></div>';
|
$texte.= '<br></div></div>';
|
||||||
|
|
||||||
// Scan directories
|
// 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>';
|
$texte.= '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -358,7 +358,25 @@ class doc_generic_task_odt extends ModelePDFTask
|
|||||||
$texte.= '<br></div></div>';
|
$texte.= '<br></div></div>';
|
||||||
|
|
||||||
// Scan directories
|
// 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>';
|
$texte.= '</td>';
|
||||||
|
|
||||||
|
|||||||
@ -149,10 +149,25 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||||||
$texte.= '<br></div></div>';
|
$texte.= '<br></div></div>';
|
||||||
|
|
||||||
// Scan directories
|
// 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)
|
if ($conf->global->MAIN_PROPAL_CHOOSE_ODT_DOCUMENT > 0)
|
||||||
{
|
{
|
||||||
// Model for creation
|
// Model for creation
|
||||||
|
|||||||
@ -131,8 +131,26 @@ class doc_generic_odt extends ModeleThirdPartyDoc
|
|||||||
$texte.= '</table>';
|
$texte.= '</table>';
|
||||||
|
|
||||||
// Scan directories
|
// 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>';
|
||||||
|
|
||||||
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
$texte.= '<td valign="top" rowspan="2" class="hideonsmartphone">';
|
||||||
|
|||||||
@ -149,9 +149,24 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal
|
|||||||
$texte.= '<br></div></div>';
|
$texte.= '<br></div></div>';
|
||||||
|
|
||||||
// Scan directories
|
// 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)
|
if ($conf->global->MAIN_SUPPLIER_PROPOSAL_CHOOSE_ODT_DOCUMENT > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user