View | Details | Raw Unified | Return to bug 4173
Collapse All | Expand All

(-)a/Koha/Template/Plugin/KohaAuthorisedValues.pm (-1 / +18 lines)
Lines 24-29 use base qw( Template::Plugin ); Link Here
24
24
25
use C4::Koha;
25
use C4::Koha;
26
26
27
=pod
28
29
This plugin allows one to get the description for an authorised value
30
from within a template.
31
32
First, include the line '[% USE KohaAuthorisedValues %]' at the top
33
of the template to enable the plugin.
34
35
To use, call KohaAuthorisedValues.GetByCode with the category
36
of the authorised value, the code to look up, and optionally,
37
the OPAC flag ( if set, it will return the OPAC description rather
38
than the Intranet description ).
39
40
For example: [% KohaAuthorisedValues.GetByCode( 'LOST', item.itemlost, 1 ) %]
41
will print the OPAC description for the LOST value stored in item.itemlost.
42
43
=cut
44
27
sub GetByCode {
45
sub GetByCode {
28
    my ( $self, $category, $code, $opac ) = @_;
46
    my ( $self, $category, $code, $opac ) = @_;
29
    return GetAuthorisedValueByCode( $category, $code, $opac );
47
    return GetAuthorisedValueByCode( $category, $code, $opac );
30
- 

Return to bug 4173