You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(28) |
Nov
(58) |
Dec
(85) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(125) |
Feb
(222) |
Mar
(274) |
Apr
(51) |
May
(22) |
Jun
(50) |
Jul
(15) |
Aug
(33) |
Sep
(11) |
Oct
(29) |
Nov
(17) |
Dec
(1) |
2003 |
Jan
(100) |
Feb
(21) |
Mar
(7) |
Apr
(45) |
May
|
Jun
(43) |
Jul
(27) |
Aug
(24) |
Sep
|
Oct
|
Nov
|
Dec
|
2004 |
Jan
(1) |
Feb
|
Mar
(13) |
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(7) |
Sep
|
Oct
|
Nov
|
Dec
(4) |
2005 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
From: Rob H. <for...@us...> - 2001-12-17 19:27:23
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv10212/lib/SandWeb/Repository Modified Files: CVS.pm Log Message: fixed stupid typos that broke VCS diff. the more i think about it now, the code duplication makes sense in Repository and CVS so we can do more intelligent parsing and more features later on. Index: CVS.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/CVS.pm,v retrieving revision 1.16 retrieving revision 1.17 diff -U2 -r1.16 -r1.17 --- CVS.pm 2001/12/16 09:12:49 1.16 +++ CVS.pm 2001/12/17 19:27:19 1.17 @@ -225,5 +225,5 @@ my @files = split(' ', $file); my @filenames = (); - + foreach my $filename (@files) { if (! $filename) { |
From: Rob H. <for...@us...> - 2001-12-16 09:12:52
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv5684/lib/SandWeb/Repository Modified Files: CVS.pm Log Message: fixed some typos in Repository.pm/CVS.pm that prevented simple diff ( current sandbox version versus repo version ) from working. also did some formatting while i was there. There's alot of code duplication in CVS.pm and Repository.pm, I think they could get cut down to almost nothing, just as UI was. Ah, well, it's annoying, because it's not really high priority, but it makes stupid little bugs like this more frequent. I can see value in sitting down and cleaning these modules up before we go further, since they're just going to keep causing little bugs due to human error. Index: CVS.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/CVS.pm,v retrieving revision 1.15 retrieving revision 1.16 diff -U2 -r1.15 -r1.16 --- CVS.pm 2001/12/10 18:34:00 1.15 +++ CVS.pm 2001/12/16 09:12:49 1.16 @@ -210,5 +210,5 @@ my %args = @_; - my $date = $args{'type'}; + my $date = $args{'date'}; my $rev = $args{'rev'}; my $recurse = $args{'recurse'}; @@ -217,5 +217,5 @@ my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); - my @param = 'annotate'; + my @param = 'diff'; if ($date) { push @param, " $date" }; @@ -234,10 +234,14 @@ } } - + + print "cd $sandbox && cvs -d $root @param \"$file\" 2>&1"; + my $output = `cd $sandbox && cvs -d $root @param \"$file\" 2>&1`; my $errorlevel = $?; - my %return = ( output => $output, - errorlevel => $errorlevel ); + my %return = ( + output => $output, + errorlevel => $errorlevel, + ); return %return; @@ -572,6 +576,8 @@ my $errorlevel = $?; - my %return = ( output => $output, - errorlevel => $errorlevel ); + my %return = ( + output => $output, + errorlevel => $errorlevel, + ); return %return; |
From: Rob H. <for...@us...> - 2001-12-16 09:12:52
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv5684/lib/SandWeb Modified Files: Repository.pm Log Message: fixed some typos in Repository.pm/CVS.pm that prevented simple diff ( current sandbox version versus repo version ) from working. also did some formatting while i was there. There's alot of code duplication in CVS.pm and Repository.pm, I think they could get cut down to almost nothing, just as UI was. Ah, well, it's annoying, because it's not really high priority, but it makes stupid little bugs like this more frequent. I can see value in sitting down and cleaning these modules up before we go further, since they're just going to keep causing little bugs due to human error. Index: Repository.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository.pm,v retrieving revision 1.13 retrieving revision 1.14 diff -U2 -r1.13 -r1.14 --- Repository.pm 2001/12/10 18:33:33 1.13 +++ Repository.pm 2001/12/16 09:12:49 1.14 @@ -89,6 +89,8 @@ if ($repo_type eq 'CVS') { - %return = $vcs->admin(type => $type, - file => $file ); + %return = $vcs->admin( + type => $type, + file => $file, + ); } @@ -163,12 +165,16 @@ my $sandbox = $self->get_sandbox(); my %return = {}; - my $vcs = SandWeb::Repository::CVS->new(root => $root, - sandbox => $sandbox); + my $vcs = SandWeb::Repository::CVS->new( + root => $root, + sandbox => $sandbox, + ); if ($repo_type eq 'CVS') { - %return = $vcs->commit(message => $message, - rev => $rev, - recurse => $recurse, - file => $file ); + %return = $vcs->commit( + message => $message, + rev => $rev, + recurse => $recurse, + file => $file, + ); } @@ -181,38 +187,27 @@ my %args = @_; - my $rev => $args{'rev'}; - my $recurse => $args{'recurse'}; - my $file => $args{'file'}; + my $file = $args{'file'}; + my $rev = $args{'rev'}; + my $recurse = $args{'recurse'}; my $repo_type = $self->get_repo_type(); my $root = $self->get_root(); my $sandbox = $self->get_sandbox(); my %return = {}; - my $vcs = SandWeb::Repository::CVS->new(root => $root, - sandbox => $sandbox); + my $vcs = SandWeb::Repository::CVS->new( + root => $root, + sandbox => $sandbox, + ); if ($repo_type eq 'CVS') { - %return = $vcs->diff( - type => $type, - date => $date, - rev => $rev, - recurse => $recurse, - file => $file, - ); + %return = $vcs->diff( + type => $type, + date => $date, + rev => $rev, + recurse => $recurse, + file => $file, + ); } return %return; - -# -D d1 Diff revision or date against working file. -# -# -D d2 Diff rev1/date1 against date2. -# -# -N include diffs for added and removed files. -# -# -r rev1 Diff revision for rev1 against working file. -# -# -r rev2 Diff rev1/date1 against rev2. -# -# --ifdef=arg Output diffs in ifdef format. - } @@ -232,7 +227,9 @@ if ($repo_type eq 'CVS') { - %return = $vcs->edit(action => $action, - recurse => $recurse, - file => $file ); + %return = $vcs->edit( + action => $action, + recurse => $recurse, + file => $file, + ); } |
From: Rob H. <for...@us...> - 2001-12-16 09:12:52
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv5684/bin Modified Files: sandweb.cgi Log Message: fixed some typos in Repository.pm/CVS.pm that prevented simple diff ( current sandbox version versus repo version ) from working. also did some formatting while i was there. There's alot of code duplication in CVS.pm and Repository.pm, I think they could get cut down to almost nothing, just as UI was. Ah, well, it's annoying, because it's not really high priority, but it makes stupid little bugs like this more frequent. I can see value in sitting down and cleaning these modules up before we go further, since they're just going to keep causing little bugs due to human error. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.92 retrieving revision 1.93 diff -U2 -r1.92 -r1.93 --- sandweb.cgi 2001/12/16 08:30:47 1.92 +++ sandweb.cgi 2001/12/16 09:12:49 1.93 @@ -278,6 +278,10 @@ my $vcsroot; - if ( $repo_type = 'CVS' ) { - $vcsroot = ":$connection:$vcs_username\@$server:$root"; + if ( $repo_type eq 'CVS' ) { + if ( $connection eq 'local' ) { + $vcsroot = "$root"; + } else { + $vcsroot = ":$connection:$vcs_username\@$server:$root"; + } } @@ -348,7 +352,11 @@ my $vcsroot; - if ( $repo_type = 'CVS' ) { - $vcsroot = ":$connection:$vcs_username\@$server:$root"; - } + if ( $repo_type eq 'CVS' ) { + if ( $connection eq 'local' ) { + $vcsroot = "$root"; + } else { + $vcsroot = ":$connection:$vcs_username\@$server:$root"; + } + } my $repository = SandWeb::Repository->new( @@ -603,7 +611,11 @@ my $vcsroot; - if ( $repo_type = 'CVS' ) { - $vcsroot = ":$connection:$vcs_username\@$server:$root"; - } + if ( $repo_type eq 'CVS' ) { + if ( $connection eq 'local' ) { + $vcsroot = "$root"; + } else { + $vcsroot = ":$connection:$vcs_username\@$server:$root"; + } + } my $repository = SandWeb::Repository->new( |
From: Rob H. <for...@us...> - 2001-12-16 08:30:50
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv383 Modified Files: sandweb.cgi Log Message: bugfix - $location was not being passed when the file was opened, and there was no / between $username and $file ( there is not supposed to be a space between $username and $location, this is probably some kind of weird typo situation ). Anyway. fixed, tested. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.91 retrieving revision 1.92 diff -U2 -r1.91 -r1.92 --- sandweb.cgi 2001/12/07 00:18:19 1.91 +++ sandweb.cgi 2001/12/16 08:30:47 1.92 @@ -430,5 +430,5 @@ my $filename = $file->get_filename(); - open ( FILE, "> $users_dir/$username$filename" ); + open ( FILE, "> $users_dir/$username$location/$filename" ); print FILE "$data"; close FILE; |
From: Nick J. <ni...@na...> - 2001-12-10 20:57:17
|
On Wed, Dec 05, 2001 at 11:42:10AM -0800, Rob Helmer wrote: > Update of /cvsroot/sandweb/sandweb/bin > In directory usw-pr-cvs1:/tmp/cvs-serv3566 > > Modified Files: > sandweb.cgi > Log Message: > > it is _really_ annoying when you accidently view/edit a big binary > file. > > For now, viewing or editing non-text files inline is not permitted. > I think the correct way to do this is to ask the user if they are > sure ( maybe even have a checkbox for "Never ask this again"? would be > cool. We need a more generic mechanism, would be a cool pref though ). > > Anyway, I think the user should just see the download button, and > maybe this warning, if the file does not appear to be text. > Yes I don't see any reason why someone would want to view a binary file, however, what If we don't properly identify the file as viewable, but it is? How do we determin that at this point in time? -- Nick Jennings |
From: Rob H. <for...@us...> - 2001-12-10 18:34:05
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb/Repository In directory usw-pr-cvs1:/tmp/cvs-serv23829/lib/SandWeb/Repository Modified Files: CVS.pm Log Message: formatting fixes Index: CVS.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository/CVS.pm,v retrieving revision 1.14 retrieving revision 1.15 diff -U2 -r1.14 -r1.15 --- CVS.pm 2001/12/04 17:57:24 1.14 +++ CVS.pm 2001/12/10 18:34:00 1.15 @@ -148,8 +148,11 @@ my $output = `cd $sandbox && cvs -d $root @param \"$file\" 2>&1`; + my $errorlevel = $?; - my %return = ( output => $output, - errorlevel => $errorlevel ); + my %return = ( + output => $output, + errorlevel => $errorlevel, + ); return %return; |
From: Rob H. <for...@us...> - 2001-12-10 18:33:38
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv23699/lib/SandWeb Modified Files: Repository.pm Log Message: formatting fixes Index: Repository.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Repository.pm,v retrieving revision 1.12 retrieving revision 1.13 diff -U2 -r1.12 -r1.13 --- Repository.pm 2001/12/04 18:58:15 1.12 +++ Repository.pm 2001/12/10 18:33:33 1.13 @@ -134,7 +134,8 @@ my $sandbox = $self->get_sandbox(); my %return = {}; - my $vcs = SandWeb::Repository::CVS->new(root => $root, - sandbox => $sandbox, - file => $file, + my $vcs = SandWeb::Repository::CVS->new( + root => $root, + sandbox => $sandbox, + file => $file, ); |
From: Rob H. <for...@us...> - 2001-12-07 21:47:33
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv10936/templates Modified Files: browse.html Log Message: oops, left border on. reset to 0. Index: browse.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/browse.html,v retrieving revision 1.32 retrieving revision 1.33 diff -U2 -r1.32 -r1.33 --- browse.html 2001/12/07 21:46:55 1.32 +++ browse.html 2001/12/07 21:47:30 1.33 @@ -12,5 +12,5 @@ </script> -<table width="100%" border="1" cellspacing="0" cellpadding="2"> +<table width="100%" border="0" cellspacing="0" cellpadding="2"> <form method="get" submit="<TMPL_VAR NAME=PROGNAME>" name="browse"> <input type="hidden" name="action" value="vcsaction" /> |
From: Rob H. <for...@us...> - 2001-12-07 21:46:59
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv10691/templates Modified Files: browse.html Log Message: typo - 100% written as 100$ that broke layout for IE. fixed. Index: browse.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/browse.html,v retrieving revision 1.31 retrieving revision 1.32 diff -U2 -r1.31 -r1.32 --- browse.html 2001/11/30 20:42:05 1.31 +++ browse.html 2001/12/07 21:46:55 1.32 @@ -12,5 +12,5 @@ </script> -<table width="100%" border="0" cellspacing="0" cellpadding="2"> +<table width="100%" border="1" cellspacing="0" cellpadding="2"> <form method="get" submit="<TMPL_VAR NAME=PROGNAME>" name="browse"> <input type="hidden" name="action" value="vcsaction" /> @@ -66,5 +66,5 @@ </tr> <tr> - <td width="100$"> + <td width="100%"> <table width="100%" border="1"> <tr> |
From: Rob H. <for...@us...> - 2001-12-07 00:18:21
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv16459/bin Modified Files: sandweb.cgi Log Message: fixed a bug I caused by fixing Browse ;) Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.90 retrieving revision 1.91 diff -U2 -r1.90 -r1.91 --- sandweb.cgi 2001/12/06 23:35:51 1.90 +++ sandweb.cgi 2001/12/07 00:18:19 1.91 @@ -355,5 +355,5 @@ root => $vcsroot, repo_type => $repo_type, - sandbox => "$users_dir/$username", + sandbox => "$users_dir/$username/$location", ); |
From: Rob H. <for...@us...> - 2001-12-06 23:35:55
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv6568/lib/SandWeb Modified Files: Browse.pm Log Message: fixed a couple bugs with view/edit file functionality by making it use the File object properly ( finally ;) Index: Browse.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/Browse.pm,v retrieving revision 1.20 retrieving revision 1.21 diff -U2 -r1.20 -r1.21 --- Browse.pm 2001/11/27 00:31:11 1.20 +++ Browse.pm 2001/12/06 23:35:51 1.21 @@ -5,4 +5,5 @@ package SandWeb::Browse; +use strict; use lib '../lib'; use SandWeb::UI; @@ -11,56 +12,57 @@ sub new { - my $class = shift; - my %args = @_; + my $class = shift; + my %args = @_; - my $self = bless { - 'username' => $args{'username'}, - 'template_dir' => $args{'template_dir'}, - 'users_dir' => $args{'users_dir'}, - }, $class; + my $self = bless { + 'username' => $args{'username'}, + 'template_dir' => $args{'template_dir'}, + 'users_dir' => $args{'users_dir'}, + }, $class; - return $self; + return $self; } sub browse { - my $self = shift; - my $path = shift; - my $progname = shift; - my $vcs_commands = shift; - my $repo_type = shift; - - my %args = @_; - - my $username = $self->_get_username(); - my $users_dir = $self->_get_users_dir(); - my $template_dir = $self->_get_template_dir(); - my $sandbox = "$users_dir/$username"; - my @vcs_commands = split (/ /, $vcs_commands ); - - if (! $sandbox) { - return "A sandbox must be defined."; - exit 1; - } - - my $content = HTML::Template->new( filename => "$template_dir/browse.html" ); - my $location; - - if ($path eq '/') { - $path = ''; - } - - if ($path) { - # Security check, no "/.." allowed mister! - $path =~ s:/\.\.::g; - $location = $path; - } else { - $location = '/'; - } - my @location_link; - push (@location_link, split( /\//, $location )); - my @loop_data = (); - my $count = 0; + my $self = shift; + my $path = shift; + my $progname = shift; + my $vcs_commands = shift; + my $repo_type = shift; + + my %args = @_; + + my $username = $self->_get_username(); + my $users_dir = $self->_get_users_dir(); + my $template_dir = $self->_get_template_dir(); + my $sandbox = "$users_dir/$username"; + my @vcs_commands = split (/ /, $vcs_commands ); + + if (! $sandbox) { + return "A sandbox must be defined."; + exit 1; + } + + my $content = HTML::Template->new( filename => "$template_dir/browse.html" ); + my $location; + + if ($path eq '/') { + $path = ''; + } + if ($path) { + # Security check, no "/.." allowed mister! + $path =~ s:/\.\.::g; + $location = $path; + } else { + $location = '/'; + } + my @location_link; + push (@location_link, split( /\//, $location )); + my @loop_data = (); + my $count = 0; + my @location_full = (); + unless ($count) { my %row_data; @@ -80,120 +82,121 @@ push (@loop_data, \%row_data); $count++; - } - $content->param( + } + $content->param( PROGNAME => $progname, - LOCATION => $location, + LOCATION => $location, LOCATION_LOOP => \@loop_data, - ); + ); - my @return = (); - my @loop_data = (); - my $color0 = "#ccccee"; - my $color1 = "#ffffff"; + my @return = (); + my @loop_data = (); + my $color0 = "#ccccee"; + my $color1 = "#ffffff"; - opendir(SANDBOX, "$sandbox/$path") || die "can't opendir $sandbox/$path : $!"; + opendir(SANDBOX, "$sandbox/$path") || die "can't opendir $sandbox/$path : $!"; my @entries = readdir(SANDBOX); chomp @entries; foreach my $entry (@entries) { - next if ($entry =~ /^.$/); - next if ($entry =~ /^.\.$/); - push @return, $entry; + next if ($entry =~ /^.$/); + next if ($entry =~ /^.\.$/); + push @return, $entry; } - closedir SANDBOX; + closedir SANDBOX; - my $counter=0; - unless ($#return< 0) { + my $counter=0; + unless ($#return< 0) { while (@return) { - my %row_data; - $row_data{ENTRY} = shift @return; - $filename = $row_data{ENTRY}; - my $file = SandWeb::File->new( - location => "$sandbox/$path", - filename => "$filename", - ); - $row_data{FILESIZE} = $file->get_size(); - $row_data{FILEAGE} = $file->get_age(); - if (-d "$sandbox/$path/$filename") { - if ($repo_type eq "CVS") { - next if ($filename =~ /^CVS$/); - } - $row_data{FILETYPE} = "dir"; - $row_data{LINK} = "action=browse_menu&path=$path/$filename"; - if ($counter eq "0") { - $row_data{COLOR} = "$color0"; - } else { - $row_data{COLOR} = "$color1"; - } - } - elsif (-T "$sandbox/$path/$filename") { - $row_data{FILETYPE} = "text"; - $row_data{LINK} = "action=file&filename=$path/$filename"; - if ($counter eq "0") { - $row_data{COLOR} = "$color0"; - } else { - $row_data{COLOR} = "$color1"; - } - } - elsif (-B "$sandbox/$path/$filename") { - $row_data{FILETYPE} = "binary"; - $row_data{LINK} = "action=file&filename=$path/$filename"; - if ($counter eq "0") { - $row_data{COLOR} = "$color0"; - } else { - $row_data{COLOR} = "$color1"; - } - } - else { - $row_data{FILETYPE} = "unknown"; - $row_data{LINK} = "action=file&filename=$path/$filename"; - if ($counter eq "0") { - $row_data{COLOR} = "$color0"; - } else { - $row_data{COLOR} = "$color1"; - } - } - $row_data{LOCATION} = $location; - $row_data{PROGNAME} = $progname; - push(@loop_data, \%row_data); - $content->param(ENTRY_LOOP => \@loop_data); - - if ($counter eq "1") { - $counter = 0; - } else { - $counter = 1; - } + my %row_data; + $row_data{ENTRY} = shift @return; + my $entryname = $row_data{ENTRY}; + my $file = SandWeb::File->new( + location => "$sandbox/$path", + filename => "$entryname", + ); + my $filename = $file->get_filename(); + $row_data{FILESIZE} = $file->get_size(); + $row_data{FILEAGE} = $file->get_age(); + if (-d "$sandbox/$path/$filename") { + if ($repo_type eq "CVS") { + next if ($filename =~ /^CVS$/); + } + $row_data{FILETYPE} = "dir"; + $row_data{LINK} = "action=browse_menu&path=$path/$filename"; + if ($counter eq "0") { + $row_data{COLOR} = "$color0"; + } else { + $row_data{COLOR} = "$color1"; + } + } + elsif (-T "$sandbox/$path/$filename") { + $row_data{FILETYPE} = "text"; + $row_data{LINK} = "action=file&filename=$filename"; + if ($counter eq "0") { + $row_data{COLOR} = "$color0"; + } else { + $row_data{COLOR} = "$color1"; + } + } + elsif (-B "$sandbox/$path/$filename") { + $row_data{FILETYPE} = "binary"; + $row_data{LINK} = "action=file&filename=$filename"; + if ($counter eq "0") { + $row_data{COLOR} = "$color0"; + } else { + $row_data{COLOR} = "$color1"; + } + } + else { + $row_data{FILETYPE} = "unknown"; + $row_data{LINK} = "action=file&filename=$filename"; + if ($counter eq "0") { + $row_data{COLOR} = "$color0"; + } else { + $row_data{COLOR} = "$color1"; + } + } + $row_data{LOCATION} = $location; + $row_data{PROGNAME} = $progname; + push(@loop_data, \%row_data); + $content->param(ENTRY_LOOP => \@loop_data); + + if ($counter eq "1") { + $counter = 0; + } else { + $counter = 1; + } } - } else { + } else { $content->param(STATUS => 'No files.'); - } + } - my @loop_data = (); + my @loop_data = (); - if ($repo_type eq "CVS") { - foreach my $vcs_command (@vcs_commands) { - my %row_data; - $row_data{VCS_CMD} = "$vcs_command"; - push (@loop_data, \%row_data); - } - $content->param( VCS_CMD_LOOP => \@loop_data ); - } + if ($repo_type eq "CVS") { + foreach my $vcs_command (@vcs_commands) { + my %row_data; + $row_data{VCS_CMD} = "$vcs_command"; + push (@loop_data, \%row_data); + } + $content->param( VCS_CMD_LOOP => \@loop_data ); + } - return $content->output; + return $content->output; } sub _get_username { - my $self = shift; - return $self->{'username'}; + my $self = shift; + return $self->{'username'}; } sub _get_users_dir { - my $self = shift; - return $self->{'users_dir'}; + my $self = shift; + return $self->{'users_dir'}; } sub _get_template_dir { - my $self = shift; - return $self->{'template_dir'}; + my $self = shift; + return $self->{'template_dir'}; } |
From: Rob H. <for...@us...> - 2001-12-06 23:35:55
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv6568/bin Modified Files: sandweb.cgi Log Message: fixed a couple bugs with view/edit file functionality by making it use the File object properly ( finally ;) Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.89 retrieving revision 1.90 diff -U2 -r1.89 -r1.90 --- sandweb.cgi 2001/12/05 19:42:08 1.89 +++ sandweb.cgi 2001/12/06 23:35:51 1.90 @@ -396,5 +396,5 @@ } elsif ( $command eq 'view' ) { - if ( "$file->get_file_type()" ne "Text" ) { + if ( $file->get_file_type() ne "Text" ) { set_error("This does not appear to be a text file."); browse_menu( @@ -404,5 +404,5 @@ } my @tmp; - open (FILE, "$users_dir/$username/$filename"); + open (FILE, "$users_dir/$username/$location/$filename"); foreach my $line (<FILE>) { push @tmp, $line; @@ -447,5 +447,5 @@ } my @tmp; - open (FILE, "$users_dir/$username/$filename"); + open (FILE, "$users_dir/$username/$location/$filename"); foreach my $line (<FILE>) { push @tmp, $line; |
From: Rob H. <for...@us...> - 2001-12-05 19:42:12
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv3566 Modified Files: sandweb.cgi Log Message: it is _really_ annoying when you accidently view/edit a big binary file. For now, viewing or editing non-text files inline is not permitted. I think the correct way to do this is to ask the user if they are sure ( maybe even have a checkbox for "Never ask this again"? would be cool. We need a more generic mechanism, would be a cool pref though ). Anyway, I think the user should just see the download button, and maybe this warning, if the file does not appear to be text. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.88 retrieving revision 1.89 diff -U2 -r1.88 -r1.89 --- sandweb.cgi 2001/12/04 19:35:24 1.88 +++ sandweb.cgi 2001/12/05 19:42:08 1.89 @@ -396,6 +396,10 @@ } elsif ( $command eq 'view' ) { - if ( "$file->get_file_type()" eq "Binary" ) { + if ( "$file->get_file_type()" ne "Text" ) { set_error("This does not appear to be a text file."); + browse_menu( + cookie => $cookie, + path => $location, + ); } my @tmp; @@ -435,6 +439,10 @@ ); } - if ( $file->get_file_type() eq "Binary" ) { + if ( $file->get_file_type() ne "Text" ) { set_error("This does not appear to be a text file."); + browse_menu( + cookie => $cookie, + path => $location, + ); } my @tmp; |
From: Rob H. <for...@us...> - 2001-12-05 05:28:26
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv15827 Modified Files: vcs_prefs.html Log Message: moved template loop to the right place Index: vcs_prefs.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/vcs_prefs.html,v retrieving revision 1.6 retrieving revision 1.7 diff -U2 -r1.6 -r1.7 --- vcs_prefs.html 2001/12/04 18:58:15 1.6 +++ vcs_prefs.html 2001/12/05 05:28:22 1.7 @@ -31,6 +31,6 @@ </td> <td width="90%" align="left"> - <TMPL_LOOP NAME=LOOP_REPO_TYPE> <select name="repo_type"> + <TMPL_LOOP NAME=LOOP_REPO_TYPE> <TMPL_VAR NAME=REPO_TYPE> </TMPL_LOOP> @@ -42,6 +42,6 @@ </td> <td width="90%" align="left"> - <TMPL_LOOP NAME=LOOP_CONNECTION> <select name="connection"> + <TMPL_LOOP NAME=LOOP_CONNECTION> <TMPL_VAR NAME=CONNECTION> </TMPL_LOOP> |
From: Rob H. <for...@us...> - 2001-12-04 01:31:18
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv9821/bin Modified Files: sandweb.cgi Log Message: typo Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.84 retrieving revision 1.85 diff -U2 -r1.84 -r1.85 --- sandweb.cgi 2001/12/04 01:15:35 1.84 +++ sandweb.cgi 2001/12/04 01:31:16 1.85 @@ -350,5 +350,5 @@ my $repository = SandWeb::Repository->new( - root => $root, + root => $vcsroot, repo_type => $repo_type, sandbox => "$users_dir/$username", @@ -767,5 +767,5 @@ 'server', 'username', - 'vcs_type', + 'repo_type', 'connection', 'root', |
From: Rob H. <for...@us...> - 2001-12-04 01:15:40
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv5727/templates Modified Files: preferences.html vcs_prefs.html Log Message: ok, now it's possible to edit your repository preferences, although you can only have one, it's still a step forward. Index: preferences.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/preferences.html,v retrieving revision 1.10 retrieving revision 1.11 diff -U2 -r1.10 -r1.11 --- preferences.html 2001/12/04 00:49:21 1.10 +++ preferences.html 2001/12/04 01:15:35 1.11 @@ -1,4 +1,4 @@ <form submit="<TMPL_VAR NAME=PROGNAME>"> -<input type="hidden" name="action" value="preferences_menu"> +<input type="hidden" name="action" value="preferences_menu" /> <table width="100%" align="center" border="0"> <tr> Index: vcs_prefs.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/vcs_prefs.html,v retrieving revision 1.4 retrieving revision 1.5 diff -U2 -r1.4 -r1.5 --- vcs_prefs.html 2001/12/03 23:09:40 1.4 +++ vcs_prefs.html 2001/12/04 01:15:35 1.5 @@ -1,11 +1,27 @@ <form submit="<TMPL_VAR NAME=PROGNAME>"> -<input type="hidden" name="action" value="preferences_menu"> +<input type="hidden" name="action" value="preferences_menu" /> <table width="100%" align="center" border="0"> <tr> <td width="20%" align="right"> + Name : + </td> + <td width="90%" align="left"> + <input type="text" name="name" value="<TMPL_VAR NAME=NAME>" /> + </td> + </tr> + <tr> + <td width="20%" align="right"> Server Hostname : </td> <td width="90%" align="left"> <input type="text" name="server" value="<TMPL_VAR NAME=SERVER>" /> + </td> + </tr> + <tr> + <td width="20%" align="right"> + Username : + </td> + <td width="90%" align="left"> + <input type="text" name="name" value="<TMPL_VAR NAME=USERNAME>" /> </td> </tr> |
From: Rob H. <for...@us...> - 2001-12-04 01:15:39
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv5727/bin Modified Files: sandweb.cgi Log Message: ok, now it's possible to edit your repository preferences, although you can only have one, it's still a step forward. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.83 retrieving revision 1.84 diff -U2 -r1.83 -r1.84 --- sandweb.cgi 2001/12/04 00:46:32 1.83 +++ sandweb.cgi 2001/12/04 01:15:35 1.84 @@ -716,5 +716,7 @@ load_prefs(1); # load prefs and do not log error msg my $username = $auth->get_userinfo('username'); + my $name = $userprefs->{'repository'}->{'name'}; my $server = $userprefs->{'repository'}->{'server'}; + my $vcs_username = $userprefs->{'repository'}->{'username'}; my $root = $userprefs->{'repository'}->{'root'}; my $repo_type = $userprefs->{'repository'}->{'repo_type'}; @@ -724,5 +726,7 @@ MENU => 'vcs_prefs', PROGNAME => $progname, + NAME => $name, SERVER => $server, + USERNAME => $vcs_username, ROOT => $root, ); @@ -754,5 +758,30 @@ load_prefs(1); # load prefs and do not log error msg - $userprefs->{'personal'}->{'full_name'} = param('full_name'); + my @personal_params = ( + 'full_name', + 'work_dir', + ); + + my @repository_params = ( + 'name', + 'server', + 'username', + 'vcs_type', + 'connection', + 'root', + ); + + foreach my $param (@personal_params) { + if ( param("$param") ) { + $userprefs->{'personal'}->{"$param"} = param("$param"); + } + } + + foreach my $param (@repository_params) { + if ( param("$param") ) { + $userprefs->{'repository'}->{"$param"} = param("$param"); + } + } + my $username = $auth->get_userinfo('username'); # write config data into the .$prefs_config file in the users directory @@ -771,5 +800,5 @@ # when finished go to main menu. (this should be dynamic probably, so it # returns to whichever menu they wanted to go to in the first place). - main_menu( cookie => $cookie, ); + main_menu( cookie => $cookie ); } |
From: Rob H. <for...@us...> - 2001-12-04 00:49:24
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv31019/templates Modified Files: preferences.html Log Message: read-only repository settings done. Index: preferences.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/preferences.html,v retrieving revision 1.9 retrieving revision 1.10 diff -U2 -r1.9 -r1.10 --- preferences.html 2001/12/03 23:09:40 1.9 +++ preferences.html 2001/12/04 00:49:21 1.10 @@ -20,4 +20,17 @@ <table width="100%" align="center" border="0"> <tr> + <td width="5%" align="center"> + <br />  <br /> + </td> + <td width="30%" align="center"> + <a href="<TMPL_VAR NAME=PROGNAME>?action=vcs_prefs_menu">Set Up Repository</a> + </td> + <td width="65%" align="center"> +   <br /> + </td> + </tr> +</table> +<table width="100%" align="center" border="0"> + <tr> <td width="15%" align="center"> <br />  <br /> |
From: Rob H. <for...@us...> - 2001-12-04 00:46:35
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv30348/lib/SandWeb Modified Files: UI.pm Log Message: made the menu key uppercase, so it matches the other params Index: UI.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/UI.pm,v retrieving revision 1.23 retrieving revision 1.24 diff -U2 -r1.23 -r1.24 --- UI.pm 2001/12/04 00:43:56 1.23 +++ UI.pm 2001/12/04 00:46:32 1.24 @@ -86,6 +86,6 @@ my $log = $self->_logobj(); - my $menu = $args{'menu'}; - delete $args{menu}; + my $menu = $args{'MENU'}; + delete $args{'MENU'}; # generate content data |
From: Rob H. <for...@us...> - 2001-12-04 00:46:35
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv30348/bin Modified Files: sandweb.cgi Log Message: made the menu key uppercase, so it matches the other params Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.82 retrieving revision 1.83 diff -U2 -r1.82 -r1.83 --- sandweb.cgi 2001/12/04 00:43:51 1.82 +++ sandweb.cgi 2001/12/04 00:46:32 1.83 @@ -186,5 +186,5 @@ my %args = @_; - my $content = $ui->get_menu( menu => 'login' ); + my $content = $ui->get_menu( MENU => 'login' ); print header; @@ -373,5 +373,5 @@ my %return = $repository->log( file => "$filename" ); my $content = $ui->get_menu( - menu => "file_info", + MENU => 'file_info', PROGNAME => $progname, LOCATION => $location, @@ -402,5 +402,5 @@ } my $content = $ui->get_menu( - menu => "view_file", + MENU => 'view_file', PROGNAME => $progname, CONTENT => "@tmp", @@ -441,5 +441,5 @@ } my $content = $ui->get_menu( - menu => "edit_file", + MENU => 'edit_file', PROGNAME => $progname, CONTENT => "@tmp", @@ -470,5 +470,5 @@ } my $content = $ui->get_menu( - menu => "create_file", + MENU => 'create_file', PROGNAME => $progname, LOCATION => $location, @@ -498,5 +498,5 @@ my $content = $ui->get_menu( - menu => "create_folder", + MENU => 'create_folder', PROGNAME => $progname, LOCATION => $location, @@ -516,5 +516,5 @@ elsif ( $command eq 'upload' ) { my $content = $ui->get_menu( - menu => "upload_file", + MENU => 'upload_file', LOCATION => $location, PROGNAME => $progname, @@ -534,5 +534,5 @@ elsif ( $command eq 'checkout' ) { my $content = $ui->get_menu( - menu => "checkout", + MENU => 'checkout', LOCATION => $location, PROGNAME => $progname, @@ -610,5 +610,5 @@ ); my $content = $ui->get_menu( - menu => "vcs_output", + MENU => 'vcs_output', LOCATION => $location, PROGNAME => $progname, @@ -629,5 +629,5 @@ } my $content = $ui->get_menu( - menu => "commit", + MENU => 'commit', LOCATION => $location, PROGNAME => $progname, @@ -653,5 +653,5 @@ } my $content = $ui->get_menu( - menu => "vcs_output", + MENU => 'vcs_output', LOCATION => $location, PROGNAME => $progname, @@ -688,5 +688,5 @@ my $content = $ui->get_menu( - menu => 'preferences', + MENU => 'preferences', PROGNAME => $progname, FULL_NAME => $full_name, @@ -722,5 +722,5 @@ my $content = $ui->get_menu( - menu => "vcs_prefs", + MENU => 'vcs_prefs', PROGNAME => $progname, SERVER => $server, |
From: Rob H. <for...@us...> - 2001-12-04 00:44:06
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv29326/templates Modified Files: template.html Log Message: UI.pm was getting to be a pain in the ass, so I fixed it. now there are ( only only ever should be, with the way we currently use UI.pm ) only 3 subroutines - print_screen, menu_bar and get_menu. Index: template.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/template.html,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -U2 -r1.1.1.1 -r1.2 --- template.html 2001/05/02 22:05:04 1.1.1.1 +++ template.html 2001/12/04 00:43:57 1.2 @@ -11,3 +11,2 @@ </body> </html> - |
From: Rob H. <for...@us...> - 2001-12-04 00:44:06
|
Update of /cvsroot/sandweb/sandweb/bin In directory usw-pr-cvs1:/tmp/cvs-serv29326/bin Modified Files: sandweb.cgi Log Message: UI.pm was getting to be a pain in the ass, so I fixed it. now there are ( only only ever should be, with the way we currently use UI.pm ) only 3 subroutines - print_screen, menu_bar and get_menu. Index: sandweb.cgi =================================================================== RCS file: /cvsroot/sandweb/sandweb/bin/sandweb.cgi,v retrieving revision 1.81 retrieving revision 1.82 diff -U2 -r1.81 -r1.82 --- sandweb.cgi 2001/12/03 23:09:40 1.81 +++ sandweb.cgi 2001/12/04 00:43:51 1.82 @@ -186,5 +186,5 @@ my %args = @_; - my $content = $ui->get_login(); + my $content = $ui->get_menu( menu => 'login' ); print header; @@ -372,5 +372,6 @@ my %return = $repository->log( file => "$filename" ); - my $content = $ui->file_info( + my $content = $ui->get_menu( + menu => "file_info", PROGNAME => $progname, LOCATION => $location, @@ -400,5 +401,6 @@ push @tmp, $line; } - my $content = $ui->view_file( + my $content = $ui->get_menu( + menu => "view_file", PROGNAME => $progname, CONTENT => "@tmp", @@ -438,5 +440,6 @@ push @tmp, $line; } - my $content = $ui->edit_file( + my $content = $ui->get_menu( + menu => "edit_file", PROGNAME => $progname, CONTENT => "@tmp", @@ -466,5 +469,6 @@ exit 0; } - my $content = $ui->create_file( + my $content = $ui->get_menu( + menu => "create_file", PROGNAME => $progname, LOCATION => $location, @@ -493,5 +497,6 @@ } - my $content = $ui->create_folder( + my $content = $ui->get_menu( + menu => "create_folder", PROGNAME => $progname, LOCATION => $location, @@ -510,5 +515,6 @@ } elsif ( $command eq 'upload' ) { - my $content = $ui->upload_file( + my $content = $ui->get_menu( + menu => "upload_file", LOCATION => $location, PROGNAME => $progname, @@ -527,5 +533,6 @@ } elsif ( $command eq 'checkout' ) { - my $content = $ui->get_checkout( + my $content = $ui->get_menu( + menu => "checkout", LOCATION => $location, PROGNAME => $progname, @@ -602,5 +609,6 @@ message => "$message", ); - my $content = $ui->get_vcs_output( + my $content = $ui->get_menu( + menu => "vcs_output", LOCATION => $location, PROGNAME => $progname, @@ -620,5 +628,6 @@ exit 0; } - my $content = $ui->get_commit( + my $content = $ui->get_menu( + menu => "commit", LOCATION => $location, PROGNAME => $progname, @@ -643,5 +652,6 @@ %return = $repository->$command( file => "$location/$filename" ); } - my $content = $ui->get_vcs_output( + my $content = $ui->get_menu( + menu => "vcs_output", LOCATION => $location, PROGNAME => $progname, @@ -677,5 +687,6 @@ my $work_dir = $userprefs->{'personal'}->{'work_dir'}; - my $content = $ui->get_preferences( + my $content = $ui->get_menu( + menu => 'preferences', PROGNAME => $progname, FULL_NAME => $full_name, @@ -709,5 +720,7 @@ my $repo_type = $userprefs->{'repository'}->{'repo_type'}; my $connection = $userprefs->{'repository'}->{'connection'}; - my $content = $ui->get_vcs_prefs( + + my $content = $ui->get_menu( + menu => "vcs_prefs", PROGNAME => $progname, SERVER => $server, @@ -848,20 +861,3 @@ } -# assign debug message to global @debug IF it's not yet set. -#sub set_debug { -# my $msg; -# return if ($msg = 0); -# if ($_[0] eq 'dump') { -# use Data::Dumper; -# $msg = Dumper($_[1]); -# } -# else { -# $msg = $_[0]; -# } -# -# push @debug, $msg; -# return 1; -#} - &main(); - |
From: Rob H. <for...@us...> - 2001-12-04 00:44:05
|
Update of /cvsroot/sandweb/sandweb/lib/SandWeb In directory usw-pr-cvs1:/tmp/cvs-serv29326/lib/SandWeb Modified Files: UI.pm Log Message: UI.pm was getting to be a pain in the ass, so I fixed it. now there are ( only only ever should be, with the way we currently use UI.pm ) only 3 subroutines - print_screen, menu_bar and get_menu. Index: UI.pm =================================================================== RCS file: /cvsroot/sandweb/sandweb/lib/SandWeb/UI.pm,v retrieving revision 1.22 retrieving revision 1.23 diff -U2 -r1.22 -r1.23 --- UI.pm 2001/11/27 00:47:17 1.22 +++ UI.pm 2001/12/04 00:43:56 1.23 @@ -1,4 +1,4 @@ # SandWeb User Interface Class -# use HTML::Template or something? +# package SandWeb::UI; @@ -7,15 +7,15 @@ sub new { - my $class = shift; - my %args = @_; + my $class = shift; + my %args = @_; - my $self = bless { + my $self = bless { 'log_obj' => $args{'log_obj'}, 'template_dir' => $args{'template_dir'}, 'cgi_path' => $args{'cgi_path'}, 'cgi_exec' => $args{'cgi_exec'}, - }, $class; + }, $class; - return $self; + return $self; } @@ -61,360 +61,50 @@ sub get_menu_bar { - my $self = shift; - my %args = @_; - - my $template_dir = $self->_get_template_dir(); - - my %defaults = ( - CGI_PATH => $self->_get_cgi_path(), - CGI_EXEC => $self->_get_cgi_exec(), - ); - - # generate menu_bar data - $tmp = HTML::Template->new(filename => "$template_dir/menu_bar.html"); - $tmp->param(%defaults, %args); - my @lists = $tmp->output; - return join('', @lists); -} - - -sub get_login { - my $self = shift; - my %args = @_; - - my $template_dir = $self->_get_template_dir(); - my $log = $self->_logobj(); - - # this will eventually be $conf->defaults() - my %defaults = ( - CGI_PATH => $self->_get_cgi_path(), - CGI_EXEC => $self->_get_cgi_exec(), - ); - - # generate content data - my $tmp = HTML::Template->new(filename => "$template_dir/login.html"); - $tmp->param( %defaults, %args ); - my @contents = $tmp->output; - return join('', @contents); -} - -sub get_preferences { - my $self = shift; - my %args = @_; - - my $template_dir = $self->_get_template_dir(); - my $filename = $args{'filename'}; - my $log = $self->_logobj(); - - # this will eventually be $conf->defaults() - my %defaults = ( - # CGI_PATH => $self->_get_cgi_path(), - # CGI_EXEC => $self->_get_cgi_exec(), - ); - - # generate content data - my $tmp = HTML::Template->new(filename => "$template_dir/preferences.html"); - $tmp->param( %defaults, %args ); - my @contents = $tmp->output; - return join('', @contents); -} - -sub get_vcs_prefs { - my $self = shift; - my %args = @_; - - my $template_dir = $self->_get_template_dir(); - my $filename = $args{'filename'}; - my $log = $self->_logobj(); - - # this will eventually be $conf->defaults() - my %defaults = ( - # CGI_PATH => $self->_get_cgi_path(), - # CGI_EXEC => $self->_get_cgi_exec(), - ); - - # generate content data - my $tmp = HTML::Template->new(filename => "$template_dir/vcs_prefs.html"); - $tmp->param( %defaults, %args ); - my @contents = $tmp->output; - return join('', @contents); -} - -sub get_cvs_prefs { - - my $self = shift; - my %args = @_; - - my $template_dir = $self->_get_template_dir(); - my $filename = $args{'filename'}; - my $log = $self->_logobj(); - - # this will eventually be $conf->defaults() - my %defaults = ( - # CGI_PATH => $self->_get_cgi_path(), - # CGI_EXEC => $self->_get_cgi_exec(), - ); - - # generate content data - my $tmp = HTML::Template->new(filename => "$template_dir/cvs_prefs.html"); - $tmp->param( %defaults, %args ); - my @contents = $tmp->output; - return join('', @contents); -} - -sub get_rcs_prefs { - - my $self = shift; - my %args = @_; - - my $template_dir = $self->_get_template_dir(); - my $filename = $args{'filename'}; - my $log = $self->_logobj(); - - # this will eventually be $conf->defaults() - my %defaults = ( - # CGI_PATH => $self->_get_cgi_path(), - # CGI_EXEC => $self->_get_cgi_exec(), - ); - - # generate content data - my $tmp = HTML::Template->new(filename => "$template_dir/rcs_prefs.html"); - $tmp->param( %defaults, %args ); - my @contents = $tmp->output; - return join('', @contents); -} - -sub view_file { - my $self = shift; - my %args = @_; - - my $template_dir = $self->_get_template_dir(); - my $filename = $args{'filename'}; - my $log = $self->_logobj(); - - # this will eventually be $conf->defaults() - my %defaults = ( - # CGI_PATH => $self->_get_cgi_path(), - # CGI_EXEC => $self->_get_cgi_exec(), - FILENAME => $filename, - ); - - # generate content data - my $tmp = HTML::Template->new(filename => "$template_dir/view_file.html"); - $tmp->param( %defaults, %args ); - my @contents = $tmp->output; - return join('', @contents); -} - -sub edit_file { - my $self = shift; - my %args = @_; - - my $template_dir = $self->_get_template_dir(); - my $filename = $args{'filename'}; - my $log = $self->_logobj(); - - # this will eventually be $conf->defaults() - my %defaults = ( - # CGI_PATH => $self->_get_cgi_path(), - # CGI_EXEC => $self->_get_cgi_exec(), - FILENAME => $filename, - ); - - # generate content data - my $tmp = HTML::Template->new(filename => "$template_dir/edit_file.html"); - $tmp->param( %defaults, %args ); - my @contents = $tmp->output; - return join('', @contents); -} + my $self = shift; + my %args = @_; -sub get_vcs_output { - my $self = shift; - my %args = @_; - - my $template_dir = $self->_get_template_dir(); - my $filename = $args{'filename'}; - my $log = $self->_logobj(); - - # this will eventually be $conf->defaults() - my %defaults = ( - # CGI_PATH => $self->_get_cgi_path(), - # CGI_EXEC => $self->_get_cgi_exec(), - FILENAME => $filename, - ); - - # generate content data - my $tmp = HTML::Template->new(filename => "$template_dir/vcs_output.html"); - $tmp->param( %defaults, %args ); - my @contents = $tmp->output; - return join('', @contents); -} + my $template_dir = $self->_get_template_dir(); -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); -} + my %defaults = ( + CGI_PATH => $self->_get_cgi_path(), + CGI_EXEC => $self->_get_cgi_exec(), + ); -sub create_file { - 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/create_file.html"); - $tmp->param( %defaults, %args ); - my @contents = $tmp->output; - return join('', @contents); + # generate menu_bar data + $tmp = HTML::Template->new(filename => "$template_dir/menu_bar.html"); + $tmp->param(%defaults, %args); + my @lists = $tmp->output; + return join('', @lists); } -sub create_folder{ - 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/create_folder.html"); - $tmp->param( %defaults, %args ); - my @contents = $tmp->output; - return join('', @contents); -} -sub upload_file { - 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/upload.html"); - $tmp->param( %defaults, %args ); - my @contents = $tmp->output; - return join('', @contents); -} +sub get_menu { + my $self = shift; + my %args = @_; -sub get_commit { - my $self = shift; - my %args = @_; - - my $template_dir = $self->_get_template_dir(); - my $filename = $args{'filename'}; - my $log = $self->_logobj(); - - # this will eventually be $conf->defaults() - my %defaults = ( - # CGI_PATH => $self->_get_cgi_path(), - # CGI_EXEC => $self->_get_cgi_exec(), - ); - - # generate content data - my $tmp = HTML::Template->new(filename => "$template_dir/commit.html"); - $tmp->param( %defaults, %args ); - my @contents = $tmp->output; - return join('', @contents); -} + my $template_dir = $self->_get_template_dir(); + my $log = $self->_logobj(); -sub get_checkout { - my $self = shift; - my %args = @_; - - my $template_dir = $self->_get_template_dir(); - my $filename = $args{'filename'}; - my $log = $self->_logobj(); - - # this will eventually be $conf->defaults() - my %defaults = ( - # CGI_PATH => $self->_get_cgi_path(), - # CGI_EXEC => $self->_get_cgi_exec(), - ); - - # generate content data - my $tmp = HTML::Template->new(filename => "$template_dir/checkout.html"); - $tmp->param( %defaults, %args ); - my @contents = $tmp->output; - return join('', @contents); -} + my $menu = $args{'menu'}; + delete $args{menu}; -sub get_tag { - my $self = shift; - my %args = @_; - - my $template_dir = $self->_get_template_dir(); - my $filename = $args{'filename'}; - my $log = $self->_logobj(); - - # this will eventually be $conf->defaults() - my %defaults = ( - # CGI_PATH => $self->_get_cgi_path(), - # CGI_EXEC => $self->_get_cgi_exec(), - ); - - # generate content data - my $tmp = HTML::Template->new(filename => "$template_dir/tag.html"); - $tmp->param( %defaults, %args ); - my @contents = $tmp->output; - return join('', @contents); + # generate content data + my $tmp = HTML::Template->new(filename => "$template_dir/$menu.html"); + $tmp->param( %args ); + my @contents = $tmp->output; + return join('', @contents); } sub _get_cgi_exec { - return $_[0]->{'cgi_exec'}; + return $_[0]->{'cgi_exec'}; } sub _get_cgi_path { - return $_[0]->{'cgi_path'}; + return $_[0]->{'cgi_path'}; } sub _get_template_dir { - return $_[0]->{'template_dir'}; + return $_[0]->{'template_dir'}; } sub _logobj { - return $_[0]->{'log_obj'}; + return $_[0]->{'log_obj'}; } |
From: Rob H. <for...@us...> - 2001-12-03 23:09:43
|
Update of /cvsroot/sandweb/sandweb/templates In directory usw-pr-cvs1:/tmp/cvs-serv19834/templates Modified Files: preferences.html vcs_prefs.html Log Message: began working on preferences stuff, right now we only support one repository, but we _fully_ support all possible repository options. the vcs_prefs need some work, though. I'm still working on it, as soon as it's good I'll check it in. Index: preferences.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/preferences.html,v retrieving revision 1.8 retrieving revision 1.9 diff -U2 -r1.8 -r1.9 --- preferences.html 2001/09/21 01:32:51 1.8 +++ preferences.html 2001/12/03 23:09:40 1.9 @@ -1,34 +1,30 @@ <form submit="<TMPL_VAR NAME=PROGNAME>"> <input type="hidden" name="action" value="preferences_menu"> -<table width="100%" align="center"> +<table width="100%" align="center" border="0"> <tr> - <td width="30%" align="right"> - Full name : <br /> + <td width="20%" align="right"> + Full Name : </td> - <td width="50%" align="left"> + <td width="90%" align="left"> <input type="text" name="full_name" value="<TMPL_VAR NAME=FULL_NAME>" /> </td> - <td width="20%" align="center"> -   <br /> - </td> </tr> -<!-- <tr> - <td width="35%" align="right"> - Local work directory : <br /> + <td width="20%" align="right"> + Local work dir : </td> - <td width="65%" align="left"> - <input type="text" value="<TMPL_VAR NAME=WORK_DIR>" /> + <td width="90%" align="left"> + <input type="text" name="work_dir" value="<TMPL_VAR NAME=WORK_DIR>" /> </td> </tr> ---> - <td width="100%" colspan="3" align="center"> -   <br /> - </td> +<table width="100%" align="center" border="0"> <tr> - <td width="80%" colspan="2" align="center"> - <input type="submit" name="Submit" Value="Submit" /> + <td width="15%" align="center"> + <br />  <br /> + </td> + <td width="10%" align="center"> + <input type="submit" name="Submit" Value="Done" /> </td> - <td width="20%" align="center"> + <td width="75%" align="center">   <br /> </td> Index: vcs_prefs.html =================================================================== RCS file: /cvsroot/sandweb/sandweb/templates/vcs_prefs.html,v retrieving revision 1.3 retrieving revision 1.4 diff -U2 -r1.3 -r1.4 --- vcs_prefs.html 2001/08/21 08:10:13 1.3 +++ vcs_prefs.html 2001/12/03 23:09:40 1.4 @@ -1,15 +1,57 @@ <form submit="<TMPL_VAR NAME=PROGNAME>"> -<input type="hidden" name="action" value="new_repo" /> -<pre> - - Setup new <select name="repo_type"><option>CVS</option><option>RCS</option></select> repository : <input type="submit" value="Ok" /> - - - - Edit currently configured repositories : - - <a href="">sandbox (CVS)</a> - -</pre> +<input type="hidden" name="action" value="preferences_menu"> +<table width="100%" align="center" border="0"> + <tr> + <td width="20%" align="right"> + Server Hostname : + </td> + <td width="90%" align="left"> + <input type="text" name="server" value="<TMPL_VAR NAME=SERVER>" /> + </td> + </tr> + <tr> + <td width="20%" align="right"> + VCS Type : + </td> + <td width="90%" align="left"> + <select name="repo_type"> + <option>CVS</option> + <option>RCS</option> + </select> + </td> + </tr> + <tr> + <td width="20%" align="right"> + Connection : + </td> + <td width="90%" align="left"> + <select name="connection"> + <option>SSH</option> + <option>RSH</option> + <option>pserver</option> + <option>local</option> + </select> + </td> + </tr> + <tr> + <td width="20%" align="right"> + Root : + </td> + <td width="90%" align="left"> + <input type="text" name="root" value="<TMPL_VAR NAME=ROOT>" /> + </td> + <tr> +</table> +<table width="100%" align="center" border="0"> + <td width="15%" align="center"> +   <br /> + </td> + <td width="10%" align="center"> + <input type="submit" name="Submit" Value="Done" /> + </td> + <td width="75%" align="center"> +   <br /> + </td> + </tr> +</table> </form> -<TMPL_VAR NAME=ERROR> |