diff --git a/filemanager/inc/class.uifilemanager.inc.php b/filemanager/inc/class.uifilemanager.inc.php index 11ca18bfed..e2675be076 100755 --- a/filemanager/inc/class.uifilemanager.inc.php +++ b/filemanager/inc/class.uifilemanager.inc.php @@ -1979,7 +1979,7 @@ } /* seek icon for mimetype else return an unknown icon */ - function mime_icon($mime_type, $size=16) + function mime_icon($mime_type, $size=16,$et_image=false) { if(!$mime_type) { @@ -1988,14 +1988,12 @@ $mime_type= str_replace ('/','_',$mime_type); - $img=$GLOBALS['egw']->common->image('filemanager','mime'.$size.'_'.strtolower($mime_type)); + $img=$GLOBALS['egw']->common->image('filemanager',$icon='mime'.$size.'_'.strtolower($mime_type)); if(!$img) { - $img = $GLOBALS['egw']->common->image('filemanager','mime'.$size.'_unknown'); + $img = $GLOBALS['egw']->common->image('filemanager',$icon='mime'.$size.'_unknown'); } - - $icon=''.lang($mime_type).''; - return $icon; + return $et_image ? 'filemanager/'.$icon : ''.lang($mime_type).''; } function buttonImage($link,$img='',$help='') @@ -2296,6 +2294,7 @@ //'total' => // O the total number of entries //'sel_options' => // O additional or changed sel_options set by the callback and merged into $tmpl->sel_options 'no_columnselection'=>false, + 'default_cols' => '!vfs_file_id,fulldir,mime_type', ); } else { @@ -2573,31 +2572,10 @@ $GLOBALS['egw_info']['flags']['app_header'] = lang('filemanager'); foreach ($rows as $key => $row) { - $plink=$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.index','path='.$rows[$key]['vfs_directory']); - $linktodir=''.$rows[$key]['vfs_directory'].' '; - if(strtolower($rows[$key]['vfs_mime_type']) == 'directory') - { - $link=$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.index','path='.$rows[$key]['vfs_directory']."/".$rows[$key]['vfs_name']); - $icon=$this->mime_icon($rows[$key]['vfs_mime_type']); - $col_data=''.$icon.' '; - $col_data.=''.$rows[$key]['vfs_directory']."/".$rows[$key]['vfs_name'].' '; - } - else - { - if($this->prefs['viewonserver'] && isset($this->filesdir) && !$rows[$key]['vfs_link_directory']) - { - #FIXME - $clickview = $rows[$key]['vfs_directory'].'/'.$rows[$key]['vfs_name']; - } - else - { - $icon=$this->mime_icon($rows[$key]['vfs_mime_type']); - $link=$this->encode_href('/index.php','menuaction=filemanager.uifilemanager.view','file='.$rows[$key]['vfs_name'].'&path='.$rows[$key]['vfs_directory']); - $col_data=''.$icon.' '.$rows[$key]['vfs_directory']."/".$rows[$key]['vfs_name'].''; - } - } - $rows[$key]['fulldir']=$col_data; - $rows[$key]['vfs_directory']=$linktodir; + $rows[$key]['dir_link']='filemanager.uifilemanager.index&path='.base64_encode($row['vfs_directory']); + $rows[$key]['file_link']='filemanager.uifilemanager.index&path='.base64_encode($row['vfs_directory'].'/'.$row['vfs_name']); + $rows[$key]['icon'] = $this->mime_icon($row['vfs_mime_type'],16,true); + $rows[$key]['file'] = $row['vfs_directory'].'/'.$row['vfs_name']; } // add some info to the appheader that the user may be informed about the search-base of its query-result if ($query['searchletter']) diff --git a/filemanager/setup/etemplates.inc.php b/filemanager/setup/etemplates.inc.php new file mode 100644 index 0000000000..5b06ffc129 --- /dev/null +++ b/filemanager/setup/etemplates.inc.php @@ -0,0 +1,20 @@ + 'filemanager.search','template' => '','lang' => '','group' => '0','version' => '1.3.001','data' => 'a:4:{i:0;a:9:{s:4:"type";s:8:"groupbox";s:4:"name";s:10:"debuginfos";s:4:"size";s:1:"4";s:5:"label";s:10:"Debuginfos";s:8:"disabled";s:1:"1";i:1;a:3:{s:4:"type";s:8:"textarea";s:4:"name";s:7:"message";s:8:"readonly";s:1:"1";}i:2;a:1:{s:4:"type";s:5:"label";}i:3;a:1:{s:4:"type";s:5:"label";}i:4;a:1:{s:4:"type";s:5:"label";}}i:1;a:4:{s:4:"type";s:4:"grid";s:4:"data";a:7:{i:0;a:2:{s:1:"C";s:3:"120";s:1:"D";s:3:"120";}i:1;a:5:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:12:"searchstring";s:4:"name";s:17:"searchstringlabel";}s:1:"B";a:3:{s:4:"type";s:4:"text";s:4:"span";s:1:"2";s:4:"name";s:12:"searchstring";}s:1:"C";a:1:{s:4:"type";s:5:"label";}s:1:"D";a:3:{s:4:"type";s:6:"button";s:5:"label";s:12:"start search";s:4:"name";s:12:"start_search";}s:1:"E";a:1:{s:4:"type";s:5:"label";}}i:2;a:5:{s:1:"A";a:2:{s:4:"type";s:5:"label";s:5:"label";s:9:"mime type";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:8:"checkall";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:3:"All";s:4:"name";s:8:"alllabel";}s:1:"D";a:4:{s:4:"type";s:5:"label";s:4:"data";a:2:{i:0;a:0:{}i:1;a:1:{s:1:"A";a:3:{s:4:"type";s:8:"checkbox";s:5:"label";s:5:"files";s:4:"name";s:14:"checkonlyfiles";}}}s:4:"rows";i:1;s:4:"cols";i:1;}s:1:"E";a:1:{s:4:"type";s:5:"label";}}i:3;a:5:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:14:"checkonlyfiles";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:5:"files";s:4:"name";s:9:"filelabel";}s:1:"D";a:4:{s:4:"type";s:6:"button";s:5:"label";s:12:"clear search";s:4:"name";s:12:"clear_search";s:7:"onclick";s:71:"menuaction=filemanager.uifilemanager.index&action=search&actioncd=clear";}s:1:"E";a:1:{s:4:"type";s:5:"label";}}i:4;a:5:{s:1:"A";a:1:{s:4:"type";s:5:"label";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:13:"checkonlydirs";}s:1:"C";a:3:{s:4:"type";s:5:"label";s:5:"label";s:9:"directory";s:4:"name";s:8:"dirlabel";}s:1:"D";a:4:{s:4:"type";s:8:"checkbox";s:5:"label";s:5:"Debug";s:4:"name";s:5:"debug";s:8:"disabled";s:1:"1";}s:1:"E";a:1:{s:4:"type";s:5:"label";}}i:5;a:5:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:15:"created between";s:4:"name";s:12:"createdlabel";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:13:"searchcreated";}s:1:"C";a:3:{s:4:"type";s:4:"date";s:4:"name";s:15:"datecreatedfrom";s:4:"size";s:2:",8";}s:1:"D";a:3:{s:4:"type";s:4:"date";s:4:"name";s:13:"datecreatedto";s:4:"size";s:2:",8";}s:1:"E";a:4:{s:4:"type";s:8:"textarea";s:4:"name";s:17:"searchcreatedtext";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}}i:6;a:5:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:5:"label";s:16:"modified between";s:4:"name";s:13:"modifiedlabel";}s:1:"B";a:2:{s:4:"type";s:8:"checkbox";s:4:"name";s:14:"searchmodified";}s:1:"C";a:3:{s:4:"type";s:4:"date";s:4:"name";s:16:"datemodifiedfrom";s:4:"size";s:2:",8";}s:1:"D";a:3:{s:4:"type";s:4:"date";s:4:"name";s:14:"datemodifiedto";s:4:"size";s:2:",8";}s:1:"E";a:4:{s:4:"type";s:8:"textarea";s:4:"name";s:18:"searchmodifiedtext";s:8:"readonly";s:1:"1";s:7:"no_lang";s:1:"1";}}}s:4:"rows";i:6;s:4:"cols";i:5;}i:2;a:1:{s:4:"type";s:5:"hrule";}i:3;a:3:{s:4:"type";s:9:"nextmatch";s:4:"size";s:4:"rows";s:4:"name";s:2:"nm";}}','size' => '','style' => '','modified' => '1173101430',); + +$templ_data[] = array('name' => 'filemanager.search.rows','template' => '','lang' => '','group' => '0','version' => '','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:2:{s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";}i:1;a:8:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:2:"Id";s:4:"name";s:11:"vfs_file_id";}s:1:"B";a:3:{s:4:"type";s:5:"label";s:5:"label";s:4:"file";s:4:"name";s:7:"fulldir";}s:1:"C";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:9:"Directory";s:4:"name";s:13:"vfs_directory";}s:1:"D";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"name";s:4:"name";s:8:"vfs_name";}s:1:"E";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"comment";s:4:"name";s:11:"vfs_comment";}s:1:"F";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:9:"mime type";s:4:"name";s:13:"vfs_mime_type";}s:1:"G";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"created";s:4:"name";s:11:"vfs_created";}s:1:"H";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"modified";s:4:"name";s:12:"vfs_modified";}}i:2;a:8:{s:1:"A";a:3:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[vfs_file_id]";s:7:"no_lang";s:1:"1";}s:1:"B";a:3:{s:4:"type";s:4:"html";s:4:"name";s:15:"${row}[fulldir]";s:7:"no_lang";s:1:"1";}s:1:"C";a:3:{s:4:"type";s:4:"html";s:4:"name";s:21:"${row}[vfs_directory]";s:7:"no_lang";s:1:"1";}s:1:"D";a:3:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[vfs_name]";s:7:"no_lang";s:1:"1";}s:1:"E";a:3:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[vfs_comment]";s:7:"no_lang";s:1:"1";}s:1:"F";a:3:{s:4:"type";s:5:"label";s:4:"name";s:21:"${row}[vfs_mime_type]";s:7:"no_lang";s:1:"1";}s:1:"G";a:3:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[vfs_created]";s:7:"no_lang";s:1:"1";}s:1:"H";a:3:{s:4:"type";s:5:"label";s:4:"name";s:20:"${row}[vfs_modified]";s:7:"no_lang";s:1:"1";}}}s:4:"rows";i:2;s:4:"cols";i:8;s:4:"size";s:9:"100%,auto";s:7:"options";a:2:{i:0;s:4:"100%";i:1;s:4:"auto";}}}','size' => '100%,auto','style' => '','modified' => '1173104345',); + +$templ_data[] = array('name' => 'filemanager.search.rows','template' => '','lang' => '','group' => '0','version' => '1.4.001','data' => 'a:1:{i:0;a:6:{s:4:"type";s:4:"grid";s:4:"data";a:3:{i:0;a:3:{s:2:"c1";s:2:"th";s:2:"c2";s:3:"row";s:1:"A";s:2:"20";}i:1;a:9:{s:1:"A";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"Type";s:4:"name";s:13:"vfs_mime_type";}s:1:"B";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:2:"Id";s:4:"name";s:11:"vfs_file_id";}s:1:"C";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"File";s:4:"name";s:7:"fulldir";}s:1:"D";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:9:"Directory";s:4:"name";s:13:"vfs_directory";}s:1:"E";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:4:"name";s:4:"name";s:8:"vfs_name";}s:1:"F";a:3:{s:4:"type";s:16:"nextmatch-header";s:5:"label";s:9:"mime type";s:4:"name";s:9:"mime_type";}s:1:"G";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"comment";s:4:"name";s:11:"vfs_comment";}s:1:"H";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:7:"created";s:4:"name";s:11:"vfs_created";}s:1:"I";a:3:{s:4:"type";s:20:"nextmatch-sortheader";s:5:"label";s:8:"modified";s:4:"name";s:12:"vfs_modified";}}i:2;a:9:{s:1:"A";a:4:{s:4:"type";s:5:"image";s:5:"label";s:24:"$row_cont[vfs_mime_type]";s:4:"name";s:12:"${row}[icon]";s:5:"align";s:6:"center";}s:1:"B";a:3:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[vfs_file_id]";s:7:"no_lang";s:1:"1";}s:1:"C";a:4:{s:4:"type";s:5:"label";s:4:"name";s:12:"${row}[file]";s:7:"no_lang";s:1:"1";s:4:"size";s:21:",$row_cont[file_link]";}s:1:"D";a:4:{s:4:"type";s:5:"label";s:4:"name";s:21:"${row}[vfs_directory]";s:7:"no_lang";s:1:"1";s:4:"size";s:20:",$row_cont[dir_link]";}s:1:"E";a:4:{s:4:"type";s:5:"label";s:4:"name";s:16:"${row}[vfs_name]";s:7:"no_lang";s:1:"1";s:4:"size";s:21:",$row_cont[file_link]";}s:1:"F";a:2:{s:4:"type";s:5:"label";s:4:"name";s:21:"${row}[vfs_mime_type]";}s:1:"G";a:3:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[vfs_comment]";s:7:"no_lang";s:1:"1";}s:1:"H";a:3:{s:4:"type";s:5:"label";s:4:"name";s:19:"${row}[vfs_created]";s:7:"no_lang";s:1:"1";}s:1:"I";a:3:{s:4:"type";s:5:"label";s:4:"name";s:20:"${row}[vfs_modified]";s:7:"no_lang";s:1:"1";}}}s:4:"rows";i:2;s:4:"cols";i:9;s:4:"size";s:9:"100%,auto";s:7:"options";a:2:{i:0;s:4:"100%";i:1;s:4:"auto";}}}','size' => '100%,auto','style' => '','modified' => '1173104345',); + diff --git a/filemanager/templates/default/search.xet b/filemanager/templates/default/search.xet new file mode 100644 index 0000000000..7e3c5ae2cd --- /dev/null +++ b/filemanager/templates/default/search.xet @@ -0,0 +1,106 @@ + + + + + + \ No newline at end of file