Add POD to more Macros.

Document that using the CanEditText Macro outside of an
Asset will have unpredictable results.
This commit is contained in:
Colin Kuskie 2005-12-16 22:55:06 +00:00
parent 7c619a1ecd
commit 80c3f027f2
3 changed files with 38 additions and 5 deletions

View file

@ -13,6 +13,18 @@ package WebGUI::Macro::At_username;
use strict;
use WebGUI::Session;
=head1 NAME
Package WebGUI::Macro::At_username
=head1 DESCRIPTION
Macro for displaying the current User's username.
=head2 process
=cut
#-------------------------------------------------------------------
sub process {
return $session{user}{username};

View file

@ -13,6 +13,25 @@ package WebGUI::Macro::CanEditText;
use strict;
use WebGUI::Session;
=head1 NAME
Package WebGUI::Macro::CanEditText
=head1 DESCRIPTION
Macro for displaying a message to a User who can edit the Asset
containing the Macro. This macro should not be used outside
of an Asset as it will yield unpredictable results.
=head2 process ( text )
=head3 text
The text that will be shown to the user. If the user cannot edit
this asset, an empty string will be returned.
=cut
#-------------------------------------------------------------------
sub process {
my @param = @_;

View file

@ -16,14 +16,16 @@ our $I18N = {
message => q|
<b>&#94;CanEditText(<i>text message</i>);</b><br>
Display a message to a user that can edit the current page. The message can be
HTML or WebGUI Macros.
Display a message to a user that can edit the current Asset.
<p>
<i>Example:</i> &#94;CanEditText(&#94;AdminToggle;);
<i>Example:</i><br>
&#94;CanEditText("You may edit this Asset");<br>
&#94;CanEditText(&#94;AdminToggle;);
<p>
Do not use this Macro outside of an Asset as it will have unpredictable
results.
|,
lastUpdated => 1112466919,
lastUpdated => 1134773763,
},
};