- Don't show the "Copy" link if a file is not readable
$ftpl->fillin('URL',equal_url(encode_html($config->{'httproot'}),$virt_path->{'html'}));
$ftpl->parse_if_block('link',-l $phys_path);
$ftpl->fillin('URL',equal_url(encode_html($config->{'httproot'}),$virt_path->{'html'}));
$ftpl->parse_if_block('link',-l $phys_path);
- $ftpl->parse_if_block('not_readable',not -r $phys_path);
+ $ftpl->parse_if_block('readable',-r $phys_path);
+ $ftpl->parse_if_block('writeable',-w $phys_path);
$ftpl->parse_if_block('binary',-B $phys_path);
$ftpl->parse_if_block('binary',-B $phys_path);
- $ftpl->parse_if_block('readonly',not -w $phys_path);
$ftpl->parse_if_block('viewable',(-r $phys_path && -T $phys_path && not $too_large) || -l $phys_path);
$ftpl->parse_if_block('editable',(-r $phys_path && -w $phys_path && -T $phys_path && not $too_large) && not -l $phys_path);
$ftpl->parse_if_block('viewable',(-r $phys_path && -T $phys_path && not $too_large) || -l $phys_path);
$ftpl->parse_if_block('editable',(-r $phys_path && -w $phys_path && -T $phys_path && not $too_large) && not -l $phys_path);
<td align="right" style="white-space:nowrap">{SIZE}</td>
<td style="padding-left:15pt;white-space:nowrap;">{DATE}{IF gmt} (GMT){ENDIF}</td>
<td style="padding-left:15pt;white-space:nowrap;">{FILE_NAME}</td>
<td align="right" style="white-space:nowrap">{SIZE}</td>
<td style="padding-left:15pt;white-space:nowrap;">{DATE}{IF gmt} (GMT){ENDIF}</td>
<td style="padding-left:15pt;white-space:nowrap;">{FILE_NAME}</td>
-<td style="padding-left:15pt;white-space:nowrap;">({IF viewable}<a href="{SCRIPT}?command=show&file={FILE_URL}">View</a>{ELSE}<span style="color:#C0C0C0" title="{IF not_readable}Not readable{ELSE}{IF binary}Binary file{ELSE}{IF too_large}File too large{ENDIF}{ENDIF}{ENDIF}">View</span>{ENDIF} | {IF editable}<a href="{SCRIPT}?command=beginedit&file={FILE_URL}">Edit</a>{ELSE}<span style="color:#C0C0C0" title="{IF link}Symbolic link{ELSE}{IF not_readable}Not readable{ELSE}{IF readonly}Read only{ELSE}{IF binary}Binary file{ELSE}{IF too_large}File too large{ENDIF}{ENDIF}{ENDIF}{ENDIF}{ENDIF}">Edit</span>{ENDIF}{IF !link} | <a href="{SCRIPT}?command=copy&file={FILE_URL}">Copy</a>{ENDIF}{IF dir_writeable} | <a href="{SCRIPT}?command=rename&file={FILE_URL}">Rename</a> | <a href="{SCRIPT}?command=remove&file={FILE_URL}">Delete</a>{ENDIF} |{IF !link}{IF users} <a href="{SCRIPT}?command=chprop&file={FILE_URL}">Chmod/Chgrp</a> |{ENDIF}{ENDIF} <a href="{URL}" target="_blank">View in Browser</a>)</td>
+<td style="padding-left:15pt;white-space:nowrap;">({IF viewable}<a href="{SCRIPT}?command=show&file={FILE_URL}">View</a>{ELSE}<span style="color:#C0C0C0" title="{IF not_readable}Not readable{ELSE}{IF binary}Binary file{ELSE}{IF too_large}File too large{ENDIF}{ENDIF}{ENDIF}">View</span>{ENDIF} | {IF editable}<a href="{SCRIPT}?command=beginedit&file={FILE_URL}">Edit</a>{ELSE}<span style="color:#C0C0C0" title="{IF link}Symbolic link{ELSE}{IF !readable}Not readable{ELSE}{IF !writeable}Read only{ELSE}{IF binary}Binary file{ELSE}{IF too_large}File too large{ENDIF}{ENDIF}{ENDIF}{ENDIF}{ENDIF}">Edit</span>{ENDIF}{IF !link}{IF readable} | <a href="{SCRIPT}?command=copy&file={FILE_URL}">Copy</a>{ENDIF}{ENDIF}{IF dir_writeable} | <a href="{SCRIPT}?command=rename&file={FILE_URL}">Rename</a> | <a href="{SCRIPT}?command=remove&file={FILE_URL}">Delete</a>{ENDIF} |{IF !link}{IF users} <a href="{SCRIPT}?command=chprop&file={FILE_URL}">Chmod/Chgrp</a> |{ENDIF}{ENDIF} <a href="{URL}" target="_blank">View in Browser</a>)</td>