diff --git a/Koha/Template/Plugin/NoticeTemplates.pm b/Koha/Template/Plugin/NoticeTemplates.pm index 8cb5545c50..43762c242b 100644 --- a/Koha/Template/Plugin/NoticeTemplates.pm +++ b/Koha/Template/Plugin/NoticeTemplates.pm @@ -26,6 +26,27 @@ use Koha::Notice::Templates; use C4::Context; use C4::Letters qw( GetLettersAvailableForALibrary ); +=head1 NAME + +Koha::Template::Plugin::NoticeTemplates - TT Plugin for notice templates + +=head1 SYNOPSIS + +[% USE NoticeTemplates %] + +[% NoticeTemplates.GetByModule('members') %] + +[% NoticeTemplates.GetByModuleForLibrary('members') %] + +=head1 ROUTINES + +=head2 GetByModule + +In a template, you can get notice templates by module with +[% letters = NoticeTemplates.GetByModule( 'members' ) %] + +=cut + sub GetByModule { my ( $self, $module ) = @_; @@ -39,6 +60,13 @@ sub GetByModule { ); } +=head2 GetByModuleForLibrary + +In a template, you can get notice templates by module, limited to only templates for all librries or for the user's logged-in branch, with +[% letters = NoticeTemplates.GetByModuleForLibrary( 'members' ) %] + +=cut + sub GetByModuleForLibrary { my ( $self, $module ) = @_; my $userenv = C4::Context->userenv; @@ -57,23 +85,6 @@ sub GetByModuleForLibrary { ); } -=head1 NAME - -Koha::Template::Plugin::NoticeTemplates - TT Plugin for notice templates - -=head1 SYNOPSIS - -[% USE NoticeTemplates %] - -[% NoticeTemplates.GetByModule('members') %] - -=head1 ROUTINES - -=head2 GetByModule - -In a template, you can get notice templates by module with -[% letters = NoticeTemplates.GetByModule( 'members' ) %] - =head1 AUTHOR Alex Arnaud