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

(-)a/Koha/Template/Plugin/Categories.pm (-1 / +11 lines)
Lines 28-33 sub all { Link Here
28
    return Koha::Patron::Categories->search($params);
28
    return Koha::Patron::Categories->search($params);
29
}
29
}
30
30
31
sub limited {
32
    my ( $self, $params ) = @_;
33
    return Koha::Patron::Categories->search_with_library_limits($params);
34
}
35
31
sub GetName {
36
sub GetName {
32
    my ( $self, $categorycode ) = @_;
37
    my ( $self, $categorycode ) = @_;
33
38
Lines 56-64 Koha::Template::Plugin::Categories - TT Plugin for categories Link Here
56
61
57
=head2 all
62
=head2 all
58
63
59
In a template, you can get the all categories with
64
In a template, you can get all the categories with
60
the following TT code: [% Categories.all() %]
65
the following TT code: [% Categories.all() %]
61
66
67
=head2 limited
68
69
In a template, you can get the categories with library limits applied with
70
the following TT code: [% Categories.limited() %]
71
62
=head2 GetName
72
=head2 GetName
63
73
64
In a template, you can get the name of a patron category using
74
In a template, you can get the name of a patron category using
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-toolbar.inc (-2 / +1 lines)
Lines 1-7 Link Here
1
[% INCLUDE 'blocking_errors.inc' %]
1
[% INCLUDE 'blocking_errors.inc' %]
2
[% USE Categories %]
2
[% USE Categories %]
3
[% USE Koha %]
3
[% USE Koha %]
4
[% SET categories = Categories.all %]
4
[% SET categories = Categories.limited %]
5
5
6
[% UNLESS ( no_add ) %]
6
[% UNLESS ( no_add ) %]
7
<div id="toolbar" class="btn-toolbar">
7
<div id="toolbar" class="btn-toolbar">
8
- 

Return to bug 31421