From 65d4289f129274a4ed504e7fb517623aeee1bb3b Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 14 Jun 2016 11:55:25 +0000 Subject: [PATCH] Bug 15707: (QA follow-up) Fix UI issues Signed-off-by: Tomas Cohen Arazi Signed-off-by: Jonathan Druart --- Koha/Library/Group.pm | 27 ++++++- .../intranet-tmpl/prog/css/staff-global.css | 5 ++ .../prog/en/modules/admin/library_groups.tt | 77 +++++++++++++------ 3 files changed, 82 insertions(+), 27 deletions(-) diff --git a/Koha/Library/Group.pm b/Koha/Library/Group.pm index ad2063b168..cd538995a0 100644 --- a/Koha/Library/Group.pm +++ b/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 diff --git a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css index 85a60ca007..94cc7a6321 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css @@ -3212,3 +3212,8 @@ table#ill-requests { display: none; } } + +span.name { + font-weight: bold; + font-style: italic; +} diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt index 6880b82139..ee7ac45368 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/library_groups.tt +++ b/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 %]
- +