]> git.p6c8.net - devedit.git/commitdiff
In directory listing, there is a new menu item "View in browser" for each directory...
authorpcanterino <>
Mon, 15 Mar 2004 20:51:34 +0000 (20:51 +0000)
committerpcanterino <>
Mon, 15 Mar 2004 20:51:34 +0000 (20:51 +0000)
modules/Command.pm
templates/dirlist_dir.htm
templates/dirlist_file.htm

index 9f6b970aff283f58cee28af30da52b7c19ec64d5..e2a00636a9b3647a907b5d1ddca613efd2d950c5 100644 (file)
@@ -6,7 +6,7 @@ package Command;
 # Execute Dev-Editor's commands
 #
 # Author:        Patrick Canterino <patshaping@gmx.net>
 # Execute Dev-Editor's commands
 #
 # Author:        Patrick Canterino <patshaping@gmx.net>
-# Last modified: 2004-03-09
+# Last modified: 2004-03-15
 #
 
 use strict;
 #
 
 use strict;
@@ -125,6 +125,7 @@ sub exec_show($$)
    $dtpl->fillin("DIR",$virt_path);
    $dtpl->fillin("DIR_NAME",$dir);
    $dtpl->fillin("DATE",strftime($config->{'timeformat'},localtime($stat[9])));
    $dtpl->fillin("DIR",$virt_path);
    $dtpl->fillin("DIR_NAME",$dir);
    $dtpl->fillin("DATE",strftime($config->{'timeformat'},localtime($stat[9])));
+   $dtpl->fillin("URL",equal_url($config->{'httproot'},$virt_path));
 
    $dirlist .= $dtpl->get_template;
   }
 
    $dirlist .= $dtpl->get_template;
   }
@@ -146,6 +147,7 @@ sub exec_show($$)
    $ftpl->fillin("FILE_NAME",$file);
    $ftpl->fillin("SIZE",$stat[7]);
    $ftpl->fillin("DATE",strftime($config->{'timeformat'},localtime($stat[9])));
    $ftpl->fillin("FILE_NAME",$file);
    $ftpl->fillin("SIZE",$stat[7]);
    $ftpl->fillin("DATE",strftime($config->{'timeformat'},localtime($stat[9])));
+   $ftpl->fillin("URL",equal_url($config->{'httproot'},$virt_path));
 
    $ftpl->parse_if_block("not_readable",not -r $phys_path);
    $ftpl->parse_if_block("binary",-B $phys_path);
 
    $ftpl->parse_if_block("not_readable",not -r $phys_path);
    $ftpl->parse_if_block("binary",-B $phys_path);
index 5e959523d10b7398254c775679de15d2f1714beb..9143fcc2120b66ee7ddb3a1595b95f3dce5a23b1 100644 (file)
@@ -2,5 +2,5 @@
 <td align="right">[SUBDIR]</td>
 <td style="padding-left:15pt">{DATE}</td>
 <td style="padding-left:15pt"><a href="{SCRIPT}?command=show&file={DIR}">{DIR_NAME}/</a></td>
 <td align="right">[SUBDIR]</td>
 <td style="padding-left:15pt">{DATE}</td>
 <td style="padding-left:15pt"><a href="{SCRIPT}?command=show&file={DIR}">{DIR_NAME}/</a></td>
-<td style="padding-left:15pt">(<a href="{SCRIPT}?command=rename&file={DIR}">Rename</a> | <a href="{SCRIPT}?command=remove&file={DIR}">Delete</a>)</td>
+<td style="padding-left:15pt">(<a href="{SCRIPT}?command=rename&file={DIR}">Rename</a> | <a href="{SCRIPT}?command=remove&file={DIR}">Delete</a> | <a href="{URL}" target="_blank">View in Browser</a>)</td>
 </tr>
\ No newline at end of file
 </tr>
\ No newline at end of file
index 347c6400ecfbc10ff10fc1f40a34db47a1f56f9e..a9f2a62cc1a46986744280d5f9a929bf42f653bc 100644 (file)
@@ -2,5 +2,5 @@
 <td align="right">{SIZE}</td>
 <td style="padding-left:15pt">{DATE}</td>
 <td style="padding-left:15pt">{FILE_NAME}</td>
 <td align="right">{SIZE}</td>
 <td style="padding-left:15pt">{DATE}</td>
 <td style="padding-left:15pt">{FILE_NAME}</td>
-<td style="padding-left:15pt">({IF viewable}<a href="{SCRIPT}?command=show&file={FILE}">View</a>{ELSE}<span style="color:#C0C0C0" title="{IF not_readable}Not readable{ELSE}{IF binary}Binary file{ENDIF}{ENDIF}">View</span>{ENDIF} | {IF editable}<a href="{SCRIPT}?command=beginedit&file={FILE}">Edit</a>{ELSE}<span style="color:#C0C0C0" title="{IF not_readable}Not readable{ELSE}{IF readonly}Read only{ELSE}{IF binary}Binary file{ELSE}{IF in_use}In use{ENDIF}{ENDIF}{ENDIF}{ENDIF}">Edit</span>{ENDIF} | <a href="{SCRIPT}?command=copy&file={FILE}">Copy</a>{IF unused} | <a href="{SCRIPT}?command=rename&file={FILE}">Rename</a> | <a href="{SCRIPT}?command=remove&file={FILE}">Delete</a>{ENDIF}{IF in_use} | <a href="{SCRIPT}?command=unlock&file={FILE}">Unlock</a>{ENDIF})</td>
+<td style="padding-left:15pt">({IF viewable}<a href="{SCRIPT}?command=show&file={FILE}">View</a>{ELSE}<span style="color:#C0C0C0" title="{IF not_readable}Not readable{ELSE}{IF binary}Binary file{ENDIF}{ENDIF}">View</span>{ENDIF} | {IF editable}<a href="{SCRIPT}?command=beginedit&file={FILE}">Edit</a>{ELSE}<span style="color:#C0C0C0" title="{IF not_readable}Not readable{ELSE}{IF readonly}Read only{ELSE}{IF binary}Binary file{ELSE}{IF in_use}In use{ENDIF}{ENDIF}{ENDIF}{ENDIF}">Edit</span>{ENDIF} | <a href="{SCRIPT}?command=copy&file={FILE}">Copy</a>{IF unused} | <a href="{SCRIPT}?command=rename&file={FILE}">Rename</a> | <a href="{SCRIPT}?command=remove&file={FILE}">Delete</a>{ENDIF}{IF in_use} | <a href="{SCRIPT}?command=unlock&file={FILE}">Unlock</a>{ENDIF} | <a href="{URL}" target="_blank">View in Browser</a>)</td>
 </tr>
\ No newline at end of file
 </tr>
\ No newline at end of file

patrick-canterino.de