diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 44f0453aa57..9ed3a32d409 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -48,7 +48,7 @@ class FormFile /** * \brief Show file add form * \param url Url - * \param title Title zone + * \param title Title zone (Title or '' or 'none') * \param addcancel 1=Add 'Cancel' button * \param sectionid If upload must be done inside a particular ECM section * \param perm Value of permission to allow upload @@ -58,10 +58,12 @@ class FormFile { global $conf,$langs; + $maxlength=62; + print "\n\n\n"; - if (! $title) $title=$langs->trans("AttachANewFile"); - print_titre($title); + if (empty($title)) $title=$langs->trans("AttachANewFile"); + if ($title != 'none') print_titre($title); print '
'; print ''; @@ -81,7 +83,7 @@ class FormFile { print ''; } - print 'global->MAIN_UPLOAD_DOC) || empty($perm)?' disabled="true"':''); print '>'; print '   '; diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index 4330410e3a7..ec52e558507 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -231,7 +231,10 @@ $head = ecm_prepare_head_fm($fac); dol_fiche_head($head, 'file_manager', '', 1); -print '
'; +print ''; +print ''; + +print '
'; // Left area @@ -251,14 +254,34 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti // Construit liste des repertoires print ''; - //print ''; - print ''; - print ''; - print ''; + print ''; + print ''; + //print ''; + print ''; + print ''; + print ' '.$langs->trans("ECMSections"); + print ''; + + $showonrightsize=''; + if (sizeof($sectionauto)) { // Root title line (Automatic section) @@ -354,7 +377,7 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti } else { - print ''; + $showonrightsize='featurenotyetavailable'; } } @@ -572,15 +595,22 @@ if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$acti // ----- End of section ----- // -------------------------- - print "
'.$langs->trans("ECMSections").''; - print ''.img_picto($langs->trans("Refresh"),'refresh').''; - print '
'; + if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$action)) + { + if ($user->rights->ecm->setup) + { + print ''.$langs->trans('ECMAddSection').''; + } + else + { + print ''.$langs->trans('ECMAddSection').''; + } + } + //print ''; + //print ''.img_picto($langs->trans("Refresh"),'refresh').''; + print ''.$langs->trans('Refresh').''; + print '
'.$langs->trans("FeatureNotYetAvailable").'
"; // Fin de zone Ajax + + } print '
'; +print ''; +print ''; +print '
'; +//print $langs->trans("Filter").': '; +print '
'; + // Right area $relativepath=$ecmdir->getRelativePath(); $upload_dir = $conf->ecm->dir_output.'/'.$relativepath; @@ -588,7 +618,7 @@ $filearray=dol_dir_list($upload_dir,"files",0,'','\.meta$',$sortfield,(strtolowe $formfile=new FormFile($db); $param='&section='.$section; -$textifempty=($section?$langs->trans("NoFileFound"):$langs->trans("ECMSelectASection")); +$textifempty=($section?$langs->trans("NoFileFound"):($showonrightsize=='featurenotyetavailable'?$langs->trans("FeatureNotYetAvailable"):$langs->trans("ECMSelectASection"))); $formfile->list_of_documents($filearray,'','ecm',$param,1,$relativepath,$user->rights->ecm->upload,1,$textifempty,40); // print ''; @@ -601,22 +631,13 @@ print ''; // Actions buttons -print ''; +//print ''; +print '';
'; -if (empty($action) || $action == 'file_manager' || preg_match('/refresh/i',$action)) -{ - if ($user->rights->ecm->setup) - { - print ''.$langs->trans('ECMAddSection').''; - } - else - { - print ''.$langs->trans('ECMAddSection').''; - } -} -print ''; +print '
'; +//print ''; if (! empty($section)) { - $formfile->form_attach_new_file(DOL_URL_ROOT.'/ecm/index.php','',0,$section,$user->rights->ecm->upload); + $formfile->form_attach_new_file(DOL_URL_ROOT.'/ecm/index.php','none',0,$section,$user->rights->ecm->upload); } else print ' '; print '