Index: /sandbox/filemanager/inc/class.uifilemanager.inc.php
===================================================================
--- /sandbox/filemanager/inc/class.uifilemanager.inc.php	(revision 1519)
+++ /sandbox/filemanager/inc/class.uifilemanager.inc.php	(revision 1524)
@@ -460,4 +460,21 @@
 				$this->can_add = True;
 			}
+			if($this->bo->vfs->acl_check(array(
+				'string' => $this->path,
+				'relatives' => array(RELATIVE_NONE),
+				'operation' => PHPGW_ACL_EDIT
+			)))
+			{
+				$this->can_edit = True;
+			}
+			if($this->bo->vfs->acl_check(array(
+				'string' => $this->path,
+				'relatives' => array(RELATIVE_NONE),
+				'operation' => PHPGW_ACL_DELETE
+			)))
+			{
+				$this->can_delete = True;
+			}
+
 
 			# Default is to sort by name
@@ -989,10 +1006,9 @@
 					$toolbar='
 					<div id="fmLocation">
-					<table cellspacing="1" cellpadding="0" border="0">
+					<table cellspacing="10" cellpadding="0" border="0">
 					<tr>
 					';
-					$toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>';
-					$toolbar.='
-					<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';
+//					$toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>';
+//					$toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';
 
 					// go up icon when we're not at the top, dont allow to go outside /home = fakebase
@@ -1022,23 +1038,22 @@
 					<input type="hidden" name="changedir" value="false"></td>
 					';
-					$toolbar.=$this->inputImage('goto','goto',lang('Quick jump to'));
+					//$toolbar.=$this->inputImage('goto','goto',lang('Quick jump to'));
 					// upload button
 					if($this->path != '/' && $this->path != $this->bo->fakebase && $this->can_add)
 					{
 
-						$toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';
-						$toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>';
-						$toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';
-
-						//						$toolbar.=$this->inputImage('download','download',lang('Download'));
+					//	$toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';
+					//	$toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>';
+					//	$toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';
+					//	$toolbar.=$this->inputImage('download','download',lang('Download'));
 						// upload button
 						$toolbar.=$this->inputImage('upload','upload',lang('Upload'));
 					}
 					$toolbar.='</tr></table>';
-					$toolbar.='</div>';
+					$toolbar.='</div><br><br>';
 					break;
 				case 'list_nav':
 					$toolbar='
-					<table cellspacing="1" cellpadding="0" border="0">
+					<table cellspacing="10" cellpadding="0" border="0">
 					<tr>';
 					// selectbox for change/move/and copy to
@@ -1046,9 +1061,8 @@
 					if($this->path != '/' && $this->path != $this->bo->fakebase)
 					{
-						$toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>';
-						$toolbar.='
-						<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';
-
-						if(!$this->rename_x && !$this->edit_comments_x)
+						//$toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>';
+						//$toolbar.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';
+
+						if(!$this->rename_x && !$this->edit_comments_x && $this->can_edit)
 						{
 							// edit text file button
@@ -1056,15 +1070,15 @@
 						}
 
-						if(!$this->edit_comments_x)
+						if(!$this->edit_comments_x && $this->can_edit)
 						{
 							$toolbar.=$this->inputImage('rename','rename',lang('Rename'));
 						}
 
-						if(!$this->rename_x && !$this->edit_comments_x)
+						if(!$this->rename_x && !$this->edit_comments_x && $this->can_delete)
 						{
 							$toolbar.=$this->inputImage('delete','delete',lang('Delete'));
 						}
 
-						if(!$this->rename_x)
+						if(!$this->rename_x && $this->can_edit)
 						{
 							$toolbar.=$this->inputImage('edit_comments','edit_comments',lang('Edit comments'));
@@ -1079,6 +1093,6 @@
 						if($this->path != '/' && $this->path != $this->bo->fakebase)
 						{
-							$toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>';
-							$toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';
+							//$toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>';
+							//$toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';
 
 							$dirs_options=$this->all_other_directories_options();
@@ -1095,6 +1109,6 @@
 						if($this->path != '/' && $this->path != $this->bo->fakebase && $this->can_add)
 						{
-							$toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>';
-							$toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';
+							//$toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('phpgwapi','buttonseparator').'" height="27" width="8"></td>';
+							//$toolbar3.='<td><img alt="spacer" src="'.$GLOBALS['phpgw']->common->image('filemanager','spacer').'" height="27" width="1"></td>';
 
 							$toolbar3.='<td><input type=text size="15" name="newfile_or_dir" value="" /></td>';
@@ -1790,9 +1804,9 @@
 			while(list($num, $group_array) = each($this->readable_groups))
 			{
-				# Don't list directories for groups that don't have access
+				/* Don't list directories for groups that don't have access
 				if(!$this->groups_applications[$group_array['account_name']][$this->bo->appname]['enabled'])
 				{
-					continue;
-				}
+]					continue;
+				}*/
 
 				$dirs[] = array('directory' => $this->bo->fakebase, 'name' => $group_array['account_name']);
@@ -1851,5 +1865,5 @@
 		}
 
-		function buttonImage($link,$img='',$help='')
+		function buttonImage($link,$img='',$description='')
 		{
 			$image=$GLOBALS['phpgw']->common->image('filemanager','button_'.strtolower($img));
@@ -1857,11 +1871,11 @@
 			if($img)
 			{
-				return '<td class="fmButton" align="center" valign="middle" height="28" width="28">
-				<a href="'.$link.'" title="'.$help.'"><img src="'.$image.'" alt="'.$help.'"/></a>
+				return '<td class="" align="center" valign="middle" height="28" width="70">
+				<a href="'.$link.'" title="'.$description.'"><img src="'.$image.'" alt="'.$description.'"/></a><br><small>'.$description.'</small>
 				</td>';
 			}
 		}
 
-		function inputImage($name,$img='',$help='')
+		function inputImage($name,$img='',$description='')
 		{
 			$image=$GLOBALS['phpgw']->common->image('filemanager','button_'.strtolower($img));
@@ -1869,6 +1883,6 @@
 			if($img)
 			{
-				return '<td class="fmButton" align="center" valign="middle" height="28" width="28">
-				<input title="'.$help.'" name="'.$name.'" type="image" alt="'.$name.'" src="'.$image.'" value="clicked" />
+				return '<td class="" align="center" valign="middle" height="28" width="70">
+				<input title="'.$description.'" name="'.$name.'" type="image" alt="'.$name.'" src="'.$image.'" value="clicked" /><br><small>'.$description.'</small>
 				</td>';
 			}
