summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
40f2eee)
table rows in directory listing for every row with an even number. This allows
a better distinction of the rows.
# Execute Dev-Editor's commands
#
# Author: Patrick Canterino <patrick@patshaping.de>
# Execute Dev-Editor's commands
#
# Author: Patrick Canterino <patrick@patshaping.de>
-# Last modified: 2009-03-30
+# Last modified: 2009-03-31
my $filter1 = $data->{'cgi'}->param('filter') || '*'; # The real wildcard
my $filter2 = ($filter1 && $filter1 ne '*') ? $filter1 : ''; # Wildcard for output
my $filter1 = $data->{'cgi'}->param('filter') || '*'; # The real wildcard
my $filter2 = ($filter1 && $filter1 ne '*') ? $filter1 : ''; # Wildcard for output
unless($virtual eq '/')
{
unless($virtual eq '/')
{
my @stat = stat($physical.'/..');
my $udtpl = new Template;
my @stat = stat($physical.'/..');
my $udtpl = new Template;
next if($config->{'hide_dot_files'} && substr($dir,0,1) eq '.');
next unless(dos_wildcard_match($filter1,$dir));
next if($config->{'hide_dot_files'} && substr($dir,0,1) eq '.');
next unless(dos_wildcard_match($filter1,$dir));
my $phys_path = $physical.'/'.$dir;
my $virt_path = multi_string($virtual.$dir.'/');
my $phys_path = $physical.'/'.$dir;
my $virt_path = multi_string($virtual.$dir.'/');
$dtpl->parse_if_block('forbidden',is_forbidden_file($config->{'forbidden'},$virt_path->{'normal'}));
$dtpl->parse_if_block('readable',-r $phys_path && -x $phys_path);
$dtpl->parse_if_block('users',$users && -o $phys_path);
$dtpl->parse_if_block('forbidden',is_forbidden_file($config->{'forbidden'},$virt_path->{'normal'}));
$dtpl->parse_if_block('readable',-r $phys_path && -x $phys_path);
$dtpl->parse_if_block('users',$users && -o $phys_path);
+ $dtpl->parse_if_block('even',($count % 2) == 0);
$dirlist .= $dtpl->get_template;
}
$dirlist .= $dtpl->get_template;
}
next if($config->{'hide_dot_files'} && substr($file,0,1) eq '.');
next unless(dos_wildcard_match($filter1,$file));
next if($config->{'hide_dot_files'} && substr($file,0,1) eq '.');
next unless(dos_wildcard_match($filter1,$file));
my $phys_path = $physical.'/'.$file;
my $virt_path = multi_string($virtual.$file);
my $phys_path = $physical.'/'.$file;
my $virt_path = multi_string($virtual.$file);
$ftpl->parse_if_block('users',$users && -o $phys_path);
$ftpl->parse_if_block('users',$users && -o $phys_path);
+ $ftpl->parse_if_block('even',($count % 2) == 0);
+
$dirlist .= $ftpl->get_template;
}
$dirlist .= $ftpl->get_template;
}
+<tr{IF even} style="background-color:#EEEEEE"{ENDIF}>
<td align="right" style="white-space:nowrap">[SUBDIR]</td>
<td style="padding-left:15pt;white-space:nowrap;">{DATE}{IF gmt} (GMT){ENDIF}</td>
<td style="padding-left:15pt;white-space:nowrap;">{IF !forbidden}{IF readable}<a href="{SCRIPT}?command=show&file={DIR_URL}{IF filter}&filter={FILTER_URL}{ENDIF}">{DIR_NAME}/</a>{ELSE}<span style="color:#C0C0C0" title="Not accessible">{DIR_NAME}/</span>{ENDIF}{ELSE}<span style="color:#C0C0C0" title="File access forbidden by Dev-Editor's configuration">{DIR_NAME}/</span>{ENDIF}</td>
<td align="right" style="white-space:nowrap">[SUBDIR]</td>
<td style="padding-left:15pt;white-space:nowrap;">{DATE}{IF gmt} (GMT){ENDIF}</td>
<td style="padding-left:15pt;white-space:nowrap;">{IF !forbidden}{IF readable}<a href="{SCRIPT}?command=show&file={DIR_URL}{IF filter}&filter={FILTER_URL}{ENDIF}">{DIR_NAME}/</a>{ELSE}<span style="color:#C0C0C0" title="Not accessible">{DIR_NAME}/</span>{ENDIF}{ELSE}<span style="color:#C0C0C0" title="File access forbidden by Dev-Editor's configuration">{DIR_NAME}/</span>{ENDIF}</td>
+<tr{IF even} style="background-color:#EEEEEE"{ENDIF}>
<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;">{IF forbidden}<span style="color:#C0C0C0" title="File access forbidden by Dev-Editor's configuration">{FILE_NAME}</span>{ELSE}{FILE_NAME}{ENDIF}</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;">{IF forbidden}<span style="color:#C0C0C0" title="File access forbidden by Dev-Editor's configuration">{FILE_NAME}</span>{ELSE}{FILE_NAME}{ENDIF}</td>