initial commit
This commit is contained in:
parent
d754931286
commit
7b260de791
14 changed files with 1046 additions and 0 deletions
153
lib/WebGUI/Account/Friends.pm
Normal file
153
lib/WebGUI/Account/Friends.pm
Normal file
|
|
@ -0,0 +1,153 @@
|
|||
package WebGUI::Account::Friends;
|
||||
|
||||
use strict;
|
||||
|
||||
use WebGUI::Exception;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Pluggable;
|
||||
use WebGUI::Utility;
|
||||
use base qw/WebGUI::Account/;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Package WebGUI::Account::Friends
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This is the class which is used to display a users's friends
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use WebGUI::Account::Friends;
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
These subroutines are available from this package:
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 editSettingsForm ( )
|
||||
|
||||
Creates form elements for user settings page custom to this account module
|
||||
|
||||
=cut
|
||||
|
||||
sub editUserSettingsForm {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
my $setting = $session->setting;
|
||||
my $i18n = WebGUI::International->new($session,'Account_Friends');
|
||||
my $f = WebGUI::HTMLForm->new($session);
|
||||
|
||||
# $f->template(
|
||||
# name => "profileStyleTemplateId",
|
||||
# value => $self->getStyleTemplateId,
|
||||
# namespace => "style",
|
||||
# label => $i18n->get("profile style template label"),
|
||||
# hoverHelp => $i18n->get("profile style template hoverHelp")
|
||||
# );
|
||||
|
||||
return $f->printRowsOnly;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 editSettingsFormSave ( )
|
||||
|
||||
Creates form elements for user settings page custom to this account module
|
||||
|
||||
=cut
|
||||
|
||||
sub editUserSettingsFormSave {
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getDisplayTemplateId ( )
|
||||
|
||||
This method returns the template ID for the account layout.
|
||||
|
||||
=cut
|
||||
|
||||
sub getDisplayTemplateId {
|
||||
my $self = shift;
|
||||
return $self->session->setting->get("friendsDisplayTempalteId") || "defaultAssetId";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getLayoutTemplateId ( )
|
||||
|
||||
This method returns the template ID for the account layout.
|
||||
|
||||
=cut
|
||||
|
||||
sub getLayoutTemplateId {
|
||||
my $self = shift;
|
||||
return $self->session->setting->get("friendsLayoutTempalteId") || $self->SUPER::getLayoutTemplateId;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getStyleTemplateId ( )
|
||||
|
||||
This method returns the template ID for the main style.
|
||||
|
||||
=cut
|
||||
|
||||
sub getStyleTemplateId {
|
||||
my $self = shift;
|
||||
return $self->session->setting->get("friendsStyleTemplateId") || $self->SUPER::getStyleTemplateId;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getViewTemplateId ( )
|
||||
|
||||
This method returns the template ID for the main view.
|
||||
|
||||
=cut
|
||||
|
||||
sub getViewTemplateId {
|
||||
my $self = shift;
|
||||
return $self->session->setting->get("friendsViewTemplateId") || "defaultAssetId";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_display ( )
|
||||
|
||||
The main view page for displaying the user's profile.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_display {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
my $var = {};
|
||||
|
||||
return $self->processTemplate($var,$self->getDisplayTemplateId);
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_view ( )
|
||||
|
||||
The main view page for editing the user's profile.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_view {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
my $var = {};
|
||||
|
||||
return $self->processTemplate($var,$self->getViewTemplateId);
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
124
lib/WebGUI/Account/Inbox.pm
Normal file
124
lib/WebGUI/Account/Inbox.pm
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
package WebGUI::Account::Inbox;
|
||||
|
||||
use strict;
|
||||
|
||||
use WebGUI::Exception;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Pluggable;
|
||||
use WebGUI::Utility;
|
||||
use base qw/WebGUI::Account/;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Package WebGUI::Account::Inbox
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This is the class which is used to display a users's inbox
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use WebGUI::Account::Inbox;
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
These subroutines are available from this package:
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 editSettingsForm ( )
|
||||
|
||||
Creates form elements for user settings page custom to this account module
|
||||
|
||||
=cut
|
||||
|
||||
sub editUserSettingsForm {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
my $setting = $session->setting;
|
||||
my $i18n = WebGUI::International->new($session,'Account_Inbox');
|
||||
my $f = WebGUI::HTMLForm->new($session);
|
||||
|
||||
# $f->template(
|
||||
# name => "profileStyleTemplateId",
|
||||
# value => $self->getStyleTemplateId,
|
||||
# namespace => "style",
|
||||
# label => $i18n->get("profile style template label"),
|
||||
# hoverHelp => $i18n->get("profile style template hoverHelp")
|
||||
# );
|
||||
|
||||
return $f->printRowsOnly;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 editSettingsFormSave ( )
|
||||
|
||||
Creates form elements for user settings page custom to this account module
|
||||
|
||||
=cut
|
||||
|
||||
sub editUserSettingsFormSave {
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getLayoutTemplateId ( )
|
||||
|
||||
This method returns the template ID for the account layout.
|
||||
|
||||
=cut
|
||||
|
||||
sub getLayoutTemplateId {
|
||||
my $self = shift;
|
||||
return $self->session->setting->get("inboxLayoutTempalteId") || $self->SUPER::getLayoutTemplateId;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getStyleTemplateId ( )
|
||||
|
||||
This method returns the template ID for the main style.
|
||||
|
||||
=cut
|
||||
|
||||
sub getStyleTemplateId {
|
||||
my $self = shift;
|
||||
return $self->session->setting->get("inboxStyleTemplateId") || $self->SUPER::getStyleTemplateId;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getViewTemplateId ( )
|
||||
|
||||
This method returns the template ID for the main view.
|
||||
|
||||
=cut
|
||||
|
||||
sub getViewTemplateId {
|
||||
my $self = shift;
|
||||
return $self->session->setting->get("inboxViewTemplateId") || "defaultAssetId";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_view ( )
|
||||
|
||||
The main view page for editing the user's profile.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_view {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
my $var = {};
|
||||
|
||||
return $self->processTemplate($var,$self->getViewTemplateId);
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
146
lib/WebGUI/Account/Profile.pm
Normal file
146
lib/WebGUI/Account/Profile.pm
Normal file
|
|
@ -0,0 +1,146 @@
|
|||
package WebGUI::Account::Profile;
|
||||
|
||||
use strict;
|
||||
|
||||
use WebGUI::Exception;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Pluggable;
|
||||
use WebGUI::Utility;
|
||||
use base qw/WebGUI::Account/;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Package WebGUI::Account::Profile
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This is the class which is used to display a users's profile information
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use WebGUI::Account::Profile;
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
These subroutines are available from this package:
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 editSettingsForm ( )
|
||||
|
||||
Creates form elements for user settings page custom to this account module
|
||||
|
||||
=cut
|
||||
|
||||
sub editUserSettingsForm {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
my $setting = $session->setting;
|
||||
my $i18n = WebGUI::International->new($session,'Account_Profile');
|
||||
my $f = WebGUI::HTMLForm->new($session);
|
||||
|
||||
$f->template(
|
||||
name => "profileStyleTemplateId",
|
||||
value => $self->getStyleTemplateId,
|
||||
namespace => "style",
|
||||
label => $i18n->get("profile style template label"),
|
||||
hoverHelp => $i18n->get("profile style template hoverHelp")
|
||||
);
|
||||
$f->template(
|
||||
name => "profileLayoutTempalteId",
|
||||
value => $self->getLayoutTemplateId,
|
||||
namespace => "Account/Layout",
|
||||
label => $i18n->get("profile layout template label"),
|
||||
hoverHelp => $i18n->get("profile layout template hoverHelp")
|
||||
);
|
||||
$f->template(
|
||||
name => "profileViewTemplateId",
|
||||
value => $self->getViewTemplateId,
|
||||
namespace => "Account/Profile/View",
|
||||
label => $i18n->get("profile view template label"),
|
||||
hoverHelp => $i18n->get("profile view template hoverHelp")
|
||||
);
|
||||
$f->template(
|
||||
name => "profileEditTemplateId",
|
||||
value => $setting->get("profileEditTemplateId"),
|
||||
namespace => "Account/Profile/Edit",
|
||||
label => $i18n->get("profile edit template label"),
|
||||
hoverHelp => $i18n->get("profile edit template hoverHelp")
|
||||
);
|
||||
|
||||
return $f->printRowsOnly;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getDisplayTemplateId ( )
|
||||
|
||||
This method returns the template ID for the account layout.
|
||||
|
||||
=cut
|
||||
|
||||
sub getDisplayTemplateId {
|
||||
my $self = shift;
|
||||
return $self->session->setting->get("profileDisplayTempalteId") || "defaultAssetId";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getLayoutTemplateId ( )
|
||||
|
||||
This method returns the template ID for the account layout.
|
||||
|
||||
=cut
|
||||
|
||||
sub getLayoutTemplateId {
|
||||
my $self = shift;
|
||||
return $self->session->setting->get("profileLayoutTempalteId") || $self->SUPER::getLayoutTemplateId;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getStyleTemplateId ( )
|
||||
|
||||
This method returns the template ID for the main style.
|
||||
|
||||
=cut
|
||||
|
||||
sub getStyleTemplateId {
|
||||
my $self = shift;
|
||||
return $self->session->setting->get("profileStyleTemplateId") || $self->SUPER::getStyleTemplateId;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getViewTemplateId ( )
|
||||
|
||||
This method returns the template ID for the main view.
|
||||
|
||||
=cut
|
||||
|
||||
sub getViewTemplateId {
|
||||
my $self = shift;
|
||||
return $self->session->setting->get("profileViewTemplateId") || "75CmQgpcCSkdsL-oawdn3Q";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_view ( )
|
||||
|
||||
The main view page for the user's profile.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_view {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
my $var = {};
|
||||
|
||||
return $self->processTemplate($var,$session->setting->get("profileViewTemplateId"));
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
124
lib/WebGUI/Account/User.pm
Normal file
124
lib/WebGUI/Account/User.pm
Normal file
|
|
@ -0,0 +1,124 @@
|
|||
package WebGUI::Account::User;
|
||||
|
||||
use strict;
|
||||
|
||||
use WebGUI::Exception;
|
||||
use WebGUI::International;
|
||||
use WebGUI::Pluggable;
|
||||
use WebGUI::Utility;
|
||||
use base qw/WebGUI::Account/;
|
||||
|
||||
=head1 NAME
|
||||
|
||||
Package WebGUI::Account::User
|
||||
|
||||
=head1 DESCRIPTION
|
||||
|
||||
This is the class which is used to display a users's account details
|
||||
|
||||
=head1 SYNOPSIS
|
||||
|
||||
use WebGUI::Account::User;
|
||||
|
||||
=head1 METHODS
|
||||
|
||||
These subroutines are available from this package:
|
||||
|
||||
=cut
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 editSettingsForm ( )
|
||||
|
||||
Creates form elements for user settings page custom to this account module
|
||||
|
||||
=cut
|
||||
|
||||
sub editUserSettingsForm {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
my $setting = $session->setting;
|
||||
my $i18n = WebGUI::International->new($session,'Account_User');
|
||||
my $f = WebGUI::HTMLForm->new($session);
|
||||
|
||||
# $f->template(
|
||||
# name => "profileStyleTemplateId",
|
||||
# value => $self->getStyleTemplateId,
|
||||
# namespace => "style",
|
||||
# label => $i18n->get("profile style template label"),
|
||||
# hoverHelp => $i18n->get("profile style template hoverHelp")
|
||||
# );
|
||||
|
||||
return $f->printRowsOnly;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 editSettingsFormSave ( )
|
||||
|
||||
Creates form elements for user settings page custom to this account module
|
||||
|
||||
=cut
|
||||
|
||||
sub editUserSettingsFormSave {
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getLayoutTemplateId ( )
|
||||
|
||||
This method returns the template ID for the account layout.
|
||||
|
||||
=cut
|
||||
|
||||
sub getLayoutTemplateId {
|
||||
my $self = shift;
|
||||
return $self->session->setting->get("userLayoutTempalteId") || $self->SUPER::getLayoutTemplateId;
|
||||
}
|
||||
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getStyleTemplateId ( )
|
||||
|
||||
This method returns the template ID for the main style.
|
||||
|
||||
=cut
|
||||
|
||||
sub getStyleTemplateId {
|
||||
my $self = shift;
|
||||
return $self->session->setting->get("userStyleTemplateId") || $self->SUPER::getStyleTemplateId;
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 getViewTemplateId ( )
|
||||
|
||||
This method returns the template ID for the main view.
|
||||
|
||||
=cut
|
||||
|
||||
sub getViewTemplateId {
|
||||
my $self = shift;
|
||||
return $self->session->setting->get("userViewTemplateId") || "defaultAssetId";
|
||||
}
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
=head2 www_view ( )
|
||||
|
||||
The main view page for editing the user's profile.
|
||||
|
||||
=cut
|
||||
|
||||
sub www_view {
|
||||
my $self = shift;
|
||||
my $session = $self->session;
|
||||
my $var = {};
|
||||
|
||||
return $self->processTemplate($var,$self->getViewTemplateId);
|
||||
}
|
||||
|
||||
|
||||
1;
|
||||
Loading…
Add table
Add a link
Reference in a new issue