Changeset 1524


Ignore:
Timestamp:
10/26/09 15:21:39 (15 years ago)
Author:
amuller
Message:

Ticket #597 - Melhorando bugs de interface do filemanager

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sandbox/filemanager/inc/class.uifilemanager.inc.php

    r1519 r1524  
    460460                                $this->can_add = True; 
    461461                        } 
     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 
    462479 
    463480                        # Default is to sort by name 
     
    9891006                                        $toolbar=' 
    9901007                                        <div id="fmLocation"> 
    991                                         <table cellspacing="1" cellpadding="0" border="0"> 
     1008                                        <table cellspacing="10" cellpadding="0" border="0"> 
    9921009                                        <tr> 
    9931010                                        '; 
    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>'; 
    9971013 
    9981014                                        // go up icon when we're not at the top, dont allow to go outside /home = fakebase 
     
    10221038                                        <input type="hidden" name="changedir" value="false"></td> 
    10231039                                        '; 
    1024                                         $toolbar.=$this->inputImage('goto','goto',lang('Quick jump to')); 
     1040                                        //$toolbar.=$this->inputImage('goto','goto',lang('Quick jump to')); 
    10251041                                        // upload button 
    10261042                                        if($this->path != '/' && $this->path != $this->bo->fakebase && $this->can_add) 
    10271043                                        { 
    10281044 
    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')); 
    10341049                                                // upload button 
    10351050                                                $toolbar.=$this->inputImage('upload','upload',lang('Upload')); 
    10361051                                        } 
    10371052                                        $toolbar.='</tr></table>'; 
    1038                                         $toolbar.='</div>'; 
     1053                                        $toolbar.='</div><br><br>'; 
    10391054                                        break; 
    10401055                                case 'list_nav': 
    10411056                                        $toolbar=' 
    1042                                         <table cellspacing="1" cellpadding="0" border="0"> 
     1057                                        <table cellspacing="10" cellpadding="0" border="0"> 
    10431058                                        <tr>'; 
    10441059                                        // selectbox for change/move/and copy to 
     
    10461061                                        if($this->path != '/' && $this->path != $this->bo->fakebase) 
    10471062                                        { 
    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) 
    10531067                                                { 
    10541068                                                        // edit text file button 
     
    10561070                                                } 
    10571071 
    1058                                                 if(!$this->edit_comments_x) 
     1072                                                if(!$this->edit_comments_x && $this->can_edit) 
    10591073                                                { 
    10601074                                                        $toolbar.=$this->inputImage('rename','rename',lang('Rename')); 
    10611075                                                } 
    10621076 
    1063                                                 if(!$this->rename_x && !$this->edit_comments_x) 
     1077                                                if(!$this->rename_x && !$this->edit_comments_x && $this->can_delete) 
    10641078                                                { 
    10651079                                                        $toolbar.=$this->inputImage('delete','delete',lang('Delete')); 
    10661080                                                } 
    10671081 
    1068                                                 if(!$this->rename_x) 
     1082                                                if(!$this->rename_x && $this->can_edit) 
    10691083                                                { 
    10701084                                                        $toolbar.=$this->inputImage('edit_comments','edit_comments',lang('Edit comments')); 
     
    10791093                                                if($this->path != '/' && $this->path != $this->bo->fakebase) 
    10801094                                                { 
    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>'; 
    10831097 
    10841098                                                        $dirs_options=$this->all_other_directories_options(); 
     
    10951109                                                if($this->path != '/' && $this->path != $this->bo->fakebase && $this->can_add) 
    10961110                                                { 
    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>'; 
    10991113 
    11001114                                                        $toolbar3.='<td><input type=text size="15" name="newfile_or_dir" value="" /></td>'; 
     
    17901804                        while(list($num, $group_array) = each($this->readable_groups)) 
    17911805                        { 
    1792                                 # Don't list directories for groups that don't have access 
     1806                                /* Don't list directories for groups that don't have access 
    17931807                                if(!$this->groups_applications[$group_array['account_name']][$this->bo->appname]['enabled']) 
    17941808                                { 
    1795                                         continue; 
    1796                                 } 
     1809]                                       continue; 
     1810                                }*/ 
    17971811 
    17981812                                $dirs[] = array('directory' => $this->bo->fakebase, 'name' => $group_array['account_name']); 
     
    18511865                } 
    18521866 
    1853                 function buttonImage($link,$img='',$help='') 
     1867                function buttonImage($link,$img='',$description='') 
    18541868                { 
    18551869                        $image=$GLOBALS['phpgw']->common->image('filemanager','button_'.strtolower($img)); 
     
    18571871                        if($img) 
    18581872                        { 
    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> 
    18611875                                </td>'; 
    18621876                        } 
    18631877                } 
    18641878 
    1865                 function inputImage($name,$img='',$help='') 
     1879                function inputImage($name,$img='',$description='') 
    18661880                { 
    18671881                        $image=$GLOBALS['phpgw']->common->image('filemanager','button_'.strtolower($img)); 
     
    18691883                        if($img) 
    18701884                        { 
    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> 
    18731887                                </td>'; 
    18741888                        } 
Note: See TracChangeset for help on using the changeset viewer.