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::Utility; 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->var->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'), {type=>'text/javascript'}); $style->setScript($url->extras('accordion/accordion.js'), {type=>'text/javascript'}); $style->setLink($url->extras('macro/AdminBar/slidePanel.css'), {type=>'text/css', rel=>'stylesheet'}); my $out = q{
}; return $out; } 1;