]> git.p6c8.net - devedit.git/commitdiff
- Changed names of some {IF} blocks (make use of negations)
authorpcanterino <>
Thu, 5 May 2005 15:18:22 +0000 (15:18 +0000)
committerpcanterino <>
Thu, 5 May 2005 15:18:22 +0000 (15:18 +0000)
- Don't show the "Copy" link if a file is not readable

modules/Command.pm
templates/dirlist_file.htm

index 42da15d44e7a7957c401c1666202bf442ec3cbcf..1c5afa026f94f4b1b69f851d5743d03e7bb0b3f6 100644 (file)
@@ -178,9 +178,9 @@ sub exec_show($$)
    $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);
index 99e2ae132742bf1f6f50429bb8d76ebfc0acc395..60c359b4c8ece01eafd8a43f1729d69b8c50ce24 100644 (file)
@@ -2,5 +2,5 @@
 <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&amp;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&amp;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&amp;file={FILE_URL}">Copy</a>{ENDIF}{IF dir_writeable} | <a href="{SCRIPT}?command=rename&amp;file={FILE_URL}">Rename</a> | <a href="{SCRIPT}?command=remove&amp;file={FILE_URL}">Delete</a>{ENDIF} |{IF !link}{IF users} <a href="{SCRIPT}?command=chprop&amp;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&amp;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&amp;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&amp;file={FILE_URL}">Copy</a>{ENDIF}{ENDIF}{IF dir_writeable} | <a href="{SCRIPT}?command=rename&amp;file={FILE_URL}">Rename</a> | <a href="{SCRIPT}?command=remove&amp;file={FILE_URL}">Delete</a>{ENDIF} |{IF !link}{IF users} <a href="{SCRIPT}?command=chprop&amp;file={FILE_URL}">Chmod/Chgrp</a> |{ENDIF}{ENDIF} <a href="{URL}" target="_blank">View in Browser</a>)</td>
 </tr>
 </tr>

patrick-canterino.de