- $output .= (-w $phys_path && -r $phys_path && -T $phys_path && not $in_use)
- ? "<a href=\"$script?command=beginedit&file=$virt_path\">Edit</a>"
- : '<span style="color:#C0C0C0">Edit</span>';
+ # Link "Edit"
+
+ if(-w $phys_path && -r $phys_path && -T $phys_path && not $in_use)
+ {
+ $output .= "<a href=\"$script?command=beginedit&file=$virt_path\">Edit</a>";
+ }
+ else
+ {
+ $output .= '<span style="color:#C0C0C0" title="';
+
+ $output .= (not -r $phys_path) ? "Not readable" :
+ (not -w $phys_path) ? "Read only" :
+ (-B $phys_path) ? "Binary file" :
+ ($in_use) ? "In use" : "";
+
+ $output .= '">Edit</span>';
+ }
+
+ # Link "Do other stuff"