diff --git a/lib/WebGUI/Macro/AdminBar.pm b/lib/WebGUI/Macro/AdminBar.pm deleted file mode 100644 index 0dceb6e48..000000000 --- a/lib/WebGUI/Macro/AdminBar.pm +++ /dev/null @@ -1,202 +0,0 @@ -package WebGUI::Macro::AdminBar; - -#------------------------------------------------------------------- -# 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 -#------------------------------------------------------------------- - -use strict qw(refs vars); -use WebGUI::AdminConsole; -use WebGUI::Asset; -use WebGUI::International; -use WebGUI::Macro; -use WebGUI::VersionTag; - -=head1 NAME - -Package WebGUI::Macro::AdminBar - -=head1 DESCRIPTION - -Macro for displaying administrative functions to a user with Admin turned on. - -=head2 process ( ) - -process takes one optional parameters for customizing the layout of the Admin bar. - -=cut - - -sub process { - my $session = shift; - return undef unless $session->isAdminOn; - my $i18n = WebGUI::International->new($session,'Macro_AdminBar'); - my ($url, $style, $asset, $user, $config) = $session->quick(qw(url style asset user config)); - $style->setScript($url->extras('yui/build/utilities/utilities.js')); - $style->setScript($url->extras('accordion/accordion.js')); - $style->setCss($url->extras('macro/AdminBar/slidePanel.css')); - - my $out = q{
- }; - return $out; -} - -1; - diff --git a/t/Macro/AdminBar.t b/t/Macro/AdminBar.t deleted file mode 100644 index d92e5e43a..000000000 --- a/t/Macro/AdminBar.t +++ /dev/null @@ -1,30 +0,0 @@ -#------------------------------------------------------------------- -# 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 -#------------------------------------------------------------------- - -use strict; - -use WebGUI::Test; -use WebGUI::Session; -use WebGUI::Macro::AdminBar; -use HTML::TokeParser; - -use Test::More; # increment this value for each test you create - -my $session = WebGUI::Test->session; - -plan tests => 2; - -my $output; -$output = WebGUI::Macro::AdminBar::process($session); -is($output, undef, 'AdminBar returns undef unless admin is on'); -$session->switchAdminOn; -$output = WebGUI::Macro::AdminBar::process($session); -ok($output, 'AdminBar returns something when admin is on'); -