From: Rob H. <for...@us...> - 2001-11-27 00:47:20
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv27885/lib/SandWeb Modified Files: UI.pm Log Message: gave the file action's info command it's own template. This will be neccessary for CVSWeb-like output. We are really close on this - we just need to parse the "cvs log" output ( this is definitely going to be VCS-dependant :/ ) and implement colorized diff. Then we've reached parity with CVSWeb/ViewCVS. Index: UI.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/UI.pm,v retrieving revision 1.21 retrieving revision 1.22 diff -U2 -r1.21 -r1.22 --- UI.pm 2001/11/22 09:35:38 1.21 +++ UI.pm 2001/11/27 00:47:17 1.22 @@ -251,4 +251,27 @@ } +sub file_info { + my $self = shift; + my %args = @_; + + my $template_dir = $self->_get_template_dir(); + my $filename = $args{'filename'}; + my $location = $args{'location'}; + my $log = $self->_logobj(); + + # this will eventually be $conf->defaults() + my %defaults = ( + # CGI_PATH => $self->_get_cgi_path(), + # CGI_EXEC => $self->_get_cgi_exec(), + LOCATION => $location, + ); + + # generate content data + my $tmp = HTML::Template->new(filename => "$template_dir/file_info.html"); + $tmp->param( %defaults, %args ); + my @contents = $tmp->output; + return join('', @contents); +} + sub create_file { my $self = shift; |