diff --git a/lib/WebGUI/AssetHelper/Demote.pm b/lib/WebGUI/AssetHelper/Demote.pm deleted file mode 100644 index 5a75f86be..000000000 --- a/lib/WebGUI/AssetHelper/Demote.pm +++ /dev/null @@ -1,62 +0,0 @@ -package WebGUI::AssetHelper::Demote; - -use strict; -use Class::C3; -use base qw/WebGUI::AssetHelper/; - -=head1 LEGAL - - ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. - ------------------------------------------------------------------- - Please read the legal notices (docs/legal.txt) and the license - (docs/license.txt) that came with this distribution before using - this software. - ------------------------------------------------------------------- - http://www.plainblack.com info@plainblack.com - ------------------------------------------------------------------- - -=head1 NAME - -Package WebGUI::AssetHelper::Demote - -=head1 DESCRIPTION - -Demotes the asset with respect to its siblings. - -=head1 METHODS - -These methods are available from this class: - -=cut - -#------------------------------------------------------------------- - -=head2 process ( $class, $asset ) - -Demotes the asset. If the user cannot edit the asset it returns an error message. - -=cut - -sub process { - my ($class, $asset) = @_; - my $session = $asset->session; - - my $i18n = WebGUI::International->new($session, 'WebGUI'); - if (! $asset->canEdit) { - return { error => $i18n->get('38'), }; - } - - my $success = $asset->demote(); - if (! $success) { - return { - error => sprintf($i18n->get('unable to demote assset', 'Asset'), $asset->getTitle), - }; - } - - return { - message => sprintf($i18n->get('demoted asset', 'Asset'), $asset->getTitle), - }; -} - -1; diff --git a/lib/WebGUI/AssetHelper/Manage.pm b/lib/WebGUI/AssetHelper/Manage.pm deleted file mode 100644 index cdd1aac32..000000000 --- a/lib/WebGUI/AssetHelper/Manage.pm +++ /dev/null @@ -1,58 +0,0 @@ -package WebGUI::AssetHelper::Manage; - -use strict; -use Class::C3; -use base qw/WebGUI::AssetHelper/; -use WebGUI::User; -use WebGUI::HTML; - -=head1 LEGAL - - ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. - ------------------------------------------------------------------- - Please read the legal notices (docs/legal.txt) and the license - (docs/license.txt) that came with this distribution before using - this software. - ------------------------------------------------------------------- - http://www.plainblack.com info@plainblack.com - ------------------------------------------------------------------- - -=head1 NAME - -Package WebGUI::AssetHelper::Manage - -=head1 DESCRIPTION - -Displays the asset manager, starting at this Asset. - -=head1 METHODS - -These methods are available from this class: - -=cut - -#------------------------------------------------------------------- - -=head2 process ( $class, $asset ) - -Opens a new tab for displaying the Asset Manager, starting at this Asset. - -=cut - -sub process { - my ($class, $asset) = @_; - my $session = $asset->session; - my $i18n = WebGUI::International->new($session, "Asset"); - if (! $asset->canEdit) { - return { - error => $i18n->get('38', 'WebGUI'), - } - } - - return { - open_tab => $asset->getManagerUrl, - }; -} - -1; diff --git a/lib/WebGUI/AssetHelper/Promote.pm b/lib/WebGUI/AssetHelper/Promote.pm deleted file mode 100644 index 943628dc3..000000000 --- a/lib/WebGUI/AssetHelper/Promote.pm +++ /dev/null @@ -1,62 +0,0 @@ -package WebGUI::AssetHelper::Promote; - -use strict; -use Class::C3; -use base qw/WebGUI::AssetHelper/; - -=head1 LEGAL - - ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. - ------------------------------------------------------------------- - Please read the legal notices (docs/legal.txt) and the license - (docs/license.txt) that came with this distribution before using - this software. - ------------------------------------------------------------------- - http://www.plainblack.com info@plainblack.com - ------------------------------------------------------------------- - -=head1 NAME - -Package WebGUI::AssetHelper::Promote - -=head1 DESCRIPTION - -Promotes the asset with respect to its siblings. - -=head1 METHODS - -These methods are available from this class: - -=cut - -#------------------------------------------------------------------- - -=head2 process ( $class, $asset ) - -Promotes the asset. If the user cannot edit the asset it returns an error message. - -=cut - -sub process { - my ($class, $asset) = @_; - my $session = $asset->session; - - my $i18n = WebGUI::International->new($session, 'WebGUI'); - if (! $asset->canEdit) { - return { error => $i18n->get('38'), }; - } - - my $success = $asset->promote(); - if (! $success) { - return { - error => sprintf($i18n->get('unable to promote assset', 'Asset'), $asset->getTitle), - }; - } - - return { - message => sprintf($i18n->get('promoted asset', 'Asset'), $asset->getTitle), - }; -} - -1; diff --git a/lib/WebGUI/AssetHelper/Revisions.pm b/lib/WebGUI/AssetHelper/Revisions.pm deleted file mode 100644 index 6e09fa715..000000000 --- a/lib/WebGUI/AssetHelper/Revisions.pm +++ /dev/null @@ -1,97 +0,0 @@ -package WebGUI::AssetHelper::Revisions; - -use strict; -use Class::C3; -use base qw/WebGUI::AssetHelper/; -use WebGUI::User; -use WebGUI::HTML; - -=head1 LEGAL - - ------------------------------------------------------------------- - WebGUI is Copyright 2001-2009 Plain Black Corporation. - ------------------------------------------------------------------- - Please read the legal notices (docs/legal.txt) and the license - (docs/license.txt) that came with this distribution before using - this software. - ------------------------------------------------------------------- - http://www.plainblack.com info@plainblack.com - ------------------------------------------------------------------- - -=head1 NAME - -Package WebGUI::AssetHelper::Revisions - -=head1 DESCRIPTION - -Displays the revisions for this asset. - -=head1 METHODS - -These methods are available from this class: - -=cut - -#------------------------------------------------------------------- - -=head2 process ( $class, $asset ) - -Opens a new tab for displaying revisions of this asset. - -=cut - -sub process { - my ($class, $asset) = @_; - my $session = $asset->session; - my $i18n = WebGUI::International->new($session, "Asset"); - if (! $asset->canEdit) { - return { - error => $i18n->get('38', 'WebGUI'), - } - } - - return { - open_tab => $asset->getUrl('op=assetHelper;className=WebGUI::AssetHelper::Revisions;func=manageRevisions'), - }; -} - -#------------------------------------------------------------------- - -=head2 www_manageRevisions ( $class, $asset ) - -Displays a table of revision data for this asset, along with links to edit each revision, view it, or delete it. - -=cut - -sub www_manageRevisions { - my ($class, $asset) = @_; - my $session = $asset->session; - my $i18n = WebGUI::International->new($session, "Asset"); - if (! $asset->canEdit) { - return { - error => $i18n->get('38', 'WebGUI'), - } - } - my $output = sprintf qq{
| %s | %s | %s |
|---|