Changeset 1524 for sandbox/filemanager/inc/class.uifilemanager.inc.php
- Timestamp:
- 10/26/09 15:21:39 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sandbox/filemanager/inc/class.uifilemanager.inc.php
r1519 r1524 460 460 $this->can_add = True; 461 461 } 462 if($this->bo->vfs->acl_check(array( 463 'string' => $this->path, 464 'relatives' => array(RELATIVE_NONE), 465 'operation' => PHPGW_ACL_EDIT 466 ))) 467 { 468 $this->can_edit = True; 469 } 470 if($this->bo->vfs->acl_check(array( 471 'string' => $this->path, 472 'relatives' => array(RELATIVE_NONE), 473 'operation' => PHPGW_ACL_DELETE 474 ))) 475 { 476 $this->can_delete = True; 477 } 478 462 479 463 480 # Default is to sort by name … … 989 1006 $toolbar=' 990 1007 <div id="fmLocation"> 991 <table cellspacing="1 " cellpadding="0" border="0">1008 <table cellspacing="10" cellpadding="0" border="0"> 992 1009 <tr> 993 1010 '; 994 $toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>'; 995 $toolbar.=' 996 <td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>'; 1011 // $toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>'; 1012 // $toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>'; 997 1013 998 1014 // go up icon when we're not at the top, dont allow to go outside /home = fakebase … … 1022 1038 <input type="hidden" name="changedir" value="false"></td> 1023 1039 '; 1024 $toolbar.=$this->inputImage('goto','goto',lang('Quick jump to'));1040 //$toolbar.=$this->inputImage('goto','goto',lang('Quick jump to')); 1025 1041 // upload button 1026 1042 if($this->path != '/' && $this->path != $this->bo->fakebase && $this->can_add) 1027 1043 { 1028 1044 1029 $toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>'; 1030 $toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>'; 1031 $toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>'; 1032 1033 // $toolbar.=$this->inputImage('download','download',lang('Download')); 1045 // $toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>'; 1046 // $toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>'; 1047 // $toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>'; 1048 // $toolbar.=$this->inputImage('download','download',lang('Download')); 1034 1049 // upload button 1035 1050 $toolbar.=$this->inputImage('upload','upload',lang('Upload')); 1036 1051 } 1037 1052 $toolbar.='</tr></table>'; 1038 $toolbar.='</div> ';1053 $toolbar.='</div><br><br>'; 1039 1054 break; 1040 1055 case 'list_nav': 1041 1056 $toolbar=' 1042 <table cellspacing="1 " cellpadding="0" border="0">1057 <table cellspacing="10" cellpadding="0" border="0"> 1043 1058 <tr>'; 1044 1059 // selectbox for change/move/and copy to … … 1046 1061 if($this->path != '/' && $this->path != $this->bo->fakebase) 1047 1062 { 1048 $toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>'; 1049 $toolbar.=' 1050 <td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>'; 1051 1052 if(!$this->rename_x && !$this->edit_comments_x) 1063 //$toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>'; 1064 //$toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>'; 1065 1066 if(!$this->rename_x && !$this->edit_comments_x && $this->can_edit) 1053 1067 { 1054 1068 // edit text file button … … 1056 1070 } 1057 1071 1058 if(!$this->edit_comments_x )1072 if(!$this->edit_comments_x && $this->can_edit) 1059 1073 { 1060 1074 $toolbar.=$this->inputImage('rename','rename',lang('Rename')); 1061 1075 } 1062 1076 1063 if(!$this->rename_x && !$this->edit_comments_x )1077 if(!$this->rename_x && !$this->edit_comments_x && $this->can_delete) 1064 1078 { 1065 1079 $toolbar.=$this->inputImage('delete','delete',lang('Delete')); 1066 1080 } 1067 1081 1068 if(!$this->rename_x )1082 if(!$this->rename_x && $this->can_edit) 1069 1083 { 1070 1084 $toolbar.=$this->inputImage('edit_comments','edit_comments',lang('Edit comments')); … … 1079 1093 if($this->path != '/' && $this->path != $this->bo->fakebase) 1080 1094 { 1081 $toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>';1082 $toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';1095 //$toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>'; 1096 //$toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>'; 1083 1097 1084 1098 $dirs_options=$this->all_other_directories_options(); … … 1095 1109 if($this->path != '/' && $this->path != $this->bo->fakebase && $this->can_add) 1096 1110 { 1097 $toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>';1098 $toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';1111 //$toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>'; 1112 //$toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>'; 1099 1113 1100 1114 $toolbar3.='<td><input type=text size="15" name="newfile_or_dir" value="" /></td>'; … … 1790 1804 while(list($num, $group_array) = each($this->readable_groups)) 1791 1805 { 1792 #Don't list directories for groups that don't have access1806 /* Don't list directories for groups that don't have access 1793 1807 if(!$this->groups_applications[$group_array['account_name']][$this->bo->appname]['enabled']) 1794 1808 { 1795 continue;1796 } 1809 ] continue; 1810 }*/ 1797 1811 1798 1812 $dirs[] = array('directory' => $this->bo->fakebase, 'name' => $group_array['account_name']); … … 1851 1865 } 1852 1866 1853 function buttonImage($link,$img='',$ help='')1867 function buttonImage($link,$img='',$description='') 1854 1868 { 1855 1869 $image=$GLOBALS['phpgw']->common->image('filemanager','button_'.strtolower($img)); … … 1857 1871 if($img) 1858 1872 { 1859 return '<td class=" fmButton" align="center" valign="middle" height="28" width="28">1860 <a href="'.$link.'" title="'.$ help.'"><img src="'.$image.'" alt="'.$help.'"/></a>1873 return '<td class="" align="center" valign="middle" height="28" width="70"> 1874 <a href="'.$link.'" title="'.$description.'"><img src="'.$image.'" alt="'.$description.'"/></a><br><small>'.$description.'</small> 1861 1875 </td>'; 1862 1876 } 1863 1877 } 1864 1878 1865 function inputImage($name,$img='',$ help='')1879 function inputImage($name,$img='',$description='') 1866 1880 { 1867 1881 $image=$GLOBALS['phpgw']->common->image('filemanager','button_'.strtolower($img)); … … 1869 1883 if($img) 1870 1884 { 1871 return '<td class=" fmButton" align="center" valign="middle" height="28" width="28">1872 <input title="'.$ help.'" name="'.$name.'" type="image" alt="'.$name.'" src="'.$image.'" value="clicked" />1885 return '<td class="" align="center" valign="middle" height="28" width="70"> 1886 <input title="'.$description.'" name="'.$name.'" type="image" alt="'.$name.'" src="'.$image.'" value="clicked" /><br><small>'.$description.'</small> 1873 1887 </td>'; 1874 1888 }
Note: See TracChangeset
for help on using the changeset viewer.