NEW Section of files generated by mass action not visible if empty
This commit is contained in:
parent
c4130730cb
commit
72c1357c9b
@ -506,12 +506,13 @@ print '</div>'."\n";
|
|||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
|
|
||||||
if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
|
if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
|
||||||
{
|
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
|
||||||
{
|
{
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php');
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
|
|
||||||
|
$hidegeneratedfilelistifempty=1;
|
||||||
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
|
|
||||||
// Show list of available documents
|
// Show list of available documents
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$urlsource.=str_replace('&','&',$param);
|
$urlsource.=str_replace('&','&',$param);
|
||||||
@ -520,12 +521,7 @@ if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nb
|
|||||||
$genallowed=$user->rights->monmodule->read;
|
$genallowed=$user->rights->monmodule->read;
|
||||||
$delallowed=$user->rights->monmodule->create;
|
$delallowed=$user->rights->monmodule->create;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_monmodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
print $formfile->showdocuments('massfilesarea_monmodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|||||||
@ -892,11 +892,10 @@ if ($resql)
|
|||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
|
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
$hidegeneratedfilelistifempty=1;
|
||||||
{
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
/*
|
|
||||||
* Show list of available documents
|
// Show list of available documents
|
||||||
*/
|
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$urlsource.=str_replace('&','&',$param);
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
@ -904,13 +903,7 @@ if ($resql)
|
|||||||
$genallowed=$user->rights->propal->lire;
|
$genallowed=$user->rights->propal->lire;
|
||||||
$delallowed=$user->rights->propal->creer;
|
$delallowed=$user->rights->propal->creer;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_proposals','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,'','');
|
print $formfile->showdocuments('massfilesarea_proposals','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1101,11 +1101,10 @@ if ($resql)
|
|||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
|
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
$hidegeneratedfilelistifempty=1;
|
||||||
{
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
/*
|
|
||||||
* Show list of available documents
|
// Show list of available documents
|
||||||
*/
|
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$urlsource.=str_replace('&','&',$param);
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
@ -1113,13 +1112,7 @@ if ($resql)
|
|||||||
$genallowed=$user->rights->commande->lire;
|
$genallowed=$user->rights->commande->lire;
|
||||||
$delallowed=$user->rights->commande->creer;
|
$delallowed=$user->rights->commande->creer;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_orders','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
print $formfile->showdocuments('massfilesarea_orders','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1192,8 +1192,9 @@ if ($resql)
|
|||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
$hidegeneratedfilelistifempty=1;
|
||||||
{
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
|
|
||||||
// Show list of available documents
|
// Show list of available documents
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$urlsource.=str_replace('&','&',$param);
|
$urlsource.=str_replace('&','&',$param);
|
||||||
@ -1202,12 +1203,7 @@ if ($resql)
|
|||||||
$genallowed=$user->rights->facture->lire;
|
$genallowed=$user->rights->facture->lire;
|
||||||
$delallowed=$user->rights->facture->creer;
|
$delallowed=$user->rights->facture->creer;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_invoices','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
print $formfile->showdocuments('massfilesarea_invoices','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -775,11 +775,10 @@ if ($resql)
|
|||||||
|
|
||||||
print '</form>';
|
print '</form>';
|
||||||
|
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
$hidegeneratedfilelistifempty=1;
|
||||||
{
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
/*
|
|
||||||
* Show list of available documents
|
// Show list of available documents
|
||||||
*/
|
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$urlsource.=str_replace('&','&',$param);
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
@ -787,12 +786,7 @@ if ($resql)
|
|||||||
$genallowed=$user->rights->contrat->lire;
|
$genallowed=$user->rights->contrat->lire;
|
||||||
$delallowed=$user->rights->contrat->lire;
|
$delallowed=$user->rights->contrat->lire;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_contract','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
print $formfile->showdocuments('massfilesarea_contract','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -277,17 +277,18 @@ class FormFile
|
|||||||
* @param string $codelang Default language code to use on lang combo box if multilang is enabled
|
* @param string $codelang Default language code to use on lang combo box if multilang is enabled
|
||||||
* @param string $morepicto Add more HTML content into cell with picto
|
* @param string $morepicto Add more HTML content into cell with picto
|
||||||
* @param Object $object Object when method is called from an object card.
|
* @param Object $object Object when method is called from an object card.
|
||||||
|
* @param int $hideifempty Hide section of generated files if there is no file
|
||||||
* @return string Output string with HTML array of documents (might be empty string)
|
* @return string Output string with HTML array of documents (might be empty string)
|
||||||
*/
|
*/
|
||||||
function showdocuments($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$notused=0,$noform=0,$param='',$title='',$buttonlabel='',$codelang='',$morepicto='',$object=null)
|
function showdocuments($modulepart,$modulesubdir,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$allowgenifempty=1,$forcenomultilang=0,$iconPDF=0,$notused=0,$noform=0,$param='',$title='',$buttonlabel='',$codelang='',$morepicto='',$object=null,$hideifempty=0)
|
||||||
{
|
{
|
||||||
// Deprecation warning
|
// Deprecation warning
|
||||||
if (0 !== $iconPDF) {
|
if (! empty($iconPDF)) {
|
||||||
dol_syslog(__METHOD__ . ": passing iconPDF parameter is deprecated", LOG_WARNING);
|
dol_syslog(__METHOD__ . ": passing iconPDF parameter is deprecated", LOG_WARNING);
|
||||||
}
|
}
|
||||||
|
|
||||||
global $langs, $conf, $user, $hookmanager;
|
global $langs, $conf, $user, $hookmanager;
|
||||||
global $form, $bc;
|
global $form;
|
||||||
|
|
||||||
if (! is_object($form)) $form=new Form($this->db);
|
if (! is_object($form)) $form=new Form($this->db);
|
||||||
|
|
||||||
@ -305,9 +306,17 @@ class FormFile
|
|||||||
}
|
}
|
||||||
|
|
||||||
$hookmanager->initHooks(array('formfile'));
|
$hookmanager->initHooks(array('formfile'));
|
||||||
$forname='builddoc';
|
|
||||||
$out='';
|
|
||||||
|
|
||||||
|
// Get list of files
|
||||||
|
$file_list=null;
|
||||||
|
if (! empty($filedir))
|
||||||
|
{
|
||||||
|
$file_list=dol_dir_list($filedir,'files',0,'','(\.meta|_preview.*.*\.png)$','date',SORT_DESC);
|
||||||
|
}
|
||||||
|
if ($hideifempty && empty($file_list)) return '';
|
||||||
|
|
||||||
|
$out='';
|
||||||
|
$forname='builddoc';
|
||||||
$headershown=0;
|
$headershown=0;
|
||||||
$showempty=0;
|
$showempty=0;
|
||||||
$i=0;
|
$i=0;
|
||||||
@ -678,8 +687,6 @@ class FormFile
|
|||||||
// Get list of files
|
// Get list of files
|
||||||
if (! empty($filedir))
|
if (! empty($filedir))
|
||||||
{
|
{
|
||||||
$file_list=dol_dir_list($filedir,'files',0,'','(\.meta|_preview.*.*\.png)$','date',SORT_DESC);
|
|
||||||
|
|
||||||
$link_list = array();
|
$link_list = array();
|
||||||
if (is_object($object))
|
if (is_object($object))
|
||||||
{
|
{
|
||||||
@ -949,7 +956,6 @@ class FormFile
|
|||||||
function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownload=0,$relativepath='',$permonobject=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='', $showrelpart=0, $permtoeditline=-1,$upload_dir='',$sortfield='',$sortorder='ASC', $disablemove=1, $addfilterfields=0)
|
function list_of_documents($filearray,$object,$modulepart,$param='',$forcedownload=0,$relativepath='',$permonobject=1,$useinecm=0,$textifempty='',$maxlength=0,$title='',$url='', $showrelpart=0, $permtoeditline=-1,$upload_dir='',$sortfield='',$sortorder='ASC', $disablemove=1, $addfilterfields=0)
|
||||||
{
|
{
|
||||||
global $user, $conf, $langs, $hookmanager;
|
global $user, $conf, $langs, $hookmanager;
|
||||||
global $bc,$bcdd;
|
|
||||||
global $sortfield, $sortorder, $maxheightmini;
|
global $sortfield, $sortorder, $maxheightmini;
|
||||||
global $dolibarr_main_url_root;
|
global $dolibarr_main_url_root;
|
||||||
|
|
||||||
@ -1322,7 +1328,6 @@ class FormFile
|
|||||||
function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload=0, $relativepath='', $permtodelete=1, $useinecm=0, $textifempty='', $maxlength=0, $url='', $addfilterfields=0)
|
function list_of_autoecmfiles($upload_dir, $filearray, $modulepart, $param, $forcedownload=0, $relativepath='', $permtodelete=1, $useinecm=0, $textifempty='', $maxlength=0, $url='', $addfilterfields=0)
|
||||||
{
|
{
|
||||||
global $user, $conf, $langs, $form;
|
global $user, $conf, $langs, $form;
|
||||||
global $bc;
|
|
||||||
global $sortfield, $sortorder;
|
global $sortfield, $sortorder;
|
||||||
global $search_doc_ref;
|
global $search_doc_ref;
|
||||||
|
|
||||||
@ -1543,7 +1548,7 @@ class FormFile
|
|||||||
|
|
||||||
if (count($filearray) == 0)
|
if (count($filearray) == 0)
|
||||||
{
|
{
|
||||||
print '<tr '.$bc[false].'><td colspan="5">';
|
print '<tr class="oddeven"><td colspan="5">';
|
||||||
if (empty($textifempty)) print $langs->trans("NoFileFound");
|
if (empty($textifempty)) print $langs->trans("NoFileFound");
|
||||||
else print $textifempty;
|
else print $textifempty;
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
@ -1600,7 +1605,6 @@ class FormFile
|
|||||||
public function listOfLinks($object, $permtodelete=1, $action=null, $selected=null, $param='')
|
public function listOfLinks($object, $permtodelete=1, $action=null, $selected=null, $param='')
|
||||||
{
|
{
|
||||||
global $user, $conf, $langs, $user;
|
global $user, $conf, $langs, $user;
|
||||||
global $bc;
|
|
||||||
global $sortfield, $sortorder;
|
global $sortfield, $sortorder;
|
||||||
|
|
||||||
$langs->load("link");
|
$langs->load("link");
|
||||||
@ -1712,7 +1716,7 @@ class FormFile
|
|||||||
}
|
}
|
||||||
if ($nboflinks == 0)
|
if ($nboflinks == 0)
|
||||||
{
|
{
|
||||||
print '<tr ' . $bc[false] . '><td colspan="5" class="opacitymedium">';
|
print '<tr class="oddeven"><td colspan="5" class="opacitymedium">';
|
||||||
print $langs->trans("NoLinkFound");
|
print $langs->trans("NoLinkFound");
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|||||||
@ -831,8 +831,9 @@ if ($resql)
|
|||||||
|
|
||||||
if (empty($id))
|
if (empty($id))
|
||||||
{
|
{
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
$hidegeneratedfilelistifempty=1;
|
||||||
{
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
|
|
||||||
// Show list of available documents
|
// Show list of available documents
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$urlsource.=str_replace('&','&',$param);
|
$urlsource.=str_replace('&','&',$param);
|
||||||
@ -841,12 +842,7 @@ if ($resql)
|
|||||||
$genallowed=$user->rights->expensereport->lire;
|
$genallowed=$user->rights->expensereport->lire;
|
||||||
$delallowed=$user->rights->expensereport->creer;
|
$delallowed=$user->rights->expensereport->creer;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_expensereport','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
print $formfile->showdocuments('massfilesarea_expensereport','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -563,11 +563,10 @@ if ($resql)
|
|||||||
|
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
$hidegeneratedfilelistifempty=1;
|
||||||
{
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
/*
|
|
||||||
* Show list of available documents
|
// Show list of available documents
|
||||||
*/
|
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$urlsource.=str_replace('&','&',$param);
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
@ -575,13 +574,7 @@ if ($resql)
|
|||||||
$genallowed=$user->rights->ficheinter->lire;
|
$genallowed=$user->rights->ficheinter->lire;
|
||||||
$delallowed=$user->rights->ficheinter->creer;
|
$delallowed=$user->rights->ficheinter->creer;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_interventions','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
print $formfile->showdocuments('massfilesarea_interventions','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1176,11 +1176,12 @@ if ($resql)
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
$db->free($resql);
|
||||||
{
|
|
||||||
/*
|
$hidegeneratedfilelistifempty=1;
|
||||||
* Show list of available documents
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
*/
|
|
||||||
|
// Show list of available documents
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$urlsource.=str_replace('&','&',$param);
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
@ -1188,14 +1189,7 @@ if ($resql)
|
|||||||
$genallowed=$user->rights->fournisseur->commande->lire;
|
$genallowed=$user->rights->fournisseur->commande->lire;
|
||||||
$delallowed=$user->rights->fournisseur->commande->creer;
|
$delallowed=$user->rights->fournisseur->commande->creer;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_supplier_order','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
print $formfile->showdocuments('massfilesarea_supplier_order','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
$db->free($resql);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1098,8 +1098,9 @@ if ($resql)
|
|||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
$hidegeneratedfilelistifempty=1;
|
||||||
{
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
|
|
||||||
// Show list of available documents
|
// Show list of available documents
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$urlsource.=str_replace('&','&',$param);
|
$urlsource.=str_replace('&','&',$param);
|
||||||
@ -1108,12 +1109,7 @@ if ($resql)
|
|||||||
$genallowed=$user->rights->facture->lire;
|
$genallowed=$user->rights->facture->lire;
|
||||||
$delallowed=$user->rights->facture->creer;
|
$delallowed=$user->rights->facture->creer;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_invoices','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
print $formfile->showdocuments('massfilesarea_invoices','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -542,8 +542,9 @@ print '</form>'."\n";
|
|||||||
|
|
||||||
if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
|
if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
|
||||||
{
|
{
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
$hidegeneratedfilelistifempty=1;
|
||||||
{
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php');
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
|
|
||||||
@ -555,12 +556,7 @@ if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nb
|
|||||||
$genallowed=$user->rights->mymodule->read;
|
$genallowed=$user->rights->mymodule->read;
|
||||||
$delallowed=$user->rights->mymodule->create;
|
$delallowed=$user->rights->mymodule->create;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
|
|||||||
@ -494,8 +494,9 @@ print '</form>'."\n";
|
|||||||
|
|
||||||
if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
|
if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
|
||||||
{
|
{
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
$hidegeneratedfilelistifempty=1;
|
||||||
{
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php');
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
|
|
||||||
@ -507,12 +508,7 @@ if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nb
|
|||||||
$genallowed=$user->rights->mymodule->read;
|
$genallowed=$user->rights->mymodule->read;
|
||||||
$delallowed=$user->rights->mymodule->create;
|
$delallowed=$user->rights->mymodule->create;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
|
|||||||
@ -537,8 +537,9 @@ if ($resql)
|
|||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
$hidegeneratedfilelistifempty=1;
|
||||||
{
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
|
|
||||||
// Show list of available documents
|
// Show list of available documents
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$urlsource.=str_replace('&','&',$param);
|
$urlsource.=str_replace('&','&',$param);
|
||||||
@ -547,12 +548,7 @@ if ($resql)
|
|||||||
$genallowed=$user->rights->facture->lire;
|
$genallowed=$user->rights->facture->lire;
|
||||||
$delallowed=$user->rights->facture->creer;
|
$delallowed=$user->rights->facture->creer;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_orders','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
print $formfile->showdocuments('massfilesarea_orders','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -525,8 +525,9 @@ print '</form>'."\n";
|
|||||||
|
|
||||||
if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
|
if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nbtotalofrecords))
|
||||||
{
|
{
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
$hidegeneratedfilelistifempty=1;
|
||||||
{
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
|
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php');
|
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php');
|
||||||
$formfile = new FormFile($db);
|
$formfile = new FormFile($db);
|
||||||
|
|
||||||
@ -538,12 +539,7 @@ if (in_array('builddoc',$arrayofmassactions) && ($nbtotalofrecords === '' || $nb
|
|||||||
$genallowed=$user->rights->mymodule->read;
|
$genallowed=$user->rights->mymodule->read;
|
||||||
$delallowed=$user->rights->mymodule->create;
|
$delallowed=$user->rights->mymodule->create;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -858,11 +858,10 @@ if ($resql)
|
|||||||
|
|
||||||
print '</form>'."\n";
|
print '</form>'."\n";
|
||||||
|
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
$hidegeneratedfilelistifempty=1;
|
||||||
{
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
/*
|
|
||||||
* Show list of available documents
|
// Show list of available documents
|
||||||
*/
|
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$urlsource.=str_replace('&','&',$param);
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
@ -871,13 +870,7 @@ if ($resql)
|
|||||||
$genallowed=$user->rights->supplier_proposal->lire;
|
$genallowed=$user->rights->supplier_proposal->lire;
|
||||||
$delallowed=$user->rights->supplier_proposal->creer;
|
$delallowed=$user->rights->supplier_proposal->creer;
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_supplier_proposal','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,'','');
|
print $formfile->showdocuments('massfilesarea_supplier_proposal','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user