From: pcanterino <> Date: Mon, 15 Mar 2004 20:51:34 +0000 (+0000) Subject: In directory listing, there is a new menu item "View in browser" for each directory... X-Git-Tag: version_2_0~27 X-Git-Url: https://git.p6c8.net/devedit.git/commitdiff_plain/9fdc1d205fbe98f5f1f2f474e243e43018c2f30c?ds=inline In directory listing, there is a new menu item "View in browser" for each directory entry (except ".."). --- 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