Debug filemanager
This commit is contained in:
parent
ef6fcbbc67
commit
a066bbcd89
@ -220,7 +220,8 @@ if ($type == 'directory')
|
||||
if ($module == 'medias')
|
||||
{
|
||||
$relativepath=GETPOST('file','alpha');
|
||||
$upload_dir = $dolibarr_main_data_root.'/medias/'.$relativepath;
|
||||
if ($relativepath && $relativepath!= '/') $relativepath.='/';
|
||||
$upload_dir = $dolibarr_main_data_root.'/'.$module.'/'.$relativepath;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -245,7 +246,11 @@ if ($type == 'directory')
|
||||
|
||||
$textifempty = $langs->trans('NoFileFound');
|
||||
}
|
||||
else if ($section === '0') $textifempty='<br><div align="center"><font class="warning">'.$langs->trans("DirNotSynchronizedSyncFirst").'</font></div><br>';
|
||||
else if ($section === '0')
|
||||
{
|
||||
if ($module == 'ecm') $textifempty='<br><div align="center"><font class="warning">'.$langs->trans("DirNotSynchronizedSyncFirst").'</font></div><br>';
|
||||
else $textifempty = $langs->trans('NoFileFound');
|
||||
}
|
||||
else $textifempty=($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("ECMSelectASection"));
|
||||
|
||||
if ($module == 'medias')
|
||||
|
||||
@ -164,7 +164,7 @@ if (! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE
|
||||
{
|
||||
if (empty($val['fullrelativename'])) // If we did not find entry into database, but found a directory (dol_is_dir was ok at previous test)
|
||||
{
|
||||
$val['fullrelativename']=$file;
|
||||
$val['fullrelativename']=(($selecteddir && $selecteddir != '/')?$selecteddir.'/':'').$file;
|
||||
$val['id']=0;
|
||||
$val['label']=$file;
|
||||
$val['description']='';
|
||||
@ -205,19 +205,22 @@ if (! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE
|
||||
//print '<td align="right" width="14"> </td>';
|
||||
|
||||
// Info
|
||||
print '<td align="right" width="18">';
|
||||
$userstatic->id=isset($val['fk_user_c'])?$val['fk_user_c']:0;
|
||||
$userstatic->lastname=isset($val['login_c'])?$val['login_c']:0;
|
||||
$htmltooltip='<b>'.$langs->trans("ECMSection").'</b>: '.$val['label'].'<br>';
|
||||
$htmltooltip='<b>'.$langs->trans("Type").'</b>: '.$langs->trans("ECMSectionManual").'<br>';
|
||||
$htmltooltip.='<b>'.$langs->trans("ECMCreationUser").'</b>: '.$userstatic->getNomUrl(1, '', false, 1).'<br>';
|
||||
$htmltooltip.='<b>'.$langs->trans("ECMCreationDate").'</b>: '.(isset($val['date_c'])?dol_print_date($val['date_c'],"dayhour"):$langs->trans("NeedRefresh")).'<br>';
|
||||
$htmltooltip.='<b>'.$langs->trans("Description").'</b>: '.$val['description'].'<br>';
|
||||
$htmltooltip.='<b>'.$langs->trans("ECMNbOfFilesInDir").'</b>: '.((isset($val['cachenbofdoc']) && $val['cachenbofdoc'] >= 0)?$val['cachenbofdoc']:$langs->trans("NeedRefresh")).'<br>';
|
||||
if ($nboffilesinsubdir > 0) $htmltooltip.='<b>'.$langs->trans("ECMNbOfFilesInSubDir").'</b>: '.$nboffilesinsubdir;
|
||||
else $htmltooltip.='<b>'.$langs->trans("ECMNbOfSubDir").'</b>: '.($nbofsubdir >= 0 ? $nbofsubdir : $langs->trans("NeedRefresh")).'<br>';
|
||||
print $form->textwithpicto('',$htmltooltip,1,"info");
|
||||
print "</td>";
|
||||
if ($modulepart == 'ecm')
|
||||
{
|
||||
print '<td align="right" width="18">';
|
||||
$userstatic->id=isset($val['fk_user_c'])?$val['fk_user_c']:0;
|
||||
$userstatic->lastname=isset($val['login_c'])?$val['login_c']:0;
|
||||
$htmltooltip='<b>'.$langs->trans("ECMSection").'</b>: '.$val['label'].'<br>';
|
||||
$htmltooltip='<b>'.$langs->trans("Type").'</b>: '.$langs->trans("ECMSectionManual").'<br>';
|
||||
$htmltooltip.='<b>'.$langs->trans("ECMCreationUser").'</b>: '.$userstatic->getNomUrl(1, '', false, 1).'<br>';
|
||||
$htmltooltip.='<b>'.$langs->trans("ECMCreationDate").'</b>: '.(isset($val['date_c'])?dol_print_date($val['date_c'],"dayhour"):$langs->trans("NeedRefresh")).'<br>';
|
||||
$htmltooltip.='<b>'.$langs->trans("Description").'</b>: '.$val['description'].'<br>';
|
||||
$htmltooltip.='<b>'.$langs->trans("ECMNbOfFilesInDir").'</b>: '.((isset($val['cachenbofdoc']) && $val['cachenbofdoc'] >= 0)?$val['cachenbofdoc']:$langs->trans("NeedRefresh")).'<br>';
|
||||
if ($nboffilesinsubdir > 0) $htmltooltip.='<b>'.$langs->trans("ECMNbOfFilesInSubDir").'</b>: '.$nboffilesinsubdir;
|
||||
else $htmltooltip.='<b>'.$langs->trans("ECMNbOfSubDir").'</b>: '.($nbofsubdir >= 0 ? $nbofsubdir : $langs->trans("NeedRefresh")).'<br>';
|
||||
print $form->textwithpicto('',$htmltooltip,1,"info");
|
||||
print "</td>";
|
||||
}
|
||||
|
||||
print "</tr></table>\n";
|
||||
print '</div>';
|
||||
|
||||
@ -334,6 +334,7 @@ dol_fiche_head($head, 'index', $langs->trans("ECMArea").' - '.$langs->trans("ECM
|
||||
|
||||
|
||||
// Add filemanager component
|
||||
$module='ecm';
|
||||
include DOL_DOCUMENT_ROOT.'/ecm/tpl/filemanager.tpl.php';
|
||||
|
||||
|
||||
|
||||
@ -55,11 +55,13 @@ else
|
||||
print '<img class="toolbarbutton" border="0" src="'.DOL_URL_ROOT.'/theme/common/folder-new.png">';
|
||||
print '</a>';
|
||||
}
|
||||
$url=((! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS))?'#':($_SERVER["PHP_SELF"].'?action=refreshmanual'.($module?'&module='.$module:'').($section?'&section='.$section:'')));
|
||||
print '<a href="'.$url.'" class="inline-block valignmiddle toolbarbutton" title="'.dol_escape_htmltag($langs->trans('ReSyncListOfDir')).'">';
|
||||
print '<img id="refreshbutton" class="toolbarbutton" border="0" src="'.DOL_URL_ROOT.'/theme/common/view-refresh.png">';
|
||||
print '</a>';
|
||||
|
||||
if ($module == 'ecm')
|
||||
{
|
||||
$url=((! empty($conf->use_javascript_ajax) && empty($conf->global->MAIN_ECM_DISABLE_JS))?'#':($_SERVER["PHP_SELF"].'?action=refreshmanual'.($module?'&module='.$module:'').($section?'&section='.$section:'')));
|
||||
print '<a href="'.$url.'" class="inline-block valignmiddle toolbarbutton" title="'.dol_escape_htmltag($langs->trans('ReSyncListOfDir')).'">';
|
||||
print '<img id="refreshbutton" class="toolbarbutton" border="0" src="'.DOL_URL_ROOT.'/theme/common/view-refresh.png">';
|
||||
print '</a>';
|
||||
}
|
||||
|
||||
// Start "Add new file" area
|
||||
$nameforformuserfile = 'formuserfileecm';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user