diff --git a/lib/WebGUI/Wizard/HomePage.pm b/lib/WebGUI/Wizard/HomePage.pm
index 9bdcf43bc..f91554b6f 100644
--- a/lib/WebGUI/Wizard/HomePage.pm
+++ b/lib/WebGUI/Wizard/HomePage.pm
@@ -7,6 +7,13 @@ use base 'WebGUI::Wizard';
WebGUI::Wizard::HomePage - Create or replace a Home Page with new content
+=head1 DESCRIPTION
+
+The HomePage wizard will create a new home page with a given style and with
+the desired types of content.
+
+=head1 METHODS
+
=cut
sub _get_steps {
@@ -68,15 +75,39 @@ sub addPage {
return addAsset( $parent, { title => $title, className => "WebGUI::Asset::Wobject::Layout", displayTitle => 0 } );
}
+#----------------------------------------------------------------------------
+
+=head2 canView ( )
+
+A user can view this wizard if they are an Admin
+
+=cut
+
sub canView {
my ( $self ) = @_;
return $self->session->user->isAdmin;
}
+#----------------------------------------------------------------------------
+
+=head2 wrapStyle ( $output )
+
+Wrap the output in the wizard style.
+
+=cut
+
sub wrapStyle {
return WebGUI::Wizard::Setup::wrapStyle( @_ );
}
+#----------------------------------------------------------------------------
+
+=head2 www_pickStyle ( )
+
+Choose the style for the new home page
+
+=cut
+
sub www_pickStyle {
my ( $self ) = @_;
my $session = $self->session;
@@ -132,6 +163,14 @@ sub www_pickStyle {
return $output . '
';
}
+#----------------------------------------------------------------------------
+
+=head2 www_pickStyleSave ( )
+
+Store the style to use later when we create the content
+
+=cut
+
sub www_pickStyleSave {
my ( $self ) = @_;
my $session = $self->session;
@@ -147,6 +186,14 @@ sub www_pickStyleSave {
return;
}
+#----------------------------------------------------------------------------
+
+=head2 www_chooseContent ( )
+
+Choose and configure the content on the home page
+
+=cut
+
sub www_chooseContent {
my ($self) = @_;
my $session = $self->session;
@@ -183,6 +230,14 @@ sub www_chooseContent {
return $output;
} ## end sub www_chooseContent
+#----------------------------------------------------------------------------
+
+=head2 www_chooseContentSave ( )
+
+Create the new content with the correct style.
+
+=cut
+
sub www_chooseContentSave {
my ($self) = @_;
my $session = $self->session;
@@ -369,6 +424,14 @@ sub www_chooseContentSave {
return;
} ## end sub www_chooseContentSave
+#----------------------------------------------------------------------------
+
+=head2 www_finalize ( $output )
+
+Redirect the user to to the home page
+
+=cut
+
sub www_finalize {
my ($self) = @_;
my $session = $self->session;
diff --git a/lib/WebGUI/Wizard/Setup.pm b/lib/WebGUI/Wizard/Setup.pm
index bf72dea8d..30a930de2 100644
--- a/lib/WebGUI/Wizard/Setup.pm
+++ b/lib/WebGUI/Wizard/Setup.pm
@@ -7,8 +7,14 @@ use base 'WebGUI::Wizard';
WebGUI::Wizard::Setup -- Initial site setup
-=cut
+=head1 DESCRIPTION
+A WebGUI::Wizard to perform initial site setup tasks like defining the Admin
+account, entering basic information, and choosing a default style.
+
+=head1 METHODS
+
+=cut
sub _get_steps {
return [qw(
@@ -20,6 +26,15 @@ sub _get_steps {
)];
}
+#----------------------------------------------------------------------------
+
+=head2 canView ( )
+
+A user can view this wizard if the site is newly created or if they are the
+admin user
+
+=cut
+
sub canView {
my ( $self ) = @_;
my $session = $self->session;
@@ -29,6 +44,14 @@ sub canView {
|| $session->user->getId eq '3';
}
+#----------------------------------------------------------------------------
+
+=head2 wrapStyle ( $output )
+
+Wrap the output in the wizard style.
+
+=cut
+
sub wrapStyle {
my ( $self, $output ) = @_;
my $session = $self->session;
@@ -101,6 +124,13 @@ h1 {
return $page;
}
+#----------------------------------------------------------------------------
+
+=head2 www_adminAccount ( )
+
+Display the form to configure the admin account
+
+=cut
sub www_adminAccount {
my ( $self ) = @_;
@@ -148,6 +178,14 @@ sub www_adminAccount {
return '' . $legend . '
' . $f->print;
}
+#----------------------------------------------------------------------------
+
+=head2 www_adminAccountSave ( )
+
+Process the form and update the Admin account
+
+=cut
+
sub www_adminAccountSave {
my ( $self ) = @_;
my $session = $self->session;
@@ -186,6 +224,14 @@ sub www_adminAccountSave {
return;
}
+#----------------------------------------------------------------------------
+
+=head2 www_companyInformation ( )
+
+Enter basic company information
+
+=cut
+
sub www_companyInformation {
my ( $self ) = @_;
my $session = $self->session;
@@ -221,6 +267,14 @@ sub www_companyInformation {
return $output;
}
+#----------------------------------------------------------------------------
+
+=head2 www_companyInformationSave ( )
+
+Update the company information
+
+=cut
+
sub www_companyInformationSave {
my ( $self ) = @_;
my $session = $self->session;
@@ -231,6 +285,14 @@ sub www_companyInformationSave {
return;
}
+#----------------------------------------------------------------------------
+
+=head2 www_siteStats ( )
+
+Opt-in to the global WebGUI statistics
+
+=cut
+
sub www_siteStats {
my ( $self ) = @_;
my $session = $self->session;
@@ -258,6 +320,14 @@ sub www_siteStats {
return $output;
}
+#----------------------------------------------------------------------------
+
+=head2 www_siteStatsSave ( )
+
+Opt-in to the global WebGUI statistics
+
+=cut
+
sub www_siteStatsSave {
my ( $self ) = @_;
my $session = $self->session;
@@ -266,10 +336,27 @@ sub www_siteStatsSave {
return;
}
+#----------------------------------------------------------------------------
+
+=head2 www_defaultStyle ( )
+
+Choose the default site style
+
+=cut
+
sub www_defaultStyle {
return WebGUI::Wizard::HomePage::www_pickStyle( @_ );
}
+#----------------------------------------------------------------------------
+
+=head2 www_defaultStyleSave ( )
+
+Save the default style to all existing pages and the user function style
+
+=cut
+
+
sub www_defaultStyleSave {
my ( $self, @args ) = @_;
my $output = WebGUI::Wizard::HomePage::www_pickStyleSave( $self, @args );
@@ -286,6 +373,14 @@ sub www_defaultStyleSave {
return $output;
}
+#----------------------------------------------------------------------------
+
+=head2 www_finalize ( )
+
+Give the user a choice to do the Home Page wizard
+
+=cut
+
sub www_finalize {
my ( $self ) = @_;
my $session = $self->session;
@@ -318,6 +413,14 @@ sub www_finalize {
return $output;
}
+#----------------------------------------------------------------------------
+
+=head2 www_finalizeSave ( )
+
+User has declined to do the Home Page wizard
+
+=cut
+
sub www_finalizeSave {
my ( $self ) = @_;
my $session = $self->session;