Update of /cvsroot/sandweb/sandweb/lib/SandWeb
In directory usw-pr-cvs1:/tmp/cvs-serv19797/lib/SandWeb
Modified Files:
Browse.pm
Log Message:
tool_bar no longer uses HTML::Template
Index: Browse.pm
===================================================================
RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v
retrieving revision 1.64
retrieving revision 1.65
diff -U2 -r1.64 -r1.65
--- Browse.pm 25 Feb 2002 21:49:15 -0000 1.64
+++ Browse.pm 25 Feb 2002 22:02:00 -0000 1.65
@@ -57,6 +57,4 @@
}
- my @content;
-
my @return = ();
my @loop_data = ();
@@ -78,28 +76,28 @@
my $counter=0;
unless ($#return< 0) {
- while (@return) {
- my %row_data;
- $row_data{ENTRY} = shift @return;
- my $entryname = $row_data{ENTRY};
-
- my $file = SandWeb::File->new(
- location => "$sandbox/$location",
- filename => "$entryname",
- );
- my $filename = $file->get_filename();
- $row_data{FILESIZE} = $file->get_size();
- $row_data{FILEAGE} = $file->get_age();
- if ( $file->get_file_type() eq "Directory" ) {
- if ($repo_type eq "CVS") {
- next if ($filename =~ /^CVS$/);
- }
- $row_data{FILETYPE} = "dir";
- $row_data{LINK} = "action=browse_module&location=$location/$filename";
- if ($counter eq "0") {
- $row_data{COLOR} = 0;
- } else {
- $row_data{COLOR} = 1;
+ while (@return) {
+ my %row_data;
+ $row_data{ENTRY} = shift @return;
+ my $entryname = $row_data{ENTRY};
+
+ my $file = SandWeb::File->new(
+ location => "$sandbox/$location",
+ filename => "$entryname",
+ );
+ my $filename = $file->get_filename();
+ $row_data{FILESIZE} = $file->get_size();
+ $row_data{FILEAGE} = $file->get_age();
+ if ( $file->get_file_type() eq "Directory" ) {
+ if ($repo_type eq "CVS") {
+ next if ($filename =~ /^CVS$/);
+ }
+ $row_data{FILETYPE} = "dir";
+ $row_data{LINK} = "action=browse_module&location=$location/$filename";
+ if ($counter eq "0") {
+ $row_data{COLOR} = 0;
+ } else {
+ $row_data{COLOR} = 1;
+ }
}
- }
elsif ( $file->get_file_type() eq "Text" ) {
$row_data{FILETYPE} = "text";
@@ -119,6 +117,5 @@
$row_data{COLOR} = 1;
}
- }
- else {
+ } else {
$row_data{FILETYPE} = "unknown";
$row_data{LINK} = "action=view_file&filename=$filename";
@@ -140,10 +137,8 @@
$counter = 1;
}
- }
- } else {
- @content = ('STATUS','No files.');
- }
+ }
+ }
- @content = ('ENTRY_LOOP', \@loop_data);
+ my @content = ('ENTRY_LOOP', \@loop_data);
return @content;
}
@@ -164,6 +159,4 @@
my $repo_name = $self->_get_repo_name();
- my $content = HTML::Template->new( filename => "$template_dir/tool_bar.html" );
-
my $count = 0;
while ( $vcs_commands->[$count] ) {
@@ -178,12 +171,6 @@
}
- $content->param(
- VCS_CMD_LOOP => \@loop_data,
- LOCATION => $location,
- MODULE_NAME => $module_name,
- REPO_NAME => $repo_name,
- );
-
- return $content->output();
+ my @content = ( 'VCS_CMD_LOOP', \@loop_data );
+ return @content;
}
|