From 9fdc1d205fbe98f5f1f2f474e243e43018c2f30c Mon Sep 17 00:00:00 2001 From: pcanterino <> Date: Mon, 15 Mar 2004 20:51:34 +0000 Subject: [PATCH] In directory listing, there is a new menu item "View in browser" for each directory entry (except ".."). --- modules/Command.pm | 4 +++- templates/dirlist_dir.htm | 2 +- templates/dirlist_file.htm | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/Command.pm b/modules/Command.pm index 9f6b970..e2a0063 100644 --- a/modules/Command.pm +++ b/modules/Command.pm @@ -6,7 +6,7 @@ package Command; # Execute Dev-Editor's commands # # Author: Patrick Canterino -# Last modified: 2004-03-09 +# Last modified: 2004-03-15 # 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("URL",equal_url($config->{'httproot'},$virt_path)); $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("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); diff --git a/templates/dirlist_dir.htm b/templates/dirlist_dir.htm index 5e95952..9143fcc 100644 --- a/templates/dirlist_dir.htm +++ b/templates/dirlist_dir.htm @@ -2,5 +2,5 @@ [SUBDIR] {DATE} {DIR_NAME}/ -(Rename | Delete) +(Rename | Delete | View in Browser) \ No newline at end of file diff --git a/templates/dirlist_file.htm b/templates/dirlist_file.htm index 347c640..a9f2a62 100644 --- a/templates/dirlist_file.htm +++ b/templates/dirlist_file.htm @@ -2,5 +2,5 @@ {SIZE} {DATE} {FILE_NAME} -({IF viewable}View{ELSE}View{ENDIF} | {IF editable}Edit{ELSE}Edit{ENDIF} | Copy{IF unused} | Rename | Delete{ENDIF}{IF in_use} | Unlock{ENDIF}) +({IF viewable}View{ELSE}View{ENDIF} | {IF editable}Edit{ELSE}Edit{ENDIF} | Copy{IF unused} | Rename | Delete{ENDIF}{IF in_use} | Unlock{ENDIF} | View in Browser) \ No newline at end of file -- 2.34.1