Update docs for GroupDelete (conditions for displaying the link)
Added POD to 4 more Macros
This commit is contained in:
parent
8aafc5a3ad
commit
9e7d86af49
5 changed files with 80 additions and 7 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 = @_;
|
||||
|
|
|
|||
|
|
@ -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 = @_;
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue