]> git.p6c8.net - devedit.git/commitdiff
Don't create an incomplete HTML table if the root directory is empty or none of
authorpcanterino <>
Mon, 28 Feb 2005 16:34:19 +0000 (16:34 +0000)
committerpcanterino <>
Mon, 28 Feb 2005 16:34:19 +0000 (16:34 +0000)
the files in the root directory matches against the current wildcard

modules/Command.pm
templates/dirlist.htm

index e6491e7c9bc0db3f020c9d6dc5e660c11ef87e2b..2e8f93594b88591e8998fed09b0bfe002cfe956d 100644 (file)
@@ -6,7 +6,7 @@ package Command;
 # Execute Dev-Editor's commands
 #
 # Author:        Patrick Canterino <patrick@patshaping.de>
-# Last modified: 2005-02-14
+# Last modified: 2005-02-28
 #
 
 use strict;
@@ -207,6 +207,7 @@ sub exec_show($$)
   $tpl->fillin('FILTER',encode_entities($filter2));
   $tpl->fillin('FILTER_URL',escape($filter2));
 
+  $tpl->parse_if_block('empty',$dirlist eq '');
   $tpl->parse_if_block('dir_writeable',$dir_writeable);
   $tpl->parse_if_block('filter',$filter2);
   $tpl->parse_if_block('gmt',$config->{'use_gmt'});
index 8a8c9ee60747e163d1bfa620c64c08cec6ccb742..c87faac046e85c01fcb632b1b0108bf49710205a 100644 (file)
@@ -14,8 +14,8 @@
 
 <hr>
 
-<table border="0" style="font-family:'Courier New',Courier,monospace;font-size:10pt;">
-{DIRLIST}</table>
+{IF empty}<p><i>This directory is empty or nothing is matching against your wildcard</i></p>{ELSE}<table border="0" style="font-family:'Courier New',Courier,monospace;font-size:10pt;">
+{DIRLIST}</table>{ENDIF}
 
 <hr>
 

patrick-canterino.de