Update docs for GroupDelete (conditions for displaying the link)

Added POD to 4 more Macros
This commit is contained in:
Colin Kuskie 2005-12-18 00:39:31 +00:00
parent 8aafc5a3ad
commit 9e7d86af49
5 changed files with 80 additions and 7 deletions

View file

@ -25,11 +25,11 @@ Package WebGUI::Macro::GroupAdd
Macro that allows users to add themselves to a group.
=head2 process ( groupId, text, [ template ] )
=head2 process ( groupName, text, [ template ] )
=head3 groupId
=head3 groupName
The ID of a group. The group must exist and be set up for auto adds for the link
The name of a group. The group must exist and be set up for auto adds for the link
to be shown.
=head3 text

View file

@ -17,6 +17,33 @@ use WebGUI::Session;
use WebGUI::Asset::Template;
use WebGUI::URL;
=head1 NAME
Package WebGUI::Macro::GroupDelete
=head1 DESCRIPTION
Macro that allows users to remove themselves to a group.
=head2 process ( groupName, text, [ template ] )
=head3 groupName
The name of a group. The group must exist and be set up for auto deletes for the link
to be shown.
=head3 text
The text that will be displayed to the user in the link for removing themselves
to the group.
=head3 template
An optional template for formatting the text and link.
=cut
#-------------------------------------------------------------------
sub process {
my @param = @_;

View file

@ -15,6 +15,33 @@ use WebGUI::Grouping;
use WebGUI::SQL;
use WebGUI::Session;
=head1 NAME
Package WebGUI::Macro::GroupText
=head1 DESCRIPTION
Macro for displaying a text message to user's in a certain group.
=head2 process ( groupName, member, nonMember )
Either the member or nonMember texts can be blank.
=head3 groupName
The name of the group whose members will be shown the message.
=head3 member
The text to be displayed to someone in the group.
=head3 nonMember
Text to be shown to someone not in the group.
=cut
#-------------------------------------------------------------------
sub process {
my @param = @_;

View file

@ -13,6 +13,21 @@ package WebGUI::Macro::Hash_userId;
use strict;
use WebGUI::Session;
=head1 NAME
Package WebGUI::Macro::Hash_userId
=head1 DESCRIPTION
Macro for userId of the current user.
=head2 process
Returns the userId from the session variable for the current user.
=cut
#-------------------------------------------------------------------
sub process {
return $session{user}{userId};

View file

@ -24,13 +24,17 @@ The URL with the action to add the user to the group.
<b>group.text</b><br/>
The supplied text string for the user to click on.
<p>
<b>NOTE:</b> If the user is not logged in or the user does not belong to the group, or the group is not set to allow auto deletes, then no link will be displayed.
<p>
<b>NOTE:</b> All these conditions must be met for the link to be displayed:
<ul>
<li>User must be logged in.</li>
<li>User must be a member of the group.</li>
<li>The group must exist.</li>
<li>The group must be set up to allow auto deletes.</li>
</ul>
|,
lastUpdated => 1112466919,
lastUpdated => 1134866717,
},
};