From 0284e663363df550ba8cda03fc1ba8f864ddf856 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 Followup] - Fix UI issues --- 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(-) diff --git a/Koha/Library/Group.pm b/Koha/Library/Group.pm index ad2063b..cd53899 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 6b22201..4967f0f 100644 --- a/koha-tmpl/intranet-tmpl/prog/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/css/staff-global.css @@ -2969,3 +2969,8 @@ fieldset.rows + fieldset.action { .yui-u .rows li p label.widelabel { width: auto; } + +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 6880b82..ee7ac45 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 %]
- +