@@ -, +, @@ --- Koha/Library/Group.pm | 27 +++++++- koha-tmpl/intranet-tmpl/prog/css/staff-global.css | 5 ++ .../prog/en/modules/admin/library_groups.tt | 77 +++++++++++++++------- 3 files changed, 82 insertions(+), 27 deletions(-) --- a/Koha/Library/Group.pm +++ a/Koha/Library/Group.pm @@ -37,7 +37,19 @@ Koha::Library::Group - Koha Library::Group object class =cut -=head3 my @children = $self->get_children() +=head3 my @parent = $self->parent() + +=cut + +sub parent { + my ($self) = @_; + + $self->{_parent} ||= Koha::Library::Groups->find( $self->parent_id ); + + return $self->{_parent}; +} + +=head3 my @children = $self->children() =cut @@ -63,7 +75,9 @@ sub library { return unless $self->branchcode; - return Koha::Libraries->find( $self->branchcode ); + $self->{_library} ||= Koha::Libraries->find( $self->branchcode ); + + return $self->{_library}; } =head3 libraries_not_direct_children @@ -87,7 +101,14 @@ sub libraries_not_direct_children { my @branchcodes = map { $_->branchcode } @children; - return Koha::Libraries->search( { branchcode => { -not_in => \@branchcodes } } ); + return Koha::Libraries->search( + { + branchcode => { -not_in => \@branchcodes } + }, + { + order_by => 'branchname' + } + ); } =head3 store --- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css +++ a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css @@ -3007,3 +3007,8 @@ fieldset.rows + fieldset.action { #patron_search #filters { display: none; } + +span.name { + font-weight: bold; + font-style: italic; +} --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt @@ -6,13 +6,38 @@ @@ -63,7 +92,7 @@ [% IF added %] -
+
[% IF added.branchcode %] [% added.library.branchname %] added to group. [% ELSE %] @@ -71,7 +100,7 @@ [% END %]
[% ELSIF deleted %] -
+
[% IF deleted.title %] Group [% deleted.title %] has been deleted. [% ELSE %] @@ -87,8 +116,8 @@
@@ -170,10 +199,10 @@ @@ -206,9 +235,9 @@ [% IF group.branchcode %] - [% group.branchcode %] + [% group.branchcode %] [% ELSE %] - [% group.title %] + [% group.title %] [% END %] @@ -220,25 +249,25 @@ [% IF group.branchcode %] - + [% ELSE %]
- +