Correct POD for AdminToggle and add POD for 3 new files

This commit is contained in:
Colin Kuskie 2005-12-17 06:10:07 +00:00
parent ddf72f4c31
commit eb98d68777
4 changed files with 74 additions and 2 deletions

View file

@ -27,7 +27,7 @@ Macro for displaying a url to the user for turning Admin mode on and off.
=head2 process ( [turnOn,turnOff,template ] )
process takes two optional parameters for customizing the content and layout
process takes three optional parameters for customizing the content and layout
of the account link.
=head3 turnOn
@ -42,7 +42,7 @@ Turn On Admin group. If this is blank an internationalized default is used.
=head3 template
A template to use for formatting the link.
A template from the Macro/AdminToggle namespace to use for formatting the link.
=cut

View file

@ -13,6 +13,29 @@ package WebGUI::Macro::D_date;
use strict;
use WebGUI::DateTime;
=head1 NAME
Package WebGUI::Macro::D_date
=head1 DESCRIPTION
Macro for displaying dates formatted for reading by people using WebGUI::DateTime::epochToHuman().
=head2 process ( format string, [ date ] )
=head3 format string
A string specifying how to format the date using codes similar to those used by
sprintf. See L<WebGUI::DateTime/"epochToHuman"> for a list of codes.
=head3 date
An optional date in epoch format. If the date is omitted, then the present
time is used instead.
=cut
#-------------------------------------------------------------------
sub process {
my (@param, $temp, $time);

View file

@ -17,6 +17,38 @@ use WebGUI::Session;
use WebGUI::Asset::Template;
use WebGUI::URL;
=head1 NAME
Package WebGUI::Macro::EditableToggle
=head1 DESCRIPTION
Macro for displaying a url to the user for turning Admin mode on and off if they
have editing rights to the current Asset.
=head2 process ( [turnOn,turnOff,template ] )
process takes three optional parameters for customizing the content and layout
of the account link.
=head3 turnOn
The text displayed to the user if Admin mode is turned off, they are in the
Turn On Admin group and they have editing rights to this Asset.
If this is blank an internationalized default is used.
=head3 turnOff
The text displayed to the user if Admin mode is turned on, they are in
the Turn On Admin group and they have editing rights to this Asset..
If this is blank an internationalized default is used.
=head3 template
A template from the Macro/EditableToggle namespace to use for formatting the link.
=cut
#-------------------------------------------------------------------
sub process {
if (exists $session{asset} && $session{asset}->canEdit && WebGUI::Grouping::isInGroup(12)) {

View file

@ -13,6 +13,23 @@ package WebGUI::Macro::Env;
use strict;
use WebGUI::Session;
=head1 NAME
Package WebGUI::Macro::Env
=head1 DESCRIPTION
Macro for displaying fields from the Session env hash.
=head2 process ( key )
=head3 key
The key from the Session env hash to display. If the key doesn't exist,
then undef will be returned.
=cut
#-------------------------------------------------------------------
sub process {
return $session{env}{shift};