Skip to content
Snippets Groups Projects
Commit deff75d2 authored by Juanjo Menent's avatar Juanjo Menent
Browse files

Merge pull request #3007 from hregis/develop_origin

Fix: possibility to show icon pdf, dot, doc, etc...
parents 0596be16 a51a8aff
No related branches found
No related tags found
No related merge requests found
...@@ -689,7 +689,7 @@ class FormFile ...@@ -689,7 +689,7 @@ class FormFile
$out=''; $out='';
$this->numoffiles=0; $this->numoffiles=0;
$file_list=dol_dir_list($filedir, 'files', 0, preg_quote(basename($modulesubdir).'.pdf','/'), '\.meta$|\.png$'); $file_list=dol_dir_list($filedir, 'files', 0, preg_quote(basename($modulesubdir),'/').'[^\-]+', '\.meta$|\.png$');
// For ajax treatment // For ajax treatment
$out.= '<div id="gen_pdf_'.$modulesubdir.'" class="linkobject hideobject">'.img_picto('', 'refresh').'</div>'."\n"; $out.= '<div id="gen_pdf_'.$modulesubdir.'" class="linkobject hideobject">'.img_picto('', 'refresh').'</div>'."\n";
...@@ -718,7 +718,7 @@ class FormFile ...@@ -718,7 +718,7 @@ class FormFile
$mime=dol_mimetype($relativepath,'',0); $mime=dol_mimetype($relativepath,'',0);
if (preg_match('/text/',$mime)) $out.= ' target="_blank"'; if (preg_match('/text/',$mime)) $out.= ' target="_blank"';
$out.= '>'; $out.= '>';
$out.= img_pdf($file["name"],2); $out.= img_mime($relativepath, $file["name"]);
$out.= '</a>'."\n"; $out.= '</a>'."\n";
$this->numoffiles++; $this->numoffiles++;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment