POD for three macros

This commit is contained in:
Colin Kuskie 2005-12-16 21:13:30 +00:00
parent 1bcfa3bddc
commit fe27be1974
3 changed files with 58 additions and 0 deletions

View file

@ -23,6 +23,26 @@ use WebGUI::SQL;
use WebGUI::URL;
use WebGUI::Utility;
=head1 NAME
Package WebGUI::Macro::AdminBar
=head1 DESCRIPTION
Macro for displaying administrative functions to a user with Admin turned on.
=head2 process ( [template ] )
process takes one optional parameters for customizing the layout
of the Admin bar.
=head3 template
A template to use for formatting the link. The default template creates the sliding
Admin bar to the left of the screen.
=cut
#-------------------------------------------------------------------
sub process {
return "" unless ($session{var}{adminOn});

View file

@ -13,6 +13,21 @@ package WebGUI::Macro::User;
use strict;
use WebGUI::Session;
=head1 NAME
Package WebGUI::Macro::User
=head1 DESCRIPTION
Macro for displaying information from the current User's profile.
=head2 process( field )
process takes a single parameter, the name of a field in the User's User Profile from
the data stored in $session . If the field does not exist, undef is returned.
=cut
#-------------------------------------------------------------------
sub process {
return $session{user}{shift};

View file

@ -16,6 +16,29 @@ use WebGUI::Session;
use WebGUI::Asset::Template;
use WebGUI::URL;
=head1 NAME
Package WebGUI::Macro::a_account
=head1 DESCRIPTION
Macro for displaying a url to the current User's account page.
=head2 process ( [text,template ] )
process takes two optional parameters for customizing the content and layout
of the account link.
=head3 text
The text of the link. If no text is displayed an internationalized default will be used.
=head3 template
A template to use for formatting the link.
=cut
#-------------------------------------------------------------------
sub process {
my %var;