NEW Section of files generated by mass action not visible if empty
This commit is contained in:
parent
c4130730cb
commit
72c1357c9b
@ -507,25 +507,21 @@ 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');
|
||||||
{
|
$formfile = new FormFile($db);
|
||||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php');
|
|
||||||
$formfile = new FormFile($db);
|
|
||||||
|
|
||||||
// Show list of available documents
|
$hidegeneratedfilelistifempty=1;
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
$urlsource.=str_replace('&','&',$param);
|
|
||||||
|
|
||||||
$filedir=$diroutputmassaction;
|
// Show list of available documents
|
||||||
$genallowed=$user->rights->monmodule->read;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$delallowed=$user->rights->monmodule->create;
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_monmodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
$filedir=$diroutputmassaction;
|
||||||
}
|
$genallowed=$user->rights->monmodule->read;
|
||||||
else
|
$delallowed=$user->rights->monmodule->create;
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
print $formfile->showdocuments('massfilesarea_monmodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dol_fiche_end();
|
dol_fiche_end();
|
||||||
|
|||||||
@ -892,25 +892,18 @@ 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
|
|
||||||
*/
|
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
|
||||||
$urlsource.=str_replace('&','&',$param);
|
|
||||||
|
|
||||||
$filedir=$diroutputmassaction;
|
// Show list of available documents
|
||||||
$genallowed=$user->rights->propal->lire;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$delallowed=$user->rights->propal->creer;
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_proposals','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,'','');
|
$filedir=$diroutputmassaction;
|
||||||
}
|
$genallowed=$user->rights->propal->lire;
|
||||||
else
|
$delallowed=$user->rights->propal->creer;
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
print $formfile->showdocuments('massfilesarea_proposals','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1101,25 +1101,18 @@ 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
|
|
||||||
*/
|
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
|
||||||
$urlsource.=str_replace('&','&',$param);
|
|
||||||
|
|
||||||
$filedir=$diroutputmassaction;
|
// Show list of available documents
|
||||||
$genallowed=$user->rights->commande->lire;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$delallowed=$user->rights->commande->creer;
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_orders','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
$filedir=$diroutputmassaction;
|
||||||
}
|
$genallowed=$user->rights->commande->lire;
|
||||||
else
|
$delallowed=$user->rights->commande->creer;
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
print $formfile->showdocuments('massfilesarea_orders','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1192,22 +1192,18 @@ 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
|
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
|
||||||
$urlsource.=str_replace('&','&',$param);
|
|
||||||
|
|
||||||
$filedir=$diroutputmassaction;
|
// Show list of available documents
|
||||||
$genallowed=$user->rights->facture->lire;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$delallowed=$user->rights->facture->creer;
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_invoices','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
$filedir=$diroutputmassaction;
|
||||||
}
|
$genallowed=$user->rights->facture->lire;
|
||||||
else
|
$delallowed=$user->rights->facture->creer;
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
print $formfile->showdocuments('massfilesarea_invoices','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -775,24 +775,18 @@ 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
|
|
||||||
*/
|
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
|
||||||
$urlsource.=str_replace('&','&',$param);
|
|
||||||
|
|
||||||
$filedir=$diroutputmassaction;
|
// Show list of available documents
|
||||||
$genallowed=$user->rights->contrat->lire;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$delallowed=$user->rights->contrat->lire;
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_contract','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
$filedir=$diroutputmassaction;
|
||||||
}
|
$genallowed=$user->rights->contrat->lire;
|
||||||
else
|
$delallowed=$user->rights->contrat->lire;
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
print $formfile->showdocuments('massfilesarea_contract','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
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,22 +831,18 @@ 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
|
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
|
||||||
$urlsource.=str_replace('&','&',$param);
|
|
||||||
|
|
||||||
$filedir=$diroutputmassaction;
|
// Show list of available documents
|
||||||
$genallowed=$user->rights->expensereport->lire;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$delallowed=$user->rights->expensereport->creer;
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_expensereport','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
$filedir=$diroutputmassaction;
|
||||||
}
|
$genallowed=$user->rights->expensereport->lire;
|
||||||
else
|
$delallowed=$user->rights->expensereport->creer;
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
print $formfile->showdocuments('massfilesarea_expensereport','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -563,25 +563,18 @@ 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
|
|
||||||
*/
|
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
|
||||||
$urlsource.=str_replace('&','&',$param);
|
|
||||||
|
|
||||||
$filedir=$diroutputmassaction;
|
// Show list of available documents
|
||||||
$genallowed=$user->rights->ficheinter->lire;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$delallowed=$user->rights->ficheinter->creer;
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_interventions','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
$filedir=$diroutputmassaction;
|
||||||
}
|
$genallowed=$user->rights->ficheinter->lire;
|
||||||
else
|
$delallowed=$user->rights->ficheinter->creer;
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
print $formfile->showdocuments('massfilesarea_interventions','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1176,26 +1176,20 @@ if ($resql)
|
|||||||
print '</div>';
|
print '</div>';
|
||||||
print "</form>\n";
|
print "</form>\n";
|
||||||
|
|
||||||
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files)
|
|
||||||
{
|
|
||||||
/*
|
|
||||||
* Show list of available documents
|
|
||||||
*/
|
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
|
||||||
$urlsource.=str_replace('&','&',$param);
|
|
||||||
|
|
||||||
$filedir=$diroutputmassaction;
|
|
||||||
$genallowed=$user->rights->fournisseur->commande->lire;
|
|
||||||
$delallowed=$user->rights->fournisseur->commande->creer;
|
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_supplier_order','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
|
||||||
}
|
|
||||||
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);
|
$db->free($resql);
|
||||||
|
|
||||||
|
$hidegeneratedfilelistifempty=1;
|
||||||
|
if ($massaction == 'builddoc' || $action == 'remove_file' || $show_files) $hidegeneratedfilelistifempty=0;
|
||||||
|
|
||||||
|
// Show list of available documents
|
||||||
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
|
$filedir=$diroutputmassaction;
|
||||||
|
$genallowed=$user->rights->fournisseur->commande->lire;
|
||||||
|
$delallowed=$user->rights->fournisseur->commande->creer;
|
||||||
|
|
||||||
|
print $formfile->showdocuments('massfilesarea_supplier_order','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1098,22 +1098,18 @@ 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
|
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
|
||||||
$urlsource.=str_replace('&','&',$param);
|
|
||||||
|
|
||||||
$filedir=$diroutputmassaction;
|
// Show list of available documents
|
||||||
$genallowed=$user->rights->facture->lire;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$delallowed=$user->rights->facture->creer;
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_invoices','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
$filedir=$diroutputmassaction;
|
||||||
}
|
$genallowed=$user->rights->facture->lire;
|
||||||
else
|
$delallowed=$user->rights->facture->creer;
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
print $formfile->showdocuments('massfilesarea_invoices','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -542,25 +542,21 @@ 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');
|
|
||||||
$formfile = new FormFile($db);
|
|
||||||
|
|
||||||
// Show list of available documents
|
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php');
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
$formfile = new FormFile($db);
|
||||||
$urlsource.=str_replace('&','&',$param);
|
|
||||||
|
|
||||||
$filedir=$diroutputmassaction;
|
// Show list of available documents
|
||||||
$genallowed=$user->rights->mymodule->read;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$delallowed=$user->rights->mymodule->create;
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
$filedir=$diroutputmassaction;
|
||||||
}
|
$genallowed=$user->rights->mymodule->read;
|
||||||
else
|
$delallowed=$user->rights->mymodule->create;
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
|
|||||||
@ -494,25 +494,21 @@ 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');
|
|
||||||
$formfile = new FormFile($db);
|
|
||||||
|
|
||||||
// Show list of available documents
|
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php');
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
$formfile = new FormFile($db);
|
||||||
$urlsource.=str_replace('&','&',$param);
|
|
||||||
|
|
||||||
$filedir=$diroutputmassaction;
|
// Show list of available documents
|
||||||
$genallowed=$user->rights->mymodule->read;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$delallowed=$user->rights->mymodule->create;
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
$filedir=$diroutputmassaction;
|
||||||
}
|
$genallowed=$user->rights->mymodule->read;
|
||||||
else
|
$delallowed=$user->rights->mymodule->create;
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// End of page
|
// End of page
|
||||||
|
|||||||
@ -537,22 +537,18 @@ 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
|
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
|
||||||
$urlsource.=str_replace('&','&',$param);
|
|
||||||
|
|
||||||
$filedir=$diroutputmassaction;
|
// Show list of available documents
|
||||||
$genallowed=$user->rights->facture->lire;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$delallowed=$user->rights->facture->creer;
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_orders','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
$filedir=$diroutputmassaction;
|
||||||
}
|
$genallowed=$user->rights->facture->lire;
|
||||||
else
|
$delallowed=$user->rights->facture->creer;
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
print $formfile->showdocuments('massfilesarea_orders','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
*/
|
*/
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -525,25 +525,21 @@ 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');
|
|
||||||
$formfile = new FormFile($db);
|
|
||||||
|
|
||||||
// Show list of available documents
|
require_once(DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php');
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
$formfile = new FormFile($db);
|
||||||
$urlsource.=str_replace('&','&',$param);
|
|
||||||
|
|
||||||
$filedir=$diroutputmassaction;
|
// Show list of available documents
|
||||||
$genallowed=$user->rights->mymodule->read;
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
$delallowed=$user->rights->mymodule->create;
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'');
|
$filedir=$diroutputmassaction;
|
||||||
}
|
$genallowed=$user->rights->mymodule->read;
|
||||||
else
|
$delallowed=$user->rights->mymodule->create;
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
print $formfile->showdocuments('massfilesarea_mymodule','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -858,26 +858,19 @@ 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
|
|
||||||
*/
|
|
||||||
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
|
||||||
$urlsource.=str_replace('&','&',$param);
|
|
||||||
|
|
||||||
$filedir=$diroutputmassaction;
|
// Show list of available documents
|
||||||
|
$urlsource=$_SERVER['PHP_SELF'].'?sortfield='.$sortfield.'&sortorder='.$sortorder;
|
||||||
|
$urlsource.=str_replace('&','&',$param);
|
||||||
|
|
||||||
$genallowed=$user->rights->supplier_proposal->lire;
|
$filedir=$diroutputmassaction;
|
||||||
$delallowed=$user->rights->supplier_proposal->creer;
|
|
||||||
|
|
||||||
print $formfile->showdocuments('massfilesarea_supplier_proposal','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,'','');
|
$genallowed=$user->rights->supplier_proposal->lire;
|
||||||
}
|
$delallowed=$user->rights->supplier_proposal->creer;
|
||||||
else
|
|
||||||
{
|
|
||||||
print '<br><a name="show_files"></a><a href="'.$_SERVER["PHP_SELF"].'?show_files=1'.$param.'#show_files">'.$langs->trans("ShowTempMassFilesArea").'</a>';
|
|
||||||
}
|
|
||||||
|
|
||||||
|
print $formfile->showdocuments('massfilesarea_supplier_proposal','',$filedir,$urlsource,0,$delallowed,'',1,1,0,48,1,$param,$title,'','','',null,$hidegeneratedfilelistifempty);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user